cancel
Showing results for 
Search instead for 
Did you mean: 

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

MM..1
Chief III

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?

1 ACCEPTED SOLUTION

Accepted Solutions
MM..1
Chief III

@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.

View solution in original post

11 REPLIES 11
Alexandre RENOUX
Principal

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
Chief III

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
Chief III

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
Chief III

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
Principal

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

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.

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

 Directory of c:\TouchGFXProjects\Testroj_TouchGFX
 
19.11.2020  20:04    <DIR>          .
19.11.2020  20:04    <DIR>          ..
19.11.2020  20:09            43 435 .cproject
19.11.2020  20:04            19 871 .mxproject
19.11.2020  19:56             1 358 .project
16.12.2020  17:58    <DIR>          .settings
10.11.2020  13:02    <DIR>          Core
19.11.2020  20:08    <DIR>          Debug
10.11.2020  13:02    <DIR>          Drivers
10.11.2020  13:02    <DIR>          Middlewares
19.11.2020  20:04            26 371 Nu-MENU_TouchGFX.ioc
28.10.2020  08:49             7 524 Testproj_TouchGFX Debug.launch
19.11.2020  20:04             4 671 STM32F429ZITX_FLASH.ld
06.07.2020  11:21             4 671 STM32F429ZITX_FLASH.ld.boot
28.10.2020  09:51             4 671 STM32F429ZITX_FLASH.ld.orig
27.10.2020  11:22             4 637 STM32F429ZITX_RAM.ld
19.11.2020  20:04    <DIR>          TouchGFX

This is unsorted dirlist for standart CubeIDE created project, and here exist only 3 files named makefile. Two is in simulator dirs and one in Debug.

Alexandre really try to do , what i wrote . Your gcc is simulator for windows and real project on hardware is my thread.

I repeat for you how to replicate my error:

  1. Create CubeIDE project with touchgfx, an simple design
  2. Build it in IDE without errors and close IDE
  3. Open only TouchGFX file and in project config now only fill target compile with  : cd ../Debug && make all -j8
  4. Fill flash target with : REM now run target button is enabled
  5. Click Run target now is compiled green ok
  6. Add one new image to design
  7. Click Run target and you see error , that i need solve

As mentioned in my previous answer, please enclose the makefile you are using. Even your entire project if not too big.

This is the easiest way.

/Alexandre