We've had some success building MicroPython with --specs=nano.specs, which links newlib-nano implementations to reduce binary size and memory footprint:
micropython/micropython#19299
(Specifically we get up to 1624 bytes of flash and 960 bytes of RAM back!)
However support is technically incomplete the way we've implemented it, as it'd be better if all source files (including pico-sdk) were compiled with --specs=nano.specs to prepend the include/newlib-nano directory to the search path. (The actual impact seems minimal, but there's always the risk of some libc function being ABI incompatible as a result.)
Would you folks consider adding newlib-nano support to pico-sdk?
I'm aware you already have picolibc support, so understand if you don't want to support too many libc variants. 😁
We've had some success building MicroPython with
--specs=nano.specs, which links newlib-nano implementations to reduce binary size and memory footprint:micropython/micropython#19299
(Specifically we get up to 1624 bytes of flash and 960 bytes of RAM back!)
However support is technically incomplete the way we've implemented it, as it'd be better if all source files (including pico-sdk) were compiled with
--specs=nano.specsto prepend theinclude/newlib-nanodirectory to the search path. (The actual impact seems minimal, but there's always the risk of some libc function being ABI incompatible as a result.)Would you folks consider adding newlib-nano support to pico-sdk?
I'm aware you already have picolibc support, so understand if you don't want to support too many libc variants. 😁