2025-07-15 2:51 AM - last edited on 2025-07-15 2:59 AM by Andrew Neil
i use STM32H750ZBT6 to make a LCD driver board and the stm32cubeIDE have some error as follows after compiling, even if i revise the include file or .h file , the error still exists on. how to solve this ? please help ......
D:/ST/STM32CubeIDE_1.18.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Core/Src/freertos.o: in function `MX_FREERTOS_Init':
D:/Project/SC550/sample/SC550_LCM/Debug/../Core/Src/freertos.c:116:(.text.MX_FREERTOS_Init+0x38): undefined reference to `TouchGFX_Task'
D:/ST/STM32CubeIDE_1.18.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Core/Src/main.o: in function `main':
D:/Project/SC550/sample/SC550_LCM/Debug/../Core/Src/main.c:105:(.text.main+0x2a): undefined reference to `MX_TouchGFX_Init'
D:/ST/STM32CubeIDE_1.18.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: D:/Project/SC550/sample/SC550_LCM/Debug/../Core/Src/main.c:107:(.text.main+0x2e): undefined reference to `MX_TouchGFX_PreOSInit'
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:122: SC550_LCM.elf] Error 1
"make -j12 all" terminated with exit code 2. Build might be incomplete.
16:19:25 Build Failed. 4 errors, 0 warnings. (took 17s.918ms)
2025-07-15 2:58 AM
It's telling you that TouchGFX_Task, MX_TouchGFX_Init, and MX_TouchGFX_PreOSInit are not defined.
These are just declarations (aka "prototypes") - not definitions:
So do you actually have definitions for these?
@miker wrote:even if i revise the include file or .h file , the error still exists on.
Header files would not be expected to provide definitions - just declarations.
BTW: please see How to insert source code - not as screenshots.