The boot counter is a uint8_t single-byte counter stored in the first NVM byte position (`micrcontroller.nvm[0]`). The counter increments by 1 each time the board boots, regardless if it's a hard or soft reset.
Enable the boot counter by adding `#define CIRCUITPY_BOOT_COUNTER 1` to your board's mpconfigboard.h file. Note that an error will be thrown during the build if `CIRCUITPY_INTERNAL_NVM_SIZE` is not also set within mpconfigboard.h.
* Reduce the number of supported HID reports of IDs per descriptor.
This saves ~200 bytes in the default HID objects.
* (Not enabled) Compute QSTR attrs on init. This trades 1k RAM for
flash. Flash is the default (1).
Messages like 'command-line option is [not valid] for C++' can result
from the way the preprocessor is invoked by `genlast`. Instead, cause
the files to be preprocessed as though their content is "C". This
should generally be OK, as they'll eventually be _compiled_ as C++.
When preprocessed as C, the file simply needs to generate all the same
QSTRS and TRANSLATEs.
When you wish to use the valgrind memory analysis tool on micropython,
you can arrange to define MICROPY_DEBUG_VALGRIND to enable use of
special valgrind macros. For now, this only fixes `gc_get_ptr`
so that it never emits the diagnostic "Conditional jump or move depends
on uninitialised value(s)".
Signed-off-by: Jeff Epler <jepler@gmail.com>
Convert bitbangio, bitmaptools, _bleio, board, busio, countio, digitalio, framebufferio, frequencyio, gamepadshift, getpass, keypad, math, microcontroller, and msgpack modules to use MP_REGISTER_MODULE.
Related to #5183.
Convert adafruit_bus_device, adafruit_pixelbuf, analogio, atexit, audiobusio, audiocore, audioio, audiomixer, and audiomp3 modules to use MP_REGISTER_MODULE.
Related to #5183.
Convert from using MICROPY_PORT_BUILTIN_MODULES_STRONG_LINKS to using MP_REGISTER_MODULE for displayio, terminalio, and fontio modules.
Related to #5183.
This also tweaks the repr for unicode strings to only escape a few
utf-8 code points. This makes emoji show in os.listdir() for
example.
Also, enable exfat support on full builds.
Fixes#5146
This leaves much more space on SAMD21 builds that aren't "full builds".
These are new APIs that we don't need to add to old boards.
Also, tweak two Arduino boards to save space on them.