Freeing up some iram0
Posted: Sun Jul 05, 2015 1:58 am
I am running into the following problem. Almost all of my code runs in flash, no need for timing critical code. When I continue to add code there, I see the iram0 grow, still, to the point where it no longer fits. The culprit seems to be that a.o. functions from libgcc are pulled in (e.g. fp conversions) and apparently they're quite big.
Solution is quite simple, I think, move those functions to flash. Implementation is a bit harder
There are two approaches I know of:
- change the linker script (see Mike Gore's posting), works for complete libraries, but not for discrete symbols (but if there is a way, please yell)
- recompile libgcc with certain functions in irom0_text segment, preferrable, I think, but not that easy
Are there other ways to achieve the same?
Solution is quite simple, I think, move those functions to flash. Implementation is a bit harder
There are two approaches I know of:
- change the linker script (see Mike Gore's posting), works for complete libraries, but not for discrete symbols (but if there is a way, please yell)
- recompile libgcc with certain functions in irom0_text segment, preferrable, I think, but not that easy
Are there other ways to achieve the same?