Is 16kB of RAM realistic? #15143
Replies: 4 comments 2 replies
-
You can compare that to the Microbit 1.0 which also has 16kB of RAM.
Working well, has to be added, means it is a useful resource to start to learn Python. Probably not much more. |
Beta Was this translation helpful? Give feedback.
-
Thanks, that's useful. This device does have its own Bluetooth stack with some configuration options to reduce RAM usage, but the docs don't have any actual numbers. I'll need to do some investigation. Without any form of communication I suppose the thing's still fun to play with as a Python-powered smartwatch. BLE is its main party trick, though. |
Beta Was this translation helpful? Give feedback.
-
I would argue that no, it's not realistic, at least not if you want a BLE stack. Technically it may be possible, but you'll need to invest a lot of effort and cut out many parts of the system - and it still may not work... |
Beta Was this translation helpful? Give feedback.
-
I did a CORE_LEVEL port (aided by the fact that TC32 machine code is so much like Thumb assembly that I was able to port the GC and NLR stuff with a literal search and replace to change the instruction names! I suspect that the instruction encodings differ by maybe one bit, too). The basic port, with just a REPL and the CORE features, reports 11984 bytes of free RAM. Meanwhile, if I go over to some of my TC32 example programs and build the BLE example, I can see that it's using only about 3kB of data RAM, which is great... except it's also put the entire 10kB BLE stack into RAM meaning that there's absolutely nothing available. Turns out that this thing uses SPI flash with a bridge, and Telink decided that it was too slow for BLE so all the time-critical stuff gets copied to RAM. (Also, the flash bridge has a 2.5kB cache which has to be located in SRAM, which doesn't help.) So this basically means that BLE is a dead loss. Which is a shame. Oh, well, looks like I'll be drilling some holes in the side of my $2 watch to get access to the UART pins... Thanks, all! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a device which I think would be cool to port Micropython to (it's a $2 smart watch based on an MCU from Telink). The only problem is that it's a bit anaemic when it comes to RAM: 16kB (although it's got 512kB of flash).
I know the docs say that Micropython will work on this, but it's that technically working or usefully working? How big of a program could I expect to run here? e.g this device supports BLE; should I just abandon any expectations of integrating the BLE stack?
Beta Was this translation helpful? Give feedback.
All reactions