Commit Graph

7 Commits

Author SHA1 Message Date
Phil Howard 0148e5f5e7 MicroPython: Move boot.py to modules_py.cmake.
The cppmem module *must* be switched into MicroPython heap mode or C++ code will inevitably run out of RAM.

Thus boot.py needs to be included in every build.
2023-03-27 10:41:16 +01:00
Phil Howard 2c0310ca9a MicroPython: Switch C++ allocation mode in boot.py. 2023-03-24 20:37:26 +00:00
Phil Howard 667faf70d1 MicroPython: Magic C++ allocator module.
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.
2023-03-24 15:11:07 +00:00
Phil Howard 375df60ff3 PicoGraphics: Switch to string_view.
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.
2023-03-16 13:25:19 +00:00
Phil Howard 2176e0feb1 MicroPython: Avoid some duplication in CMake files. 2023-02-21 12:52:47 +00:00
Phil Howard ba100ae069 Wakeup: Disable RTC & enable SR for Inky, always include shift function.
Due to quirks with how QSTRs are passed, conditionally including a function is difficult.

Instead, always include "get_shift_state" but throw a RuntimeError if its use is invalid (no shift register).
2022-12-20 13:46:02 +00:00
Phil Howard fb246441bd MicroPython: Add picow_enviro build. 2022-08-08 12:05:18 +01:00