Skip to main content
MM..1
Chief III
November 6, 2020
Solved

How to add FlashTargetCommand entry to TouchGFX project created in CubeMX - IDE.

  • November 6, 2020
  • 6 replies
  • 2179 views

Generator create this part not exist in touchgfx project file. But is fine have it here for direct compile and flash. Why this isnt used? Howto add make ... flash here manualy?

This topic has been closed for replies.
Best answer by MM..1

@Alexandre RENOUX​ i save your time, solution for my problem is change Compile Target command to :

cd c:\ST\STM32CubeIDE_1.1.0\STM32CubeIDE\ && headless-build.bat -project Ex_ST_DSI/Debug -workspace C:\Users\Public\CubeWorkspace -build -console

++folders need be changed to user installed places,

but installed CubeIDE is required. I still see idea to TouchGFX implement functional compile and flash, hope developers do it.

6 replies

Alexandre RENOUX
Visitor II
November 10, 2020

Hello,

2 solutions :

  • Edit .touchgfx file
  • In Designer, go to Config -> Build -> Flash Target Command

Simply create an Application Template from TouchGFX and copy paste this section. All Application templates have this correctly set and it does not change depending on the board/project.

When your question is answered, please close this topic by choosing Select as Best.

/Alexandre

MM..1
MM..1Author
Chief III
November 10, 2020

Hmm Alexandra i ask howto not where, i ofcourse know where i can write commands, but IDE makefile i mean isnt able use flash ...

Your reply is unusable

MM..1
MM..1Author
Chief III
November 21, 2020

I solve this with enter to

Compile target command : cd ../Debug && make all -j8

and flash target command i create external cmd file, because write /\ here is little complicated , use any flash cli utility to load hex

place file to same directory as .touchgfx and enter name to

Flash Target Command : flashit.cmd

Thats all.

MM..1
MM..1Author
Chief III
December 15, 2020

I test it more , but work only when no files is added to project. Then here we need better solution.

Now only flash over IDE work.

Alexandre RENOUX
Visitor II
December 16, 2020

Hello MM..1,

If you are talking about the fact that you cannot "Run Target" from TouchGFX Designer when creating your own project from CubeMX. This is normal and my previous answer should solve your problem.

If you are talking about something else, sorry please elaborate because unfortunately, I still don't understand your point.

/Alexandre

MM..1
MM..1Author
Chief III
December 16, 2020

No i talk about Compile target command : cd ../Debug && make all -j8

My project is created in IDE as new from zero. Then choice MCU and in MX plugin configure all plus touchgfx.

Then Touchgfx have Target parts empty, but editable. And i need for graphic designer create environment withour IDE use for flash and run target on real hardware. All this now work with up command, but when designer add font or image or anything, that generates new cpp files, then make all get error, because in debug subdirs mk files isnt updated by TouchGFX. Now i hope you understand.

Alexandre RENOUX
Visitor II
December 17, 2020

Why do you not want to use the makefile in /gcc folder ? There's nothing related to CubeIDE inside. It uses gcc to compile that is all.

Your intention and why you think the current Run Target option is a problem, is blurry to me.

If you are talking about flashing, when using external memories, you need to use CubeProgrammer with external loader to flash the assets (texts, images, ...) in external memory.

You talk about ../Debug but what is the complete path of this folder ?

make should work if you are in the correct folder including the makefile.

If you actually use the correct makefile and you have these errors, please specify the exact steps you did. Enclosing the makefile to your answer can also help.

/Alexandre

MM..1
MM..1AuthorBest answer
Chief III
December 19, 2020

@Alexandre RENOUX​ i save your time, solution for my problem is change Compile Target command to :

cd c:\ST\STM32CubeIDE_1.1.0\STM32CubeIDE\ && headless-build.bat -project Ex_ST_DSI/Debug -workspace C:\Users\Public\CubeWorkspace -build -console

++folders need be changed to user installed places,

but installed CubeIDE is required. I still see idea to TouchGFX implement functional compile and flash, hope developers do it.