cancel
Showing results for 
Search instead for 
Did you mean: 

Undefined references to TouchGFX_Task, MX_TouchGFX_Init, and MX_TouchGFX_PreOSInit

miker
Associate III

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)

 

miker_0-1752572792702.png

 

miker_1-1752572818237.png

 

miker_2-1752572866030.png

 

1 REPLY 1
Andrew Neil
Super User

It's telling you that TouchGFX_TaskMX_TouchGFX_Init, and MX_TouchGFX_PreOSInit are not defined.

These are just declarations (aka "prototypes") - not definitions:

AndrewNeil_0-1752573354047.png

 

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.

 

 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.