You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All the custom C code of the modules would need to reset the variables to zero.
This is done by C at startup, but when rebooting MicroPython, the global variables contained within the modules might have invalid code.
For instance, callbacks might be pointing at invalid memory, or worse: working code that is not referred by malloc and might be overwritten at any time.
One possible solution is to use MicroPython __init__, a single struct globals for all global variables, and inside __init__, memset the struct globals to 0 (or default values).
The text was updated successfully, but these errors were encountered:
All the custom C code of the modules would need to reset the variables to zero.
This is done by C at startup, but when rebooting MicroPython, the global variables contained within the modules might have invalid code.
For instance, callbacks might be pointing at invalid memory, or worse: working code that is not referred by malloc and might be overwritten at any time.
One possible solution is to use MicroPython
__init__
, a singlestruct globals
for all global variables, and inside__init__
, memset thestruct globals
to 0 (or default values).The text was updated successfully, but these errors were encountered: