I'm using LCP1857 developing with MCUXpresso, the code is near to reach the limit of the FlashA, ( today the code size is near 480kBytes).
I know that's possible to locate functions and constants to FlashB using the directives
__TEXT(Flash2) void function_xxx(uint32_t u32_parameter) {
…}
__RODATA(Flash2) const unsigned char ach_l_Table[dim]={...};
If i'd like to move a library composed by several files to FlashB it's necessary to mark each function and table with the directive or exists a method to locate all the code in a *.c file in FlashB ?
Tank you, i knew this method, but , as I have to move a large number of functions in Flash2, i was wondering if exists another method that allows to declare all the functions in a *.c file all located in Flash2 instead of marking each function with __TEXT(Flash2)
Ok, tank you,
i know that i have to use the directive __TEXT(Flash2) but, as I have to move a large number of functions in Flash2 , i wondered if there is another method to declare all the functions in a *.c file all located in Flash2 instead of mark each function with __TEXT(Flash2)
You can relocate all functions in a file by changing the linker script - not by changing the source code.
Take a look at this article by SiLabs
Hello luciano_mortari
This document provides some sample codes and steps for relocating Code and Data into RAM/FLASH. Although the examples are for the Kinetis K64 you may use this as reference:
Let me know if this is helpful, if you have more questions do not hesitate to ask me.
Best regards,
Omar