2025-07-10 2:34 AM
I use stm32cube MX create a project to drive customed board and RGB screen , this step is successful to drive the screen ; but add the touchGFX , stm32cubeIDE have some error as follows after compiling with touchGFX
D:/Project/SC550/sample/SC550_LCM/Debug/../Core/Src/freertos.c:116:(.text.MX_FREERTOS_Init+0x38): undefined reference to `TouchGFX_Task'
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'
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'
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.
2025-07-14 12:12 AM - last edited on 2025-07-14 7:48 AM by GaetanGodart
I use STM32H750ZBT6 to make a LCD driver-board and create the display project with stm32cubeMX , when i compiled, stm32cubeIDE exists on as follows error, how to solve these issues ?
arm-none-eabi-g++ -o "SC550_LCM.elf" @"objects.list" -l:libtouchgfx-float-abi-hard.a -mcpu=cortex-m7 -T"D:\Project\SC550\sample\SC550_LCM\STM32H750ZBTX_FLASH.ld" --specs=nosys.specs -Wl,-Map="SC550_LCM.map" -Wl,--gc-sections -static -L"D:\Project\SC550\sample\SC550_LCM\Middlewares\ST\touchgfx\lib\core\cortex_m7\gcc" --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -u _printf_float -Wl,--start-group -lc -lm -lstdc++ -lsupc++ -Wl,--end-group
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.
undefined reference to `TouchGFX_Task
2025-07-14 4:51 AM
Hello @miker ,
This looks like an include error.
Since you are creating a custom project, you must include the correct files and libraries.
Please, have a look at a working project and the different includes required.
Regards,
2025-07-14 5:48 AM
after generating code from CubeMX you should not try to build directly... before building you must generate a code from TouchGFX designer.