support
support copied to clipboard
add option for compiler optimizations
MicroPython defines 3 optimization levels. The default, O0; O1/O2 which does not compile assert statements; and O3 which does not include line numbers. These can make the compiled .mpy file smaller.
Not sure how useful this would be, but if we are looking for ways to squeeze every last byte of RAM out of the hubs, this could be a possibility.
Line numbers are very useful. Maybe it could automatically try O3 if the O0 result wouldn't fit in half the RAM for the connected hub.
Moved here from Pybricks-Code.
This might be useful on Move Hub, since we don't display line numbers in errors anyway.