cancel
Showing results for 
Search instead for 
Did you mean: 

Can you use Touch GFX with make?

MLync.4
Associate II

Hi, I've been trying for a while to put together a simple program that uses both a GUI and an ADC. Previous programs I've made have been built using a text editor and make, but now trying to get toughGFX working in a project, it seems like I need an IDE to make it work. Is that the case?

So far, I've tried 2 different ways to get the project built.

First, I started with a TouchGFX project, got the GUI setup how I want, and generating the code from the TouchGFX Designer app. Then, I would open the CubeMX file and add/configure the ADC and timers and change the toolchain to make in CubeMX and clicking generate code again. I tried for a while to get this to compile, but couldn't figure out how to get all of the dependencies figured out.

Next, I started with CubeMX first, got everything configured as necessary for the ADC, then added the TouchGFX software pack to the project, and selected make as the toolchain again. Then, I went to edit the TouchGFX application file, built my app as I wanted it, and then tried to generate code, but got the following error:

Generate Code
    Generate
        Done
    Generate Assets
        make -f simulator/gcc/Makefile assets -j8
        Reading ./application.config
        Done
    Post Generate
        touchgfx update_project --project-file=simulator/msvs/Application.vcxproj
        Done
    Post Generate Target
        touchgfx update_project --project-file=../ADC2.ioc --platform=m4
        unsupported toolchain: Makefile
        ProjectManager.ToolChainLocation
        Failed
    Failed

So what's the deal here? Is it impossible to use make and TouchGFX together? Am I sort of just forced into using an IDE of some sort? Are there any other GUI apps I can use that do play nice with make?

Sorry if these are dumb questions. I'm a board-level EE trying to get into the embedded world a bit. I have some C++ experience, but not a lot of embedded-specific experience.

9 REPLIES 9
MM..1
Chief II

I dont perfectly understand yours plays with this, but as i write on otger thread, project created and managed only in TouchGFX designer can work and simply is builded alltime with make.

Then when you is beginer use only this and edit existed filles without IDE .

MLync.4
Associate II

Sorry, I don't think I understand what you're saying, but it seems like you're saying a TouchGFX project can be built with make as long as I don't use cubeMX to configure the ADC? Why does it tell me that Makefile is an unsupported toolchain in the output above?

So essentially what you're saying, if I understand you correctly, is that I need to make the project in TouchGFX designer, and then manually edit the files to include everything for running ADC?

MLync.4
Associate II

Just to try it I tried what I think you were suggesting, and just made a simple touchGFX project, generated code from it, and tried to build that code with no modifications made at all. I tried to build this project using the command listed at the following tutorial:

https://support.touchgfx.com/docs/development/ui-development/working-with-touchgfx/compiling-and-flashing

What I got was the following:

malynch@malynch-lt2 MINGW64 /c/TouchGFXProjects/MyApplication_3
$ make -f gcc/Makefile
gcc/Makefile:83: C:/TouchGFXProjects/MyApplication_3/C:/TouchGFXProjects/MyApplication_3/TouchGFX/config/gcc/app.mk: Invalid argument
gcc/Makefile:114: C:/TouchGFXProjects/MyApplication_3/C:/TouchGFXProjects/MyApplication_3/gcc/include/cube_programmer.mk: Invalid argument
gcc/Makefile:283: C:/TouchGFXProjects/MyApplication_3/C:/TouchGFXProjects/MyApplication_3/gcc/include/flash_sections_int.mk: Invalid argument
make: *** No rule to make target `C:/TouchGFXProjects/MyApplication_3/C:/TouchGFXProjects/MyApplication_3/gcc/include/flash_sections_int.mk'.  Stop.
 
malynch@malynch-lt2 MINGW64 /c/TouchGFXProjects/MyApplication_3
$ make -f gcc/Makefile all
gcc/Makefile:83: C:/TouchGFXProjects/MyApplication_3/C:/TouchGFXProjects/MyApplication_3/TouchGFX/config/gcc/app.mk: Invalid argument
gcc/Makefile:114: C:/TouchGFXProjects/MyApplication_3/C:/TouchGFXProjects/MyApplication_3/gcc/include/cube_programmer.mk: Invalid argument
gcc/Makefile:283: C:/TouchGFXProjects/MyApplication_3/C:/TouchGFXProjects/MyApplication_3/gcc/include/flash_sections_int.mk: Invalid argument
make: *** No rule to make target `C:/TouchGFXProjects/MyApplication_3/C:/TouchGFXProjects/MyApplication_3/gcc/include/flash_sections_int.mk'.  Stop.

