ESP8266 Frozen modules in irom0 !

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
Post Reply
mianos
Posts: 84
Joined: Sat Aug 22, 2015 6:42 am

ESP8266 Frozen modules in irom0 !

Post by mianos » Thu Oct 22, 2015 10:29 am

I ran out of ram (actually I think I am out of stack) so in my pursuit to get stuff out of iram1 I found I can store bytes in irom0
if I only access them as words so I've updated frozen.py to convert strings into 32 bit word arrays that I store in irom0 with the linker command file and simply unpacking them when I read them at run time. (I have also hooked tokenize into the frozen builder to strip out all the comments).

I may be misreading the spec sheet for the flash that is on the quad SPI but as far as I can tell it's 4MByte (not 4MBit)!

According the the code I should be able to run the lexer in as in py/lexerstr.c on the code as I stream it out of the rom as words with the str_buf_next_byte callback.

mianos
Posts: 84
Joined: Sat Aug 22, 2015 6:42 am

Re: ESP8266 Frozen modules in irom0 !

Post by mianos » Fri Oct 23, 2015 5:48 am

And reporting that it all works. Kudos to the guys, the simple 'mp_lexer_new' callback with a context interface make it quite simple to lex and run python. :)

Post Reply