2025-03-04 10:02 AM
Hi Gfx Team,
Could you consider adding an option to build code without running.
Thanks
Solved! Go to Solution.
2025-03-05 1:29 AM
Hello @ferro ,
I don't think we will implement this functionality because you can simply click the Program and Run Target button (bottom right) and not connect your board so that it will compile the code but fail at the beginning of the flashing process.
The processes are Generate, Generate assets (sometimes the longest), Post generate, Post generate target, Compile (often the longest), Flash.
If you do not connect a board, STM32CubeProgrammer will not be able to find a STLink connected and the flashing step will quickly fail :
Flash
make -f ../../gcc/Makefile flash
make -C PATHTOTHEPROJECT/MyApplication/gcc/ --no-print-directory -f makefile_boot flash
Linking Boot/TouchGFX/build/bin/target.elf
Producing additional output formats...
target.hex - Combined internal+external hex
intflash.elf - Internal flash, elf debug
intflash.hex - Internal flash, hex
-------------------------------------------------------------------
STM32CubeProgrammer v2.18.0
-------------------------------------------------------------------
Error: No debug probe detected.
PATHTOTHEPROJECT/MyApplication/gcc/include/flash_sections_int_ext.mk:10: recipe for target '_intflash_' failed
make[2]: *** [_intflash_] Error 1
makefile_boot:45: recipe for target 'flash' failed
make[1]: *** [flash] Error 2
../../gcc/Makefile:8: recipe for target 'flash' failed
make: *** [flash] Error 2
Failed
Failed
Regards,
2025-03-05 1:29 AM
Hello @ferro ,
I don't think we will implement this functionality because you can simply click the Program and Run Target button (bottom right) and not connect your board so that it will compile the code but fail at the beginning of the flashing process.
The processes are Generate, Generate assets (sometimes the longest), Post generate, Post generate target, Compile (often the longest), Flash.
If you do not connect a board, STM32CubeProgrammer will not be able to find a STLink connected and the flashing step will quickly fail :
Flash
make -f ../../gcc/Makefile flash
make -C PATHTOTHEPROJECT/MyApplication/gcc/ --no-print-directory -f makefile_boot flash
Linking Boot/TouchGFX/build/bin/target.elf
Producing additional output formats...
target.hex - Combined internal+external hex
intflash.elf - Internal flash, elf debug
intflash.hex - Internal flash, hex
-------------------------------------------------------------------
STM32CubeProgrammer v2.18.0
-------------------------------------------------------------------
Error: No debug probe detected.
PATHTOTHEPROJECT/MyApplication/gcc/include/flash_sections_int_ext.mk:10: recipe for target '_intflash_' failed
make[2]: *** [_intflash_] Error 1
makefile_boot:45: recipe for target 'flash' failed
make[1]: *** [flash] Error 2
../../gcc/Makefile:8: recipe for target 'flash' failed
make: *** [flash] Error 2
Failed
Failed
Regards,
2025-03-05 2:50 AM
Thanks @GaetanGodart
"you can simply click the Program and Run Target button"
I do not have a board, I run Simulation only. 'Program Run' is therefore not avaialable.
"simply click the Program and Run Target button (bottom right) and not connect your board"
I think this is not user friendly - all I want to do is build application.exe, see if it links. Not interested in running simulation not flashing.
I'll accept your answer, please reconsider. Thanks.
2025-03-05 8:13 AM
It makes sense that we are not allowed to compile if we don't know the target because to compile we need the know the hardware family to get the right generated files (TouchGFXGeneratedSTM32H7xx.hpp and things like that).
I understand that you want to see if your code (in GUI folder) will compile.
To do so, you can create your project on a TBS to be able to compile.
When you want to go back to a simulator (or choose another TBS, perhaps one that you made), you can just create your new project and go to Edit => Import => GUI and select the project you created.
Regards,
2025-03-05 9:19 AM
I dont need my project to run on HW, I start from Simuator template which is running on only PC. In this case 'Program Run target' is not active, Simulator has no concept of MCU, of course.
Sorry, what you said in 2nd part is something advanced, not my workflow. But thanks, might be useful soon:
"I understand that you want to see if your code (in GUI folder) will compile.
To do so, you can create your project on a TBS to be able to compile...."
2025-03-06 2:07 AM
Hello @ferro ,
If you run simulator it will compile your files in the GUI folder (where you have your code for your screens and custom containers) so you will see if there are errors or not in these files.
You said "see if it links", when running the simulator, TouchGFX will compile, then link then run the exe, so you will see if it links when you run the simulator :
So in my opinions, you do not even need the Program and Run Target button (I said otherwise previously, sorry).
Regarding the second part, I was just referring to the feature to import a GUI design from a project to another. This way you could import your design (and code) to a project with a hardware configuration.
Regards,
2025-03-06 2:53 AM - edited 2025-03-06 2:53 AM
Thanks @GaetanGodart
"TouchGFX will compile, then link then run the exe"
Yes, and what i suggest, is to stop at 'Linking' stage, do not execute 'Run'. Functionality of Ctrl+B in CubeIDE or MSVC.
2025-03-07 4:08 AM
Hello @ferro ,
Ok, so at the beginning I thought you wanted to compile and build the full application but you seem to only care about the GUI part since you are fine with just building the simulator part.
So your request would be to have a button to do the same thing as the Run simulator button but stopping after the linking.
I don't think this request would have a positive answer because there is a quick workaround that is to just run the simulator and then close the simulator. This way you will compile and link as you want but you will also have to wait a few seconds to finish the simulator build and for it to start. The drawback of this method (waiting a few seconds) to achieve the same result is probably not enough for me to push a new button.
I am sorry I cannot give you a positive answer on that.
Regards,
2025-03-07 6:43 AM
"you seem to only care about [...] building the simulator part"
Correct.
"[...] probably not enough for me to push a new button"
No button needed. I never use them - too much effort to move the mouse. Always F-keys, always. Mapping F3 (or Ctrl+B) to "stop after link" feature would be good enough.
"I am sorry I cannot give you a positive answer on that."
No problem at all @GaetanGodart , thanks for considering.
2025-03-07 7:01 AM - edited 2025-03-08 3:31 AM
You can build the project in Visual Studio. The benefit is that you can also debug the project.