2024-08-12 06:26 AM - last edited on 2024-08-12 07:19 AM by Andrew Neil
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 ?
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.
2024-08-12 07:09 AM
So the errors you have are:
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):
2024-08-12 07:18 AM
@Andrew Neil wrote:They sound like Linker symbols, which would be defined in the Linker script.
In fact, as we're talking multi-processor, in the Linker scripts - one for each core: