Some about MCU

Few days ago I was in my office introducing the electric imp to some friends that are willing to integrate it in their project and I’ve got the question: how much memory is available?

Damn! I was totally unable to answer this simple question…

Up to now the information I have includes:

MCU model: STM32F205RG

It should means:

STM32 = ARM Cortex family
F = General purpose
205 = Cortex-M3 connectivity, USB OTG FS/HS
R = 64 pins
G = 1024kB (Flash Size)

If this is correct, beside the 1M of flash 128KB of SRAM should be available.

I remember I’ve read @Hugo pointing that the squirrel code is stored in the flash, where I suppose the firmware is stored as well.

Knowing that in a future update of the firmware should be possible to start to have the software running in “local mode”, without a WiFi connection, it would be interesting to know (if the numbers are right) how much of the flash is available for the code and if will be possible to use a minimum part of this to store data.

Or maybe could be interesting to see an API that give access to a microSD over SPI.

We already know that CAN is under development. The MCU actually carry USB OTG and I can imagine a ton of uses for this… @Hugo: is one of the two USB OTG controllers actually wired to some pin (maybe on the imp002) and a future API for this planned?


128K of the flash is available for Squirrel code. (If you’re compiling Squirrel locally to see how big the bytecode is, note that 64-bit machines produce much bigger bytecode than 32-bit targets such as the imp.)

About 70K of the SRAM is available as Squirrel heap, though if your Squirrel program is large, some of this is eaten into for Squirrel data structures before your code even starts. You can find out how much is left at any time by calling imp.getmemoryfree().


@peter, thanks for the details.

I’ve got some “doubt” about compiling, as I suppose that this is a task performed by the server and not by the local machine, right? And I suppose the server is optimized for the generation of the smallest possible code (running on 32bit?).

Which is the case that could involve a local compiler?



Within the imp system, yes compiling is done on our servers and is optimised to be 32-bit. Those comments about 64-bit were really aimed at people doing this sort of thing.