on my nrf52832 we have a tiny littlefs file system of 100kB size. My goal is to upload python files and execute them using
Code: Select all
execfile('uploaded.py')
But: since I have constrained RAM resources I cannot create a, lets say 8kB buffer with the content of the file in order to pass it to mp_lexer_new_from_str_len.
Then I looked into lexer.h and saw the mp_lexer_new function that receives a reader (stream source) as 2nd argument.
Now, you might guess where this topic is going to I'd like to know whether and more specifically how I can pass the file content byte by byte to feed the lexer? Are there any examples I have missed?
Thanks in advance
Christian