cancel
Showing results for 
Search instead for 
Did you mean: 

Undefined reference to __OPENAMP_region_... symbols

Kenwang
Associate II

Hi Sir,

My target board is STM32H747 , when I add the code. make will report error. the error message is below , how to fix it ?

Kenwang_0-1723469054868.png

 

arm-none-eabi-gcc -o "TUT_03_CM4.elf" @"objects.list" -mcpu=cortex-m4 -T"D:\STM32CubeIDE\workspace\TUT_03\CM4\STM32H747XIHX_FLASH.ld" --specs=nosys.specs -Wl,-Map="TUT_03_CM4.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group

C:/ST/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./OPENAMP/openamp.o: in function `OPENAMP_shmem_init':

D:/STM32CubeIDE/workspace/TUT_03/CM4/Debug/../OPENAMP/openamp.c:138: undefined reference to `__OPENAMP_region_start__'

C:/ST/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: D:/STM32CubeIDE/workspace/TUT_03/CM4/Debug/../OPENAMP/openamp.c:138: undefined reference to `__OPENAMP_region_end__'

C:/ST/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./OPENAMP/openamp.o: in function `MX_OPENAMP_Init':

D:/STM32CubeIDE/workspace/TUT_03/CM4/Debug/../OPENAMP/openamp.c:208: undefined reference to `__OPENAMP_region_start__'

C:/ST/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: D:/STM32CubeIDE/workspace/TUT_03/CM4/Debug/../OPENAMP/openamp.c:208: undefined reference to `__OPENAMP_region_end__'

C:/ST/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./OPENAMP/rsc_table.o: in function `resource_table_init':

D:/STM32CubeIDE/workspace/TUT_03/CM4/Debug/../OPENAMP/rsc_table.c:175: undefined reference to `__OPENAMP_region_start__'

collect2.exe: error: ld returned 1 exit status

make: *** [makefile:67: TUT_03_CM4.elf] Error 1

"make -j24 all" terminated with exit code 2. Build might be incomplete.

2 REPLIES 2
Andrew Neil
Evangelist III

So the errors you have are:

  1. undefined reference to `__OPENAMP_region_start__'
  2. undefined reference to `__OPENAMP_region_end__'

They sound like Linker symbols, which would be defined in the Linker script.

 

Give details of how you created this project; where did you obtain the OpenAmp code? 

 

Please see the posting tips for how to properly post source code (among other things):

https://community.st.com/t5/community-guidelines/how-to-write-your-question-to-maximize-your-chances-to-find-a/ta-p/575228