This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

duplicate execution regions in scatter file

In a scatter file can I put a code segment (eg the vector table) in two different places in the output file even though I only defined it in the code once eg:

LR_VECTORTABLE 0x08000000 0x00000140
{
        ER_VECTORTABLE 0x08000000 0x00000140
        {
                *.o (RESET, +First)             ; Duplicated for stand alone builds
        }
}

LR_APP 0x08008000 0x00038000
{
        ER_APP 0x08008000 0x00038000
        {
                *.o (RESET, +First)             ; Duplicated for bootloader systems (bootloader system will cut off the above hex)
                *(InRoot$$Sections)
                .ANY (+RO)
        }

        RW_ALL 0x20000000 0x00010000
        {
                .ANY (+RW +ZI)
        }
}

NB: this does not seem to work I get a error: "Error: L6223E: Ambiguous selectors found for startup_stm32f10x_hd.o(RESET) from Exec regions ER_VECTORTABLE and ER_APP.". What I want to know is can this be done somehow ?

0