Skip to main content
Associate
July 27, 2026
Question

CubeMX produces missing libraries on Nucleo H755 (CubeIDE2.2.0 - CubeMX6.18.0)

  • July 27, 2026
  • 5 replies
  • 134 views

Hi,

I have been using the H755 Nucleo board for some time and always struggled with the firmware/libraries. To make matters worse, there are no examples for this board.

 

I was using CubeIde 1.15 and decided to upgrade to 2.2.0 to see if the libraries handling improved. I started an empty project with the BSP included and added a simple code on CM7 to blink some leds with a HAL_Delay(), and it worked fine. Later I only added a timer (TIM1) on CubeMX, regenerated the code and now the CM4 does not compile. There is and never was any code added/modified to this core.

 

The errors I get are related to the inclusion of libraries:

arm-none-eabi-gcc -o "AFE16_Burn-in_Controller_CM4.elf" @"objects.list" -mcpu=cortex-m4 -T"C:\Users\rafael.puyol\Documents\Reliability\afe16_burn-in_controller\AFE16_Burn-in_Controller\CM4\STM32H755ZITX_FLASH.ld" --specs=nosys.specs -Wl,-Map="AFE16_Burn-in_Controller_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_2.2.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.14.3.rel1.win32_1.0.100.202602081740/tools/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Core/Src/main.o: in function `main':

C:/Users/rafael.puyol/Documents/Reliability/afe16_burn-in_controller/AFE16_Burn-in_Controller/CM4/Debug/../Core/Src/main.c:86:(.text.main+0x26): undefined reference to `HAL_HSEM_ActivateNotification'

C:/ST/STM32CubeIDE_2.2.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.14.3.rel1.win32_1.0.100.202602081740/tools/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld.exe: (HAL_HSEM_ActivateNotification): Unknown destination type (ARM/Thumb) in ./Core/Src/main.o

C:/Users/rafael.puyol/Documents/Reliability/afe16_burn-in_controller/AFE16_Burn-in_Controller/CM4/Debug/../Core/Src/main.c:86:(.text.main+0x26): dangerous relocation: unsupported relocation

C:/ST/STM32CubeIDE_2.2.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.14.3.rel1.win32_1.0.100.202602081740/tools/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/rafael.puyol/Documents/Reliability/afe16_burn-in_controller/AFE16_Burn-in_Controller/CM4/Debug/../Core/Src/main.c:91:(.text.main+0x2a): undefined reference to `HAL_PWREx_ClearPendingEvent'

C:/ST/STM32CubeIDE_2.2.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.14.3.rel1.win32_1.0.100.202602081740/tools/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld.exe: (HAL_PWREx_ClearPendingEvent): Unknown destination type (ARM/Thumb) in ./Core/Src/main.o

C:/Users/rafael.puyol/Documents/Reliability/afe16_burn-in_controller/AFE16_Burn-in_Controller/CM4/Debug/../Core/Src/main.c:91:(.text.main+0x2a): dangerous relocation: unsupported relocation

C:/ST/STM32CubeIDE_2.2.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.14.3.rel1.win32_1.0.100.202602081740/tools/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/rafael.puyol/Documents/Reliability/afe16_burn-in_controller/AFE16_Burn-in_Controller/CM4/Debug/../Core/Src/main.c:92:(.text.main+0x34): undefined reference to `HAL_PWREx_EnterSTOPMode'

C:/ST/STM32CubeIDE_2.2.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.14.3.rel1.win32_1.0.100.202602081740/tools/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld.exe: (HAL_PWREx_EnterSTOPMode): Unknown destination type (ARM/Thumb) in ./Core/Src/main.o

C:/Users/rafael.puyol/Documents/Reliability/afe16_burn-in_controller/AFE16_Burn-in_Controller/CM4/Debug/../Core/Src/main.c:92:(.text.main+0x34): dangerous relocation: unsupported relocation

C:/ST/STM32CubeIDE_2.2.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.14.3.rel1.win32_1.0.100.202602081740/tools/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/rafael.puyol/Documents/Reliability/afe16_burn-in_controller/AFE16_Burn-in_Controller/CM4/Debug/../Core/Src/main.c:101:(.text.main+0x66): undefined reference to `HAL_Init'

C:/ST/STM32CubeIDE_2.2.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.14.3.rel1.win32_1.0.100.202602081740/tools/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld.exe: (HAL_Init): Unknown destination type (ARM/Thumb) in ./Core/Src/main.o

C:/Users/rafael.puyol/Documents/Reliability/afe16_burn-in_controller/AFE16_Burn-in_Controller/CM4/Debug/../Core/Src/main.c:101:(.text.main+0x66): dangerous relocation: unsupported relocation

