cancel
Showing results for 
Search instead for 
Did you mean: 

Hi, I have a problem with the scatter file

Hafsh.2
Associate II

In STM32F407, I get into trouble when I write the scatter file as follows.

LR_IROM1 0x08000000 0x00020000 {  ; load region size_region

 ER_IROM1 0x08000000 0x00020000 { ; load address = execution address

  *.o (RESET, +First)

  *(InRoot$$Sections)

  .ANY (+RO)

  .ANY (+XO)

 }

 RW_IRAM1 0x20000000 0x00020000 { ; RW data

  .ANY (+RW +ZI)

 }

}

LR_IROM2 0x08020000 0x00050000 {

 ER_IROM2 0x08020000 0x00050000 { ; load address = execution address

  user.o (+RO)

 }

}

1 REPLY 1

hello

put the second execution region under first load region or add execution regions for SRAM etc at the second load region.

https://www.keil.com/support/man/docs/armlink/armlink_pge1362075656353.htm

R_IROM1 0x08000000 0x00020000 {  ; load region size_region

 ER_IROM1 0x08000000 0x00020000 { ; load address = execution address

  *.o (RESET, +First)

  *(InRoot$$Sections)

  .ANY (+RO)

  .ANY (+XO)

 }

 ER_IROM2 0x08020000 0x00050000 { ; load address = execution address

  user.o (+RO)

 }

 RW_IRAM1 0x20000000 0x00020000 { ; RW data

  .ANY (+RW +ZI)

 }

}