Skip to main content
leeana
Associate III
October 12, 2021
Solved

Undefined reference to __ICFEDIT_SE_Key_region_ROM_start__

  • October 12, 2021
  • 2 replies
  • 1225 views

I am trying to merge UserApp example into my existing project. Everything goes fine, except for the error mentioned in the title. I've checked that include list is identical to UserApp example, as well as Linker->Miscellaneous->Other flags.

What am I missing?

EDIT: I've forgot to mention that I'm using the example for STM32G071xx and my MCU is STM32G070xx. IDE is STM32CubeIDE.

This topic has been closed for replies.
Best answer by Frantz LEFRERE

It seems you're using Cube IDE.

In the linker script "STM32G071RBTx.ld", you are using, you should have

INCLUDE mapping_fwimg.ld

INCLUDE mapping_sbsfu.ld

Do you confirm ?

And in the Linker->Miscellaneous->Other flags. You define the path to those files.

If this doesn't help, please copy paste the error message when you compile.

2 replies

Frantz LEFRERE
ST Employee
October 12, 2021

depending on you IDE, this flag is defined in the

Linker_Common\SW4STM32\mapping_sbsfu.ld

Linker_Common\EWARM\mapping_export.h 

Please insure to use linker file for your application which is similar to the example deliver in the SBSFU package

leeana
leeanaAuthor
Associate III
October 12, 2021

I've checked. It is identical except for relative paths, since the folder structure is a bit different, but the paths are correct.

Also the .h file is correctly located.. Dunno though how to check the linking to .ld file.

the command line includes -Xlinker -L ../../Linker_Common/SW4STM32, the path is correct since no "no such folder" error shows up

Frantz LEFRERE
Frantz LEFREREBest answer
ST Employee
October 12, 2021

It seems you're using Cube IDE.

In the linker script "STM32G071RBTx.ld", you are using, you should have

INCLUDE mapping_fwimg.ld

INCLUDE mapping_sbsfu.ld

Do you confirm ?

And in the Linker->Miscellaneous->Other flags. You define the path to those files.

If this doesn't help, please copy paste the error message when you compile.

leeana
leeanaAuthor
Associate III
October 12, 2021

Thank you so much Frantz! It worked. Of course CubeMX-generated STM32G070RBTx_FLASH.ld there were no such lines.

Best regards, Leana