We've been maintaining a downstream patch to disable C++ exception
handling, which gives us some headroom before our builds get too big and
overwrite themselves at runtime.
Forgetting to apply this patch is a constant source of debugging
frustration. It turns out it can just be added to our USER_C_MODULES cmake
files instead, where it will implicitly be included when building against
our modules.
This module redirects all pre-init object memory allocations into a static, fixed-sized, linear, non-freeing memory pool.
It then auto-switches into "MICROPYTHON" mode, whereupon all C++ `new` and `delete` calls are remapped to `m_malloc` and `m_free` respectively.
MicroPython's GET_STR_DATA_LEN macro returns a const byte array and len, which std::string would copy into heap.
Using string_view lets us wrap the existing const values.
Pico Scroll and Pico Unicorn were allocating static buffers for gamma and font data respectively.
Make Pico Scroll's `__bitmap` static.
Move Pico Unicorn's three GAMMA tables to one 14-bit table in "pimoroni_common.hpp". Rename "GAMMA" to "GAMMA_8BIT".
Wireless raises memory usage significantly requiring Pico Unicorn and Pico Scroll (which both need slight refactoring) to be excluded from the build.
The Flash/Filesystem split has changed from a regular Pico build and may change again. Flashing this to a regular Pico *WILL TRASH YOUR FILESYSTEM*.