cancel
Showing results for 
Search instead for 
Did you mean: 

What is typical development flow for TouchGFX?

BParh.1
Senior III

So I developing prototype using STM32F769 Discovery Kit. At first I develop the UI using TouchGFX and so far so good.

But I realize the generated codes from TouchGFX does not really generate driver code for other component e.g. Virtual Component Port. So I search around STM site and found CubeMX tool which seems the right tool for me generate this low level code. So when the code generated by CubeMX, I use Keil IDE vs 5.34. But when I build the code I end up with errors/warning:

"Rebuild started: Project: STM32F769I_DISCO

*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'

*** Warning: You are compiling one or more files of source type C++ and have selected 'use MicroLIB'. MicroLIB does not support C++!

....................

linking...

STM32F769I_DISCO\STM32F769I_DISCO.axf: error: L6050U: The code size of this image (88518 bytes) exceeds the maximum allowed for this version of the linker.

Finished: 0 information, 0 warning, 0 error and 1 fatal error messages.

"STM32F769I_DISCO\STM32F769I_DISCO.axf" - 1 Error(s), 1 Warning(s).

Target not created.

...........

"

And at this pointl, when I use TouchGFX to run simulator, it is ok, But when I run on target, the following error occurred:

"  Core/Src/main.c:24:10: fatal error: usb_device.h: No such file or directory

     #include "usb_device.h"

         ^~~~~~~~~~~~~~"

So it seems to me TouchGFX and Keil IDE cannot be used hand in hand?

So my question is, what is typical flow to develop using TouchGFX? So after we design the GUI, but then we need to configure other HW setting e.g. Virtual Com port, where should I go form here?

1 ACCEPTED SOLUTION

Accepted Solutions
Romain DIELEMAN
ST Employee

Hi,

Working with Keil will generate a binary that can be flashed on target using STM32CubeProgrammer or ST link Utility. With TouchGFX Designer and with STM32CubeIDE the STM32CubeProgrammer tool is directly used.

In your case after building your project with Keil you will need to open STM32CubeProgrammer. In the picture below I pointed out how to browse to your project folder and select the generated binary. The .hex file "should" be located at  <project_root_folder>/MDK-ARM/<STM32_evaluation_kit_name>/<STM32_evaluation_kit_name>.hex

0693W000008z0VXQAY.png 

In order to flash on target you will also need to select the correct external loader.

0693W000008z0WaQAI.png 

Concerning the usb_device.h error this is linked to your project.

Concerning the workflow it depends on if you use an application template available in TouchGFX Designer for one of the ST kits, or if you are working on a custom hardware project (or wish to work on a ST development kit but start from scratch). Have a look at the documentation to understand the workflow for developing TouchGFX projects. There are also videos made by ST or other users which could be of interest to you.

/Romain

View solution in original post

10 REPLIES 10
Romain DIELEMAN
ST Employee

Hi,

Working with Keil will generate a binary that can be flashed on target using STM32CubeProgrammer or ST link Utility. With TouchGFX Designer and with STM32CubeIDE the STM32CubeProgrammer tool is directly used.

In your case after building your project with Keil you will need to open STM32CubeProgrammer. In the picture below I pointed out how to browse to your project folder and select the generated binary. The .hex file "should" be located at  <project_root_folder>/MDK-ARM/<STM32_evaluation_kit_name>/<STM32_evaluation_kit_name>.hex

0693W000008z0VXQAY.png 

In order to flash on target you will also need to select the correct external loader.

0693W000008z0WaQAI.png 

Concerning the usb_device.h error this is linked to your project.

Concerning the workflow it depends on if you use an application template available in TouchGFX Designer for one of the ST kits, or if you are working on a custom hardware project (or wish to work on a ST development kit but start from scratch). Have a look at the documentation to understand the workflow for developing TouchGFX projects. There are also videos made by ST or other users which could be of interest to you.

/Romain

BParh.1
Senior III

Thank you @Romain DIELEMAN​ , I get better picture now. But I looked at the documentation you mentioned, it seemed I am doing thing on the reverse order :).

I started with TouchGFX designer using the template for my development board. When done with the UI, I opened the generated Keil IDE project file MDK-ARM\STM32F769I_DISCO.uvprojx , but when I build it has many erros mainly unable to find files.

Build started: Project: STM32F769I_DISCO

*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'

*** Warning: You are compiling one or more files of source type C++ and have selected 'use MicroLIB'. MicroLIB does not support C++!

  

Build target 'STM32F769I_DISCO'

assembling startup_stm32f769xx.s...

compiling STM32TouchController.cpp...

../TouchGFX/target/STM32TouchController.hpp(23): error: #5: cannot open source input file "platform/driver/touch/TouchController.hpp": No such file or directory

 #include <platform/driver/touch/TouchController.hpp>

../TouchGFX/target/STM32TouchController.cpp: 0 warnings, 1 error

compiling CortexMMCUInstrumentation.cpp...

../TouchGFX/target/CortexMMCUInstrumentation.hpp(4): error: #5: cannot open source input file "platform/core/MCUInstrumentation.hpp": No such file or directory

 #include <platform/core/MCUInstrumentation.hpp>

../TouchGFX/target/CortexMMCUInstrumentation.cpp: 0 warnings, 1 error

So how is it that I can build the code using TouchGFX Designer but not with generated Keil IDE file?

Is it due to my wrong order in the development? Any pointer for me please?

@BParh.1​ 

1) Are you using no licensed Keil Version or the licensed one?

2) The flow I have used is as follows. Generate code with Cubemx. Then genration of code with the touchgfx part file generated by cubemx, And then compiling with either of the IDEs, STM32cubeide, KEIL ide, IAR ide, ... .

BParh.1
Senior III

Thanks @Vahid Ajallooeian​ , I am using without license, but how does it matter?

Anyway, I could not see any .touchgfx file generated from my cubemx project, could I miss something?

Ok so I just realize we can install TouhGfX generator from plug in.

Anyway, I manage somehow to resolve the Keil IDE build error, by opening the TouchGFX Designer and then click generate code. This in turn seems to update the inclusion path of Keil IDE and resolve the compile error.

However, I end up in this linking error:

"STM32F769I_DISCO\STM32F769I_DISCO.axf: error: L6050U: The code size of this image (88634 bytes) exceeds the maximum allowed for this version of the linker."

Could this because I dont use license Keil IDE version @Vahid Ajallooeian​ ?

@BParh.1​ Keil free version has limitation of code size compilation, you can use STM32cube IDE, a nice one if you ask me, better than Keil for ST product.

Quick question: have you opened the STM32CubeMX project (ioc file) and selected Keil as your toolchain in the "Project settings" tab ? The project are initially set to use STM32CubeIDE, so you need to slect manually what IDE/toolchain you wish to use, and then generate code from STM32CubeMX. Then open the Designer project and generate code again. If this wasnt done before, you now should, I hope :grinning_face_with_sweat:, be able to compile.

When you press the "run on target" button from Designer you are actually using GCC, so no matter what toolchain you are working on (Keil, STM32CubeIDE, EWARM) you will always be able to run on target, unless there are compilation errors of course.

/Romain

A plus is that STM32CubeIDE is free as well. But it does go down to what companies or people prefer to use in the end.

/Romain

Thank you @Romain DIELEMAN​ , yes I do. It took me a while to realize as you suggested :

"Then open the Designer project and generate code again".

Anyway now I can compile, but end up with linking error as I mentioned below, it seems Keil IDE force me to buy license. So I decided I'd stick to CubeIDE for now :).