Hi all,
I want to place a function at a specific location in the memory. I wrote the function in a separate source file and edited the default scatter file as follows:
LR_IROM1 0x00000000 0x80000 { ; load region size_region ER_IROM1 0x00000000 0x5000 { ; load address = execution address *.o (RESET, +First) *(InRoot$$Sections) .ANY (+RO) } ER_IROM2 0x9000 0x1000 { ; load address = execution address fun.o ;place the function here } ; 8_byte_aligned(49 vect * 4 bytes) = 8_byte_aligned(0xC4) = 0xC8 ; 32KB - 0xC8 = 0x7F38 RW_IRAM1 0x100000C8 0x7F38 { .ANY (+RW +ZI) } RW_IRAM2 0x2007C000 0x4000 { ; RW data, ETH RAM .ANY (AHBSRAM0) } RW_IRAM3 0x20080000 0x4000 { ; RW data, ETH RAM .ANY (AHBSRAM1) } RW_IRAM4 0x40038000 0x0800 { ; RW data, CAN RAM .ANY (CANRAM) } }
The program compiles and links properly. However when I download the code, it does not run. Anyone know what mistake I have done here?
Some Extra details: Platform: ARM Cortex-M3, LPC1768 (Mbed) The function is a simple blinking led routine.