Hello Stephen
You can define two memory sections in your link command file for program code. Like:
MEMORY {
# List of all sections specified in the "Build options" tab
.p_Code1 (RWX) : ORIGIN = 0x00000000, LENGTH = 0x00008000
.p_Code2 (RWX) : ORIGIN = 0x00008004, LENGTH = 0x00007FFC
...}
Or only define one section for code, but pay attention to avoid the memory overlap inside SECTION{}, like below:
MEMORY {
# List of all sections specified in the "Build options" tab
.p_Code1 (RWX) : ORIGIN = 0x00000000, LENGTH = 0x0000FFFF
...}
SECTIONS {
…
{
}
.ApplicationCode :
{
# .text sections
* (rtlib.text)
* (startup.text)
* (fp_engine.text)
* (ll_engine.text)
* (user.text)
. = 0X8000;
F_BOOT_ID_start = . ;
. = F_BOOT_ID_start + 0x004;
F_BOOT_ID_end = .;
* (.text)
} > .p_Code
Hope this helps! If not, could you please supply the part number of your MCU?
Best Regards
Fiona Kuang
TIC - Technical Information Center
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Mark Correct button. Thank you!
-----------------------------------------------------------------------------------------------------------------------