PSOC5 GCC linker locate all routines from a file in RAM instead of FLASH | Cypress Semiconductor
PSOC5 GCC linker locate all routines from a file in RAM instead of FLASH
I have my own FLASH update utility that runs in RAM. It has to run in RAM including all constants/variables so the rest of flash can be updated.
It was easy enough to get my routines into RAM using the documents at: http://www.cypress.com/?id=4&rID=57109#Section6
But these routines call CyWriteRowData() and CyWriteRowConfig which are in CyFlash.c which is generated code from Creator. I have to get these into RAM as well or else the flash updater won't work as FLASH might change during the download!
While I could go in and manually add the
__attribute__ ((section(".ramcode"))) void ramFunc(void);
to every function in CyFlash.c, it seems like there must be an option in the customer linker file cm3gcc_custom.ld that would push all routines from this file into the .data section instead of .text.
Does anyone have an idea how to do this? Google searches keep coming up with details that don't match what I'm trying to do...