Embedding micropython in applications.
Posted: Fri May 27, 2016 11:46 pm
I'm looking at embedding micropython in an application because it appears to be nicely lightweight.
I'm still reading code and figuring out how things are arranged; I might be misunderstanding stuff.
Does anyone have any recommendations on how to handle micropython memory management on a non-embedded system?
For instance, the unix port does stack checking by marking the application stack. That seems ok for a standalone REPL app but I'm worried that this approach does not work in a big application where the stack may be deep but I still want to handle python stack issues. Is that correct? Is the only way to turn off stack checking? (I seem to hit the bottom of the stack quite often when I write python code so this makes me nervous).
I'm not understanding the MICROPY_ENABLE_GC switch fully either. The unix port seems to be allocating a special heap for uPy. Does this mean the GC is not able to work with the natural heap? If I don't enable the GC does memory just continuously fill up?
I'm still reading code and figuring out how things are arranged; I might be misunderstanding stuff.
Does anyone have any recommendations on how to handle micropython memory management on a non-embedded system?
For instance, the unix port does stack checking by marking the application stack. That seems ok for a standalone REPL app but I'm worried that this approach does not work in a big application where the stack may be deep but I still want to handle python stack issues. Is that correct? Is the only way to turn off stack checking? (I seem to hit the bottom of the stack quite often when I write python code so this makes me nervous).
I'm not understanding the MICROPY_ENABLE_GC switch fully either. The unix port seems to be allocating a special heap for uPy. Does this mean the GC is not able to work with the natural heap? If I don't enable the GC does memory just continuously fill up?