Skip to main content
Krautermann
Senior
April 25, 2023
Question

TouchGFX Designer 4.21.3: gcc/makefile_cm7:368: recipe for target 'generate_assets' failed makefile_cm7:49: recipe for target 'all' failed ../../gcc/Makefile:10: recipe for target 'flash' failed

  • April 25, 2023
  • 14 replies
  • 3731 views

I just installed TouchGFX Designer 4.21.3 yesterday and now whenever I try to run simulator or run target I get these errors:

 gcc/makefile_cm7:403: recipe for target 'CM7/TouchGFX/build/STM32H745I_DISCO/CM7/TouchGFX/gui/src/main_screen/mainView.o' failed
 make[3]: *** [CM7/TouchGFX/build/STM32H745I_DISCO/CM7/TouchGFX/gui/src/main_screen/mainView.o] Error 1
 make[3]: Leaving directory 'c:/Users/o.sang/Documents/TouchGFX/MyApplication_3'
 gcc/makefile_cm7:368: recipe for target 'generate_assets' failed
 make[2]: *** [generate_assets] Error 2
 make[2]: Leaving directory 'c:/Users/o.sang/Documents/TouchGFX/MyApplication_3'
 makefile_cm7:49: recipe for target 'all' failed
 make[1]: *** [all] Error 2
 make[1]: Leaving directory 'C:/Users/o.sang/Documents/TouchGFX/MyApplication_3/gcc'
 ../../gcc/Makefile:10: recipe for target 'flash' failed
 make: *** [flash] Error 2
 Failed
 Failed

I check other posts in the ST community but there were no answers to solve my problem. I used STM32 Programmer and was able to connect with my STM32H745I-disco board, so ST-Link is working fine!

This is my configuration for the build:


_legacyfs_online_stmicro_images_0693W00000bilnzQAA.pngCould someone please help solve this problem?

This topic has been closed for replies.

14 replies

Osman SOYKURT
ST Technical Moderator
April 25, 2023

Hello Krautermann,

I've tried on my side to run a project based on the  STM32H745I-disco board and it works fine both on the simulator and on target.

Your build configuration looks ok to me (doesn't seems that you changed from the default value did you?). Also, have you tried with an empty project?

/Osman

ST Software Developer | TouchGFX
Krautermann
Senior
April 26, 2023

Hi @Osman SOYKURT​ 

I did not change anything in the build configuration. I do not dare to touch these, because I know something bad will happen.

I have tried with another new project and it works fine. Actually the problem still exists. I opened a demo example and try to run it on target and the same problem occurs. This error about recipe for target 'all' failed has happened multiple times since I started using TouchGFX. And I am sure that I will face this problem again in the future, therefore a solution to this problem will be highly appreciated! :pensive_face: Any advice?

Osman SOYKURT
ST Technical Moderator
April 26, 2023

Hello Krautermann,

Something might get wrong when you generate code, but I'm not sure. Can you send me your project? I'll try it on my computer (trying to figure out if it's your "environment" which causes the issue, or if it's the project itself).

/Osman

ST Software Developer | TouchGFX
Krautermann
Senior
April 26, 2023

I opened a new project, a demo example for the STM32H745I Disco board: Smart home demo and I get the same problem again!

gcc/makefile_cm7:368: recipe for target 'generate_assets' failed

makefile_cm7:49: recipe for target 'all' failed

../../gcc/Makefile:10: recipe for target 'flash' failed

Pavel A.
April 26, 2023

Of course, recipe for target 'flash' failed, because the executable has not been created.

Something went wrong with compilation or gcc failed to start.

Are there any error messages from gcc or a log file?

Krautermann
Senior
April 27, 2023

@Pavel A.​ See reply below now, I hope this answers your question.

I don't know why I keep getting error at either run target or simulation from time to time on each different project.

Osman SOYKURT
ST Technical Moderator
April 27, 2023

Hello Krautermann,

I've tried the project you sent me, but it did work on my side. So, I'm suspecting maybe an issue with your environment. Which version of Windows do you use? Can you send me the full log when you try to run on target + when you run on simulator.

Also, could you send us your log file located at: C:\Users\YOUR_USE_NAME\AppData\Roaming\TouchGFX-4.21.3\TouchGFXDesigner

/Osman

ST Software Developer | TouchGFX
Krautermann
Senior
April 27, 2023

@Osman SOYKURT​ 

Log from Run Simulator:

Run Simulator
 Generate
 Done
 Generate Assets
 make -f simulator/gcc/Makefile assets -j8
 Reading ./application.config
 Reading ./target.config
 Done
 Post Generate
 touchgfx update_project --project-file=simulator/msvs/Application.vcxproj
 Done
 Post Generate Target
 touchgfx update_project
 .cproject file: ../../STM32CubeIDE/CM7/.cproject
 Writing STM32CubeIDE project file: ../../STM32CubeIDE/CM7/.project
 Writing STM32CubeIDE project file: ../../STM32CubeIDE/CM7/.cproject
 Done
 Compile
 make -f simulator/gcc/Makefile -j8
 Reading ./application.config
 Reading ./target.config
 Compiling gui/src/screen1_screen/Screen1View.cpp
 gui/src/screen1_screen/Screen1View.cpp:2:10: fatal error: stm32h7xx_hal.h: No such file or directory
 #include "stm32h7xx_hal.h"
 ^~~~~~~~~~~~~~~~~
 compilation terminated.
 generated/simulator/gcc/Makefile:196: recipe for target 'build/MINGW32_NT-6.2/gui/src/screen1_screen/Screen1View.o' failed
 make[2]: *** [build/MINGW32_NT-6.2/gui/src/screen1_screen/Screen1View.o] Error 1
 generated/simulator/gcc/Makefile:155: recipe for target 'generate_assets' failed
 make[1]: *** [generate_assets] Error 2
 simulator/gcc/Makefile:32: recipe for target 'all' failed
 make: *** [all] Error 2
 Failed
 Failed

Krautermann
Senior
May 2, 2023

Problem appears in touchgfx example as well. Trying to run target for Smart Home example on my STM32H745I Disco board but it's giving out recipe for target '_clean_' failed and so on...