Skip to main content
Hafsh.2
Associate II
February 1, 2021
Question

Hi, I have a problem with the scatter file

  • February 1, 2021
  • 1 reply
  • 1920 views

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)

 }

}

This topic has been closed for replies.

1 reply

Vangelis Fortounas
Associate II
February 1, 2021

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)

 }

}