Skip to main content
Asantos
Associate III
January 22, 2020
Solved

Plans for a "Hello TouchGFX World" project tutorial?

  • January 22, 2020
  • 16 replies
  • 2458 views

I want to start with TouchGFX, but I see too much people in this forum struggling to do a basic project for a development boards from ST. I imagine how hard it should be a custom board.

Has ST plans to release a basic step by step tutorial showing how to do a basic project for the STM32F746G Discovery board?

This topic has been closed for replies.
Best answer by Martin KJELDSEN

Just use the F746G-DISCO application template. Here, let me exemplify, for good measure.

1) Select V3 of the F746G-DISCO template. It has an .ioc file that works with CubeMX 5.5 / TouchGFX Generator, has the correct LTDC GPIO configuration for the display, and has all the additional code to setup QSPI and SDRAM and linker script to place image and font assets in external flash.

Generally, the application templates are supposed to be easy to use because we've done all the work for you. You can find any additional work done in C-code inside CubeMX generated USER CODE sections.

0690X00000BwJc9QAF.png

 2) Create a stunningly beautiful application, like the one i did below with a button and a background box. Press "Generate code"

3) Press "Run target"

4) Enjoy your running application!

5) Open up the .ioc file in Cubemx 5.5, if you want and make some modifications to hardware configuration.

0690X00000BwJcJQAV.jpg

/Martin

16 replies

Martin KJELDSEN
Martin KJELDSENBest answer
Principal III
January 22, 2020

Just use the F746G-DISCO application template. Here, let me exemplify, for good measure.

1) Select V3 of the F746G-DISCO template. It has an .ioc file that works with CubeMX 5.5 / TouchGFX Generator, has the correct LTDC GPIO configuration for the display, and has all the additional code to setup QSPI and SDRAM and linker script to place image and font assets in external flash.

Generally, the application templates are supposed to be easy to use because we've done all the work for you. You can find any additional work done in C-code inside CubeMX generated USER CODE sections.

0690X00000BwJc9QAF.png

 2) Create a stunningly beautiful application, like the one i did below with a button and a background box. Press "Generate code"

3) Press "Run target"

4) Enjoy your running application!

5) Open up the .ioc file in Cubemx 5.5, if you want and make some modifications to hardware configuration.

0690X00000BwJcJQAV.jpg

/Martin

Asantos
AsantosAuthor
Associate III
January 22, 2020

Thanks Martin, I will try it out.

Another question: Is There a way to install the F746G-DISCO template offline? My work machine only has Internet access via Virtual Machine.

Martin KJELDSEN
Principal III
January 22, 2020

Sure, i can share the application template here and you can simply drop it into app/packages of your TouchGFX Designer installation folder. Give me a few minutes.

0690X00000BwKTDQA3.png

Asantos
AsantosAuthor
Associate III
January 22, 2020

Martin,

How to install the template you've posted, into the TOUCHGFX directory?

I extracted the STM32F746_DISCO-3.0.0.zip to this files:

package.json

STM32F746-back.png

STM32F746-front.png

STM32F746G_DISCO.zip

I also extracted the STM32F746G_DISCO.zip and didn't find any file with the extension .tpa to put in the directory TouchGFX/4.13.0/app/template

Martin KJELDSEN
Principal III
January 23, 2020

I assume you found out - I posted the installation instructions in the post just above.

Asantos
AsantosAuthor
Associate III
January 23, 2020

Martin,

No I didn't. I tested it in my home computer. where is the offline installation instruction?

Asantos
AsantosAuthor
Associate III
January 23, 2020

Martin,

I did a new project with the TouchGFX designer using the STM32F746G_DISCO (V3.0.0) template and the ProgressIndicator Example (V2.0.0) as UI.

Pressing the button "Run Target" The code is loaded in my F746 Disco board and run ok.

I pressed the button " Generate Code".

I opened the STM32F746G_DISCO.IOC using the STM32CubeMX V5.5.0, when press "Generate Code" button, STM32CubeIDE V1.2.0 open and when I try to build the code i got the message:

make: *** No rule to make target '../Application/User/gui/LogoARGBBilinear127QSPIPresenter.cpp', needed by 'Application/User/gui/LogoARGBBilinear127QSPIPresenter.o'. Stop.

make: *** Waiting for unfinished jobs....

Using the EWARM:

If I change the IDE to the EWARM in the STM32CubeMX, It also generates compiler errors:

cannot open source file "C:\TouchGFXProjects\MyApplication_2\TouchGFX\generated\fonts\src\Font_Asap_Regular_20_4bpp_0.cpp" 

cannot open source file "C:\TouchGFXProjects\MyApplication_2\TouchGFX\generated\fonts\src\Kerning_Asap_Regular_20_4bpp.cpp" 

cannot open source file "C:\TouchGFXProjects\MyApplication_2\TouchGFX\gui\src\screen1_screen\Screen1Presenter.cpp" 

cannot open source file "C:\TouchGFXProjects\MyApplication_2\TouchGFX\gui\src\screen1_screen\Screen1View.cpp" 

cannot open source file "C:\TouchGFXProjects\MyApplication_2\TouchGFX\generated\gui_generated\src\screen1_screen\Screen1ViewBase.cpp" 

cannot open source file "C:\TouchGFXProjects\MyApplication_2\TouchGFX\generated\fonts\src\Table_Asap_Regular_20_4bpp.cpp" 

Can you describe a sequence that don't generate compiler errors?

I believe I am having the same problem as other users.

Martin KJELDSEN
Principal III
January 23, 2020

You need to press "Generate code" in designer every time you change IDE/compiler in cubemx, because otherwise the touchgfx designer won't know what project to update or "inject" the application files into

/Martin

Asantos
AsantosAuthor
Associate III
January 23, 2020

Martin I did it.

It looks like that the TouchGFX designer generate code to the STM32CubeIDE by default, and If you want to compile it with the EWARM, you should generate the code using the cubemx after change the IDE configuration to EWARM.

Martin KJELDSEN
Principal III
January 23, 2020
Finished building target: STM32F746G_DISCO.elf
 
arm-none-eabi-size STM32F746G_DISCO.elf 
arm-none-eabi-objdump -h -S STM32F746G_DISCO.elf > "STM32F746G_DISCO.list"
arm-none-eabi-objcopy -O binary STM32F746G_DISCO.elf "STM32F746G_DISCO.bin"
 text	 data	 bss	 dec	 hex	filename
 45352	 192	 6316	 51860	 ca94	STM32F746G_DISCO.elf
Finished building: default.size.stdout
 
Finished building: STM32F746G_DISCO.list
 
Finished building: STM32F746G_DISCO.bin

Martin KJELDSEN
Principal III
January 23, 2020

Okay, guys, i'm releasing a new STM32F746G-disco application template - An oversight in the INITIAL CubeIDE project files meant it referenced some files from an application that isn't a part of the AT. It can be solved manually like this:

* Remove the file references from CubeIDE

* Re-generate the project from CubeMX and Generate Code From touchgfx designer

Martin KJELDSEN
Principal III
January 23, 2020

Creating a seperate post about this - I've uploaded a new Application template for F746G-DISCO v3