Don't place libc.a in RAM#3075
Conversation
|
So what you are saying was that with Even an 800 byte size difference is something not to be scoffed at - some existing projects may be very space constrained |
I think that they were previously never placed in RAM with or without When I made this change I was going off the comment which said: but the code wasn't actually including memset/memcpy as they are under |
This reverts to the pre-2.3.0 behaviour Co-authored-by: will-v-pi <108662275+will-v-pi@users.noreply.github.com>
As part of a bugfix to place
memfunctions in RAM as intended (dc3a2e8), now all oflibc.agets placed in RAM too which takes up a lot of extra space. This fixes that to only place thememfunctions in RAM, and leavelibc.ain Flash.It looks like this may have been missed because on some (possibly most) toolchains (e.g. Debian arm-none-eabi-gcc 14.2.1) if there are any
-gflags passed, the toolchain useslibg.ainstead oflibc.a, andPICO_DEBUG_INFO_IN_RELEASE(which defaults to 1) passes-g. Therefore there was nolibc.ato place in RAM, so the size increase doesn't occur.Reproduced the issue from #3070 with
PICO_DEBUG_INFO_IN_RELEASE=0and thekitchen_sink_printf_compilertest, which shows the increase in RAM usage due to placinglibc.ain FlashFixes #3070