So..I guess I buy that TouchGFX supports make, but why can even the most basic projects not be built by make? What modifications need to be made to the code or makefile in order to make this work?

After install Designer on your desktop is two shotcuts. One Designer and second command promt envi setup for make.

And here is lines for make : usable directly from GUI...

0693W00000GW0YzQAL.jpgwhen you use command line envi , make need run in right folder as you can see on image.

MLync.4
Associate II

Ok, so I guess I'm still confused here. Isn't the command listed under "Compile Target Command" what I used in my example above? Looking at the TouchGFX Environment, it looks like the primary difference is that their make is version 4.1 while mine is 4.2.1 and their gcc is 7.3.1 20180622 and mine is 10.3.1 20210621. Do I just need to get older versions of the tools to make this work? Otherwise, what is the difference between the environment and my PC? To note: I haven't actually tried to build anything from the environment, since I can't really find a good tutorial on how to actually use it. Opening it from it's location on my system, there's no way to point it to my application to build, and I don't really see any option to give it a location when running.

When I do get that figured out, why would the environment make/gcc toolchain work where mine didn't? Won't the make command just give me the same error that mine did? I'd like to actually understand the issue here, if possible to understand what I can do better in the future.

MM..1
Chief II
TouchGFX MinGW development environment version 4.17.0 for windows
 
===================================================================
 
Refer to local windows drives using the following notation: '/<drive-letter>/'.
To navigate to folder e.g. c:\projects type:
  cd /c/projects
 
To compile and run a TouchGFX example, navigate to application folder.
 
Compile the simulator:
  make -f simulator/gcc/Makefile -j6
 
Finally, run the simulator:
  ./build/bin/simulator.exe
 
marian@PC25 ~
$ cd /c/TouchGFXProjects/testik07/TouchGFX
 
marian@PC25 /c/TouchGFXProjects/testik07/TouchGFX
$ make -f ../gcc/Makefile -j8
Reading TouchGFX/application.config
Linking 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
  extflash.bin - External flash, binary
 
marian@PC25 /c/TouchGFXProjects/testik07/TouchGFX
$

maybe yout toolchain work too, simply cd as instruction say...

MM..1
Chief II

And yes somebody in ST need read docu pages and test if it works as describe

https://support.touchgfx.com/docs/development/ui-development/working-with-touchgfx/compiling-and-flashing

isnt perfectly right... as nothing

Romain DIELEMAN
ST Employee

Hi,

All the TouchGFX Board Setup and Demos avaible from TouchGFX Designer use arm-gcc and a makefile to run on target from TouchGFX Designer. Those makefiles are entirely made/set by the TouchGFX team and not generated by STM32CubeMX or TouchGFX Designer.

When making changes in STM32CubeMX (like adding ADC) the makefile is not automatically updated. You have to add the includes and library paths yourself.

Could you share your project so that we can have a better look at what you did ?

/Romain

HRidd.2
Associate III

Reviving this thread in case others find it. The succinct answer as explained by @Romain DIELEMAN is:
- No, TouchGFX does NOT support Makefile toolchains in the sense that it does not automatically generate a MakeFile for generated .cpp files in the same way STM32CubeMX does when you select the "Makefile" toolchain

@Romain DIELEMAN are there any plans to add Makefile generation to TouchGFX Designer? This would be incredibly helpful for people like myself that don't use a vendor specific IDE (eg VsCode) and are tired of manually hunting down source files/include directories via trial and error. I think it's also a bit of a red-herring for beginners that under default settings using the Makefile toolchain option in STM32CubeMX,  TouchGFX Designer throws an error on code generation despite the actual generation step being successful. It's just that "touchgfx update_project", which is defaulted to post-generate step, fails given Makefiles aren't supported.

Hope this clears up this "error" for anyone using the Makefile option in STM32CubeMX!