SPI Flash - Code Allocation


#1

Currently, on the IMP005, the code (and language etc.) appears to take up roughly 3.2Mb of space on the SPI Flash.

Is it possible to reduce or increase the allocated memory for the code?

We are starting to fill up the allocated space for code (near 90%), the simplest solution we see is to increase the memory allocation.


#2

Not at this point, no. The SPI usage includes two copies of impOS, two copies of WiFi firmware, user space, preboot, as well as Squirrel, so it’s absolutely not just the Squirrel code out there.

On imp005, which has no on-die flash, everything needed is copied into on-die RAM for execution (after it has been decrypted and had its signatures checked). This would mean that increasing code space on 005 would sacrifice an equivalent amount of RAM workspace available to the code.

The bytecode format is heavily packed and has a max 256kB size. This limit will be addressed for future imps, and I filed a ticket with some ideas about how we could increase code size on imp005, but we’ve not got a timescale for increasing (likely doubling) code space on 005 yet.