C:/ST/STM32CubeIDE_2.2.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.14.3.rel1.win32_1.0.100.202602081740/tools/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Core/Src/stm32h7xx_it.o: in function `SysTick_Handler':

C:/Users/rafael.puyol/Documents/Reliability/afe16_burn-in_controller/AFE16_Burn-in_Controller/CM4/Debug/../Core/Src/stm32h7xx_it.c:188:(.text.SysTick_Handler+0x4): undefined reference to `HAL_IncTick'

C:/ST/STM32CubeIDE_2.2.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.14.3.rel1.win32_1.0.100.202602081740/tools/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld.exe: (HAL_IncTick): Unknown destination type (ARM/Thumb) in ./Core/Src/stm32h7xx_it.o

C:/Users/rafael.puyol/Documents/Reliability/afe16_burn-in_controller/AFE16_Burn-in_Controller/CM4/Debug/../Core/Src/stm32h7xx_it.c:188:(.text.SysTick_Handler+0x4): dangerous relocation: unsupported relocation

collect2.exe: error: ld returned 1 exit status

make: *** [makefile:64: AFE16_Burn-in_Controller_CM4.elf] Error 1

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

 

Does anybody know If I should include something else by hand? Why the MX is not able to solve this?

Thanks,

Rafael

 

 

 

5 replies

Ghofrane GSOURI
ST Technical Moderator
July 28, 2026

Hello ​@rpt 

Could you please provide your IOC?

I will be waiting for your feedback.

THX

Ghofrane

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
rptAuthor
Associate
July 28, 2026

Hi Ghofrane, 

 

Here it is. It is a different project (because yesterday I already had made some changes) but the error is basically the same. When code is generated by the .ioc at some points libraries are not recreated. Here is the output of this exact .ioc:

--------------------------------------------------------------------------------------------------------------------------------------------------

09:48:47 **** Incremental Build of configuration Debug for project TestLibrariesTodelete_CM4 ****

make -j20 all

arm-none-eabi-gcc -o "TestLibrariesTodelete_CM4.elf" @"objects.list" -mcpu=cortex-m4 -T"C:\Users\rafael.puyol\Documents\Reliability\afe16_burn-in_controller\TestLibrariesTodelete\CM4\STM32H755ZITX_FLASH.ld" --specs=nosys.specs -Wl,-Map="TestLibrariesTodelete_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_2.2.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.14.3.rel1.win32_1.0.100.202602081740/tools/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Core/Src/main.o: in function `main':

C:/Users/rafael.puyol/Documents/Reliability/afe16_burn-in_controller/TestLibrariesTodelete/CM4/Debug/../Core/Src/main.c:86:(.text.main+0x26): undefined reference to `HAL_HSEM_ActivateNotification'

C:/ST/STM32CubeIDE_2.2.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.14.3.rel1.win32_1.0.100.202602081740/tools/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld.exe: (HAL_HSEM_ActivateNotification): Unknown destination type (ARM/Thumb) in ./Core/Src/main.o

C:/Users/rafael.puyol/Documents/Reliability/afe16_burn-in_controller/TestLibrariesTodelete/CM4/Debug/../Core/Src/main.c:86:(.text.main+0x26): dangerous relocation: unsupported relocation

C:/ST/STM32CubeIDE_2.2.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.14.3.rel1.win32_1.0.100.202602081740/tools/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/rafael.puyol/Documents/Reliability/afe16_burn-in_controller/TestLibrariesTodelete/CM4/Debug/../Core/Src/main.c:91:(.text.main+0x2a): undefined reference to `HAL_PWREx_ClearPendingEvent'

C:/ST/STM32CubeIDE_2.2.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.14.3.rel1.win32_1.0.100.202602081740/tools/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld.exe: (HAL_PWREx_ClearPendingEvent): Unknown destination type (ARM/Thumb) in ./Core/Src/main.o

C:/Users/rafael.puyol/Documents/Reliability/afe16_burn-in_controller/TestLibrariesTodelete/CM4/Debug/../Core/Src/main.c:91:(.text.main+0x2a): dangerous relocation: unsupported relocation

C:/ST/STM32CubeIDE_2.2.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.14.3.rel1.win32_1.0.100.202602081740/tools/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/rafael.puyol/Documents/Reliability/afe16_burn-in_controller/TestLibrariesTodelete/CM4/Debug/../Core/Src/main.c:92:(.text.main+0x34): undefined reference to `HAL_PWREx_EnterSTOPMode'

C:/ST/STM32CubeIDE_2.2.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.14.3.rel1.win32_1.0.100.202602081740/tools/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld.exe: (HAL_PWREx_EnterSTOPMode): Unknown destination type (ARM/Thumb) in ./Core/Src/main.o

C:/Users/rafael.puyol/Documents/Reliability/afe16_burn-in_controller/TestLibrariesTodelete/CM4/Debug/../Core/Src/main.c:92:(.text.main+0x34): dangerous relocation: unsupported relocation

C:/ST/STM32CubeIDE_2.2.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.14.3.rel1.win32_1.0.100.202602081740/tools/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/rafael.puyol/Documents/Reliability/afe16_burn-in_controller/TestLibrariesTodelete/CM4/Debug/../Core/Src/main.c:101:(.text.main+0x66): undefined reference to `HAL_Init'

C:/ST/STM32CubeIDE_2.2.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.14.3.rel1.win32_1.0.100.202602081740/tools/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld.exe: (HAL_Init): Unknown destination type (ARM/Thumb) in ./Core/Src/main.o

C:/Users/rafael.puyol/Documents/Reliability/afe16_burn-in_controller/TestLibrariesTodelete/CM4/Debug/../Core/Src/main.c:101:(.text.main+0x66): dangerous relocation: unsupported relocation

C:/ST/STM32CubeIDE_2.2.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.14.3.rel1.win32_1.0.100.202602081740/tools/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Core/Src/stm32h7xx_it.o: in function `SysTick_Handler':

C:/Users/rafael.puyol/Documents/Reliability/afe16_burn-in_controller/TestLibrariesTodelete/CM4/Debug/../Core/Src/stm32h7xx_it.c:188:(.text.SysTick_Handler+0x4): undefined reference to `HAL_IncTick'

C:/ST/STM32CubeIDE_2.2.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.14.3.rel1.win32_1.0.100.202602081740/tools/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld.exe: (HAL_IncTick): Unknown destination type (ARM/Thumb) in ./Core/Src/stm32h7xx_it.o

C:/Users/rafael.puyol/Documents/Reliability/afe16_burn-in_controller/TestLibrariesTodelete/CM4/Debug/../Core/Src/stm32h7xx_it.c:188:(.text.SysTick_Handler+0x4): dangerous relocation: unsupported relocation

collect2.exe: error: ld returned 1 exit status

make: *** [makefile:64: TestLibrariesTodelete_CM4.elf] Error 1

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

 

09:48:49 Build Failed. 17 errors, 0 warnings. (took 1s.368ms)

--------------------------------------------------------------------------------------------------------------------------------------------------

 

Also, I did a serach and it looks like stm32h7xx_hal_hsem.c is present on the CM7 core but was removed in the CM4 by the .ioc (I did not add/delete any files manually):

 

Hope this helps, anything else please let me know.

Ghofrane GSOURI
ST Technical Moderator
July 29, 2026

Hello ​@rpt 

I used the provided IOC to generate the code using STM32CubeMX6.18.0 , the build has been finished successfully in CM4

and the  stm32h7xx_hal_hsem.c  does exist in both CM4 and CM7 

So could you please copy the .ioc file alone into a new empty project folder, open it with STM32CubeMX6.18.0 , and regenerate the project in a new workspace.

I will be waiting for your feedback.

THX

Ghofrane

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
rptAuthor
Associate
July 29, 2026

Hi Ghofrane,

 

I tried it and it does work but the issue is regenerating the code several times (which is quite common in a project as peripherals are added, pins changed, etc.). What is time consuming is that Cube MX in some situations (like the one I described) seems to not be aware of which libraries are already created or missing so it does not create them, then the project does not compile.

To me it looks like a bug in the CubeMX, I hope tools become more reliable with time, it is been a while since this MCU was first available and sometimes its hard to understand the changes ST keeps making on their tools.

Best regards,

 

 

 

Associate
July 29, 2026

It looks more like a linking issue than a missing include. The functions like HAL_Init, HAL_IncTick, HAL_HSEM_ActivateNotification, and the HAL_PWREx_* APIs are part of the HAL source, so if they're all coming up as undefined after code generation, I'd first check whether the CM4 project is still compiling and linking all the required stm32h7xx_hal*.c files.

Since the problem appeared immediately after regenerating with CubeMX, it's also worth comparing the project settings before and after regeneration. Sometimes the generated project can lose source file references or middleware configuration, especially in dual-core projects.

Have you tried creating a fresh H755 project with the same CubeMX settings to see if the issue is reproducible, or does it only happen with this specific project?