cancel
Showing results for 
Search instead for 
Did you mean: 

Error "Run Simulator"

TechnicalPBG2025
Associate III

Hello,

I'm working on a project in the TouchGFX Designer environment and when I try to execute the "Run Simulator" command, this error occurs.

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 Linking build/bin/simulator.exe C:/TouchGFX/4.25.0/env/MinGW/bin/../lib/gcc/i686-w64-mingw32/7.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lSDL2 C:/TouchGFX/4.25.0/env/MinGW/bin/../lib/gcc/i686-w64-mingw32/7.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lSDL2_image collect2.exe: error: ld returned 1 exit status generated/simulator/gcc/Makefile:160: recipe for target 'build/bin/simulator.exe' failed make[2]: *** [build/bin/simulator.exe] 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
View more

How can I solve this problem?

5 REPLIES 5
nico23
Senior II

I had a similar error on SDL2 compilation. Sometimes it messes up during compilation/build and returns this error.

I usually fix cleaning up the build folder in TouchGFX and then rebuild the whole project within TouchGFX

GaetanGodart
ST Employee

Hello @TechnicalPBG2025 ,

 

When you add code or logs to your post, I invite you to use the "Insert code" button to keep everything clean.
I have modified your previous post to properly insert code.

 

I am not sure what is causing the issue, your TouchGFX should be able to find the SDL files.

Does it happens on every project you create or just this one?

Can you share your full project?

Did you do something special to your computer?

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

Hi @GaetanGodart,

I managed to solve the problem of the SDL2.dll and SDL2_image.dll libraries, I saw that they were missing in my project.

I only have this problem in this project.

Now I tried to relaunch the simulation but it generates another error:

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 Linking build/bin/simulator.exe build/MINGW32_NT-6.2/touchgfx/framework/source/platform/hal/simulator/sdl2/HALSDL2.o:HALSDL2.cpp:(.rdata$_ZTVN8touchgfx7HALSDL2E[__ZTVN8touchgfx7HALSDL2E]+0xa0): undefined reference to `touchgfx::HAL::configurePartialFrameBufferLTDC(short)' collect2.exe: error: ld returned 1 exit status make[2]: *** [build/bin/simulator.exe] Error 1 generated/simulator/gcc/Makefile:160: recipe for target 'build/bin/simulator.exe' failed 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
View more

 

 

Hello @TechnicalPBG2025 ,

 

I don't really know what the issue is here, we should look at what is in line 160 and 155 but also it looks like it is the wrong SDL file.

However, I think the simplest way to fix your project here is to create a new one and to import your GUI from the current project by selecting Edit => Import => GUI.

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

Hello @TechnicalPBG2025 ,

 

Have you been able to move forward on your project?

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)