2025-01-18 01:21 AM
I started to getting this error from touchgfx after I added an Event throught CubeMX. As you can see from the messages, this is exactly what the errors are about.
Compiling Core/Src/main.c
Linking TouchGFX/build/bin/target.elf
TouchGFX/build/STM32F429IDISCO/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2/cmsis_os2.o: In function `osEventFlagsNew':
d:\ST\Projects\GameSnake/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2/cmsis_os2.c:1135: undefined reference to `xEventGroupCreateStatic'
d:\ST\Projects\GameSnake/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2/cmsis_os2.c:1141: undefined reference to `xEventGroupCreate'
collect2.exe: error: ld returned 1 exit status
gcc/Makefile:298: recipe for target 'TouchGFX/build/bin/target.elf' failed
make[2]: *** [TouchGFX/build/bin/target.elf] Error 1
gcc/Makefile:294: recipe for target 'generate_assets' failed
make[1]: *** [generate_assets] Error 2
../gcc/Makefile:50: recipe for target 'all' failed
make: *** [all] Error 2
Failed
Solved! Go to Solution.
2025-01-18 08:43 AM
I understood. You included in makefile all os_source files except event_groups.c. Why? The devil knows. So right version of makefile is:
os_source_files := \
$(cubemx_os_path)/Source/croutine.c \
$(cubemx_os_path)/Source/list.c \
$(cubemx_os_path)/Source/queue.c \
$(cubemx_os_path)/Source/tasks.c \
$(cubemx_os_path)/Source/timers.c \
$(cubemx_os_path)/Source/event_groups.c \
$(cubemx_os_path)/Source/CMSIS_RTOS_V2/cmsis_os2.c
2025-01-18 08:43 AM
I understood. You included in makefile all os_source files except event_groups.c. Why? The devil knows. So right version of makefile is:
os_source_files := \
$(cubemx_os_path)/Source/croutine.c \
$(cubemx_os_path)/Source/list.c \
$(cubemx_os_path)/Source/queue.c \
$(cubemx_os_path)/Source/tasks.c \
$(cubemx_os_path)/Source/timers.c \
$(cubemx_os_path)/Source/event_groups.c \
$(cubemx_os_path)/Source/CMSIS_RTOS_V2/cmsis_os2.c