cancel
Showing results for 
Search instead for 
Did you mean: 

Build Error in STM32H747-DISCO Project with TouchGFX, CubeMX, and FreeRTOS

Kenwang
Associate III

Hi all,
I encountered a build error while developing a TouchGFX project for the STM32H747-DISCO board. I followed these steps:

Steps to Reproduce:

  1. Create a TouchGFX Project:

    • Used TouchGFX Environment on Windows to generate an empty STM32H747-DISCO project.

    • Added a background image and an Analog Clock.

    • Set the initial time of the clock to 00:00:00.

    • Clicked "Generate Code".

  2. Modify the Project in STM32CubeMX:

    • Opened the project directory.

    • Used STM32CubeMX v6.14.0 to open the CubeMX project file.

    • Added the following peripherals:

      • CM4: RTC, OpenAMP, FreeRTOS

      • CM7: OpenAMP

    • Clicked "Generate Code" again.

  3. Build in STM32CubeIDE:

    • Opened the project in STM32CubeIDE v1.18.0.

    • Attempted to build the CM7 project.

    • Encountered the following build error:

Build Error Output:

15:24:38 **** Incremental Build of configuration Debug for project STM32H747I-DISCO_CM7 ****
make all
arm-none-eabi-g++ -o "STM32H747I-DISCO_CM7.elf" @"objects.list"  -l:libtouchgfx-float-abi-hard.a -mcpu=cortex-m7 -T"D:\TouchGFX_Project\STM32H7_RTC_Clock\STM32CubeIDE\CM7\STM32H747XIHX_FLASH.ld" --specs=nosys.specs -Wl,-Map="STM32H747I-DISCO_CM7.map" -Wl,--gc-sections -static -L../../../CM7/Middlewares/ST/touchgfx/lib/core/cortex_m7/gcc --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -lstdc++ -lsupc++ -Wl,--end-group
...
D:/TouchGFX_Project/STM32H7_RTC_Clock/STM32CubeIDE/CM7/Debug/../../CM7/../../CM7/TouchGFX/generated/gui_generated/include/gui_generated/common/FrontendHeapBase.hpp:76:(.text._ZN16FrontendHeapBase15gotoStartScreenER19FrontendApplication[_ZN16FrontendHeapBase15gotoStartScreenER19FrontendApplication]+0x2): undefined reference to `FrontendApplicationBase::gotoScreen1ScreenNoTransition()'
...
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:101: STM32H747I-DISCO_CM7.elf] Error 1
"make all" terminated with exit code 2. Build might be incomplete.
15:24:38 Build Failed. 10 errors, 1 warnings. (took 532ms)

Questions:

  1. Why am I getting "undefined reference" errors related to TouchGFX components?

  2. Could this be an issue with the integration of CubeMX and TouchGFX?

  3. Is there a recommended workflow to correctly integrate FreeRTOS, OpenAMP, and RTC with TouchGFX?

  4. Do I need to manually add missing TouchGFX files or update any settings in CubeIDE?

I would appreciate any suggestions or solutions to resolve this build issue. Thanks!

2 REPLIES 2
Souhaib MAZHOUD
ST Employee

Hello @Kenwang 

Could you attach your ioc file so we can investigate the issue?

KR, Souhaib

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.

Kenwang
Associate III

Hi KR,

ioc file is atttached.