cancel
Showing results for 
Search instead for 
Did you mean: 

Undefined reference to __ICFEDIT_SE_Key_region_ROM_start__

leeana
Associate III

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Frantz LEFRERE
ST Employee

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.

View solution in original post

4 REPLIES 4
Frantz LEFRERE
ST Employee

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

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
ST Employee

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.

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

Best regards, Leana