Skip to main content
Associate III
December 4, 2025
Question

Generate Code & Run Simulator Fail

  • December 4, 2025
  • 8 replies
  • 1728 views

I have come back to TouchGFXDesigner after not using it for about 6 months. I have updated to 4.26.0 and created a new blank project for the STM32H747I-DISCO board. When trying to generate code, I get the following error message:

Generate Code
Generate
Done
Generate Assets
make -f simulator/gcc/Makefile assets -j8
'M' is not recognized as an internal or external command,
operable program or batch file.
Failed
Failed

Looking through the Makefile, I can't see anywhere that this 'M' would be generated, and make isn't overridden in my environment variables.

8 replies

mƎALLEm
Technical Moderator
December 4, 2025

Hello,

I've just created a blank TouchGFX project starting from STM32H747I-DISCO, generated the code and didn't face any issue (I'm using TouchGFX 4.26 + CubeMx 6.16). This is the log I had:

Generate Code
 Copy Framework
 Copying TouchGFX framework version 4.26.0 to C:\TouchGFXProjects\STM32H747I-DISCO\CM7\Middlewares\ST\touchgfx
 Done
 Generate
 Wrote config/gcc/app.mk
 Wrote config/msvs/Application.props
 Wrote generated/gui_generated/include/gui_generated/common/FrontendApplicationBase.hpp
 Wrote generated/gui_generated/include/gui_generated/common/FrontendHeapBase.hpp
 Wrote generated/gui_generated/include/gui_generated/common/SimConstants.hpp
 Wrote generated/gui_generated/include/gui_generated/screen1_screen/Screen1ViewBase.hpp
 Wrote generated/gui_generated/src/common/FrontendApplicationBase.cpp
 Wrote generated/gui_generated/src/screen1_screen/Screen1ViewBase.cpp
 Wrote generated/simulator/gcc/Makefile
 Wrote generated/simulator/include/simulator/mainBase.hpp
 Wrote generated/simulator/include/simulator/video/DirectFrameBufferVideoController.hpp
 Wrote generated/simulator/include/simulator/video/MJPEGDecoder.hpp
 Wrote generated/simulator/include/simulator/video/SoftwareMJPEGDecoder.hpp
 Wrote generated/simulator/msvs/touchgfx_prebuild.targets
 Wrote generated/simulator/msvs/touchgfx_sdl2.props
 Wrote generated/simulator/msvs/touchgfx.props
 Wrote generated/simulator/src/mainBase.cpp
 Wrote generated/simulator/src/video/SoftwareMJPEGDecoder.cpp
 Wrote generated/simulator/touchgfx.ico
 Wrote generated/simulator/touchgfx.rc
 Wrote generated/simulator/touchgfx.res
 Wrote generated/user.config
 Wrote gui/include/gui/common/FrontendApplication.hpp
 Wrote gui/include/gui/common/FrontendHeap.hpp
 Wrote gui/include/gui/model/Model.hpp
 Wrote gui/include/gui/model/ModelListener.hpp
 Wrote gui/include/gui/screen1_screen/Screen1Presenter.hpp
 Wrote gui/include/gui/screen1_screen/Screen1View.hpp
 Wrote gui/src/common/FrontendApplication.cpp
 Wrote gui/src/model/Model.cpp
 Wrote gui/src/screen1_screen/Screen1Presenter.cpp
 Wrote gui/src/screen1_screen/Screen1View.cpp
 Wrote simulator/gcc/Makefile
 Wrote simulator/main.cpp
 Wrote simulator/msvs/Application.sln
 Wrote simulator/msvs/Application.vcxproj
 Wrote simulator/msvs/Application.vcxproj.filters
 Wrote target.config
 Done
 Generate Assets
 make -f simulator/gcc/Makefile assets -j8
 Reading ./application.config
 Reading ./target.config
 Generating generated/images/include/BitmapDatabase.hpp
 Generating generated/images/include/images/BitmapDatabase.hpp
 Generating generated/images/src/BitmapDatabase.cpp
 Generating generated/images/include/images/SVGDatabase.hpp
 Generating generated/images/src/SVGDatabase.cpp
 Generating generated/videos/include/videos/VideoDatabase.hpp
 Cleaning generated files from generated/texts and generated/fonts.
 Generating generated/fonts/include/fonts/GeneratedFont.hpp
 Generating generated/fonts/src/GeneratedFont.cpp
 Generating generated/fonts/include/fonts/UnmappedDataFont.hpp
 Generating generated/fonts/src/UnmappedDataFont.cpp
 Generating generated/fonts/include/fonts/CachedFont.hpp
 Generating generated/fonts/src/CachedFont.cpp
 Generating generated/fonts/include/fonts/FontCache.hpp
 Generating generated/fonts/src/FontCache.cpp
 Generating generated/fonts/src/CompressedFontCache.cpp
 Generating generated/fonts/src/CompressedUnmappedFontCache.cpp
 Generating generated/fonts/include/fonts/CompressedFontCache.hpp
 Generating generated/fonts/include/fonts/CompressedUnmappedFontCache.hpp
 Generating generated/fonts/src/ApplicationFontProvider.cpp
 Generating generated/fonts/include/fonts/ApplicationFontProvider.hpp
 Generating generated/texts/include/texts/TextKeysAndLanguages.hpp
 Generating generated/texts/include/texts/TypedTextDatabase.hpp
 Generating generated/texts/src/TypedTextDatabase.cpp
 Generating generated/texts/src/Texts.cpp
 Generating generated/texts/src/LanguageGb.cpp
 Generating generated/fonts/src/Font_verdana_10_4bpp_0.cpp
 Generating generated/fonts/src/Table_verdana_10_4bpp.cpp
 Generating generated/fonts/src/Kerning_verdana_10_4bpp.cpp
 Generating generated/fonts/src/Font_verdana_20_4bpp_0.cpp
 Generating generated/fonts/src/Table_verdana_20_4bpp.cpp
 Generating generated/fonts/src/Kerning_verdana_20_4bpp.cpp
 Generating generated/fonts/src/Font_verdana_40_4bpp_0.cpp
 Generating generated/fonts/src/Table_verdana_40_4bpp.cpp
 Generating generated/fonts/src/Kerning_verdana_40_4bpp.cpp
 Generating generated/fonts/src/VectorFontRendererBuffers.cpp
 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
 Done
"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."
Iris-DMAuthor
Associate III
December 4, 2025

Ok so my issue is occurring during the Generate Assets step - specifically between the make command and reading application.config

 

Generate Assets
 make -f simulator/gcc/Makefile assets -j8
 Reading ./application.config

 I have to assume at some point, a path is being incorrectly parsed, or a command overwritten to give us a standalone M in whatever command environment TouchGFX is using to run the makefile/generation script. How can I narrow down where this is?

mƎALLEm
Technical Moderator
December 4, 2025

I'm not expert of TouchGFX but what CubeMx are you using? the latest version 6.16? 

If you have a doubt about the path try to change the path and try with a short path ..

"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."
Iris-DMAuthor
Associate III
December 4, 2025

I've shortened the path with a new project and still get the same error - using CubeMX 6.16

Generate Code
 Copy Framework
 Copying TouchGFX framework version 4.26.0 to H:\TouchGFX\Projects\MyApplication\CM7\Middlewares\ST\touchgfx
 Done
 Generate
 Wrote config/gcc/app.mk
 Wrote config/msvs/Application.props
 Wrote generated/gui_generated/include/gui_generated/common/FrontendApplicationBase.hpp
 Wrote generated/gui_generated/include/gui_generated/common/FrontendHeapBase.hpp
 Wrote generated/gui_generated/include/gui_generated/common/SimConstants.hpp
 Wrote generated/gui_generated/include/gui_generated/screen1_screen/Screen1ViewBase.hpp
 Wrote generated/gui_generated/src/common/FrontendApplicationBase.cpp
 Wrote generated/gui_generated/src/screen1_screen/Screen1ViewBase.cpp
 Wrote generated/simulator/gcc/Makefile
 Wrote generated/simulator/include/simulator/mainBase.hpp
 Wrote generated/simulator/include/simulator/video/DirectFrameBufferVideoController.hpp
 Wrote generated/simulator/include/simulator/video/MJPEGDecoder.hpp
 Wrote generated/simulator/include/simulator/video/SoftwareMJPEGDecoder.hpp
 Wrote generated/simulator/msvs/touchgfx_prebuild.targets
 Wrote generated/simulator/msvs/touchgfx_sdl2.props
 Wrote generated/simulator/msvs/touchgfx.props
 Wrote generated/simulator/src/mainBase.cpp
 Wrote generated/simulator/src/video/SoftwareMJPEGDecoder.cpp
 Wrote generated/simulator/touchgfx.ico
 Wrote generated/simulator/touchgfx.rc
 Wrote generated/simulator/touchgfx.res
 Wrote generated/user.config
 Wrote gui/include/gui/common/FrontendApplication.hpp
 Wrote gui/include/gui/common/FrontendHeap.hpp
 Wrote gui/include/gui/model/Model.hpp
 Wrote gui/include/gui/model/ModelListener.hpp
 Wrote gui/include/gui/screen1_screen/Screen1Presenter.hpp
 Wrote gui/include/gui/screen1_screen/Screen1View.hpp
 Wrote gui/src/common/FrontendApplication.cpp
 Wrote gui/src/model/Model.cpp
 Wrote gui/src/screen1_screen/Screen1Presenter.cpp
 Wrote gui/src/screen1_screen/Screen1View.cpp
 Wrote simulator/gcc/Makefile
 Wrote simulator/main.cpp
 Wrote simulator/msvs/Application.sln
 Wrote simulator/msvs/Application.vcxproj
 Wrote simulator/msvs/Application.vcxproj.filters
 Wrote target.config
 Done
 Generate Assets
 make -f simulator/gcc/Makefile assets -j8
 'M' is not recognized as an internal or external command,
 operable program or batch file.
 Failed
 Failed

 

mƎALLEm
Technical Moderator
December 4, 2025

Hello,

Is that possible to zip and attach that project so I can test it and if I could reproduce the bahavior?

"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."
Iris-DMAuthor
Associate III
December 4, 2025

No problem - attached

mƎALLEm
Technical Moderator
December 4, 2025

Meanwhile,  the upload is stuck in (Virus scan in progress ...) :\ ! The issue is seen yesterday!

Refer to this thread.

"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."
Iris-DMAuthor
Associate III
December 4, 2025

OK. In the meantime, can you find out which file/script is called when the generate file button is pressed? I'll see if I can trace through to see where the issue occurs.

mƎALLEm
Technical Moderator
December 4, 2025

@Iris-DM wrote:

OK. In the meantime, can you find out which file/script is called when the generate file button is pressed? I'll see if I can trace through to see where the issue occurs.


@JohanAstrup if you could help on this please..
"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."
Iris-DMAuthor
Associate III
December 4, 2025

I can compile via the TouchGFX environment if I call:
$ make -f simulator/gcc/Makefile -j6
$ touchgfx update_project --project-file=simulator/msvs/Application.vcxproj
$ touchgfx update_project

But TouchGFX Designer still gives me the 'M' is not recognized as an internal or external command error for the same process

Osman SOYKURT
Technical Moderator
December 8, 2025

Hello @Iris-DM ,

Could you confirm me that the version of the TBS  that you use is 3.0.19? 

OsmanSOYKURT_0-1765197114051.png

 

Can you confirm you haven't added any changes and it's just a blank UI?

Osman SOYKURTST Software Developer | TouchGFX
Iris-DMAuthor
Associate III
December 9, 2025

Yes I can confirm all of this. Also that the project compiles through the TouchGFX environment, but not from within designer itself.

Osman SOYKURT
Technical Moderator
December 17, 2025

Hello @Iris-DM ,

Sorry for the delay, there was some issue with downloading attached files the last couple of days. But now I have downloaded your project and tested that on my STM32H747I-DISCO board. No issue.
I assume it's something that comes from your computer. Could you try on another computer if you still have the issue?
Do you have any antivirus that might be blocking TouchGFX Designer from running certain processes? I’m asking because another user recently encountered a similar issue.

Osman SOYKURTST Software Developer | TouchGFX