Open korneliuszo opened 1 month ago
7kB?! Really?
Firstly, presumably, this only affects debug builds (release builds are probably already smaller)
Secondly, i think setting PICO_PANIC_FUNCTION=
(i.e. empty) will do this already
@peterharperuk
7kB on basic www with picow-http
@kilograham
I have
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
configured
PICO_PANIC_FUNCTION ... I suspect doesn't help as it is different compilation unit (header function prototype) so it needs provide string to call even nop function
PICO_PANIC_FUNCTION ... I suspect doesn't help as it is different compilation unit (header function prototype) so it needs provide string to call even nop function
I don't know what you mean here
Add PICO_PANIC_FUNCTION=
to your target_compile_definitions in CMake
I've made benchmarks
[no panic flags]$ arm-none-eabi-nm picopocket-sw.elf | grep __end__
20027e30 N __end__
[PICO_PANIC_FUNCTION=]$ arm-none-eabi-nm picopocket-sw.elf | grep __end__
20027da0 N __end__
[PICO_PANIC_NO_STRINGS_ON_TARGET]$ arm-none-eabi-nm picopocket-sw.elf | grep __end__
20025f60 N __end__
It allows in my code to remove 7kB of rodata. It's more critical on copy_to_ram configuration