Skip to main content
hansd56
Senior
May 4, 2019
Question

TouchGFX 4.10.0 with STM32CubeIDE 1.0.0 and STM32F476G-Disco

  • May 4, 2019
  • 6 replies
  • 4033 views

Not really a question. I have attached a little test project for the STM32F476-Disco board using the newest ST tools. There are still problems and changes need to be made to the project. The Simulator and Build Code buttons do not work in the designer. The TouchGFX command line tool must be used for building the objects and the simulator. The simulator.exe file is located in the build folder within the TouchGFX folder. Before loading it into the target the code must be build with STM32CubeIDE.

This topic has been closed for replies.

6 replies

Martin KJELDSEN
Principal III
May 7, 2019

Hi @hansd56​,

Thanks for the feedback, that's really helpful. I'll pass it on.

/Martin

Martin KJELDSEN
Principal III
May 7, 2019

Just to be clear, what do you mean by "Do not work" - They're disabled or nothing happens or something else? I downloaded your project and the buttons are present here but i'm getting some post-generate error when pressing either button - Just to verify that's also what you're seeing.

Thanks!

hansd56
hansd56Author
Senior
May 7, 2019
Hi Martin,
Thanks for your reply. That's what I mean. The buttons are present but there are errors during the build. It works fine with the command line tool.
Regards,
Hans
Martin KJELDSEN
Principal III
May 7, 2019

That's great, thanks. I will pass this on.

/Martin

Martin KJELDSEN
Principal III
May 7, 2019

So i've figured out at least one issue - After code has been generated we call a post-generate command to update a particular project file (e.g. IAR, KEIL). But since CubeIDE is brand new, the existing command to update projects fails.

If you replace the "post generate" command in the .touchgfx file with "echo post generate" (it will complain if nothing is set), you will be able to run your simulator in the touchgfx designer at least.

Martin KJELDSEN
Principal III
May 7, 2019

This means that for now you have to update your CubeIDE project manually with new files (generated or otherwise).

The last problem with compiling from CubeIDE is that it's referencing libtouchgfx in a wrong way.

Go to C/C++ General -> Paths and Symbols -> Library Paths and change the entry to "/TouchGFX_Simulator/Middlewares/ST/TouchGFX/touchgfx/lib/core/cortex_m7/gcc" - The linker is simply looking in the wrong spot.

hansd56
hansd56Author
Senior
May 7, 2019
I did not have problems with compiling in the end. Sorry, I left the linker path in the absolute path. My projects are sitting at E: drive. The project generated by the integrated CubeMX did not compile because of:
1. The simulator folder and references to the simulator in Middlewares had to be removed from the CubeIDE project with 'Resource Configurations->Remove from project' option
2. BSP folder in 'Drivers' was missing as per your document for the STM32F746G-Disco
3. Touchscreen had to be enabled as per your document for the STM32F746G-Disco
4. The project is created in internal memory
For memory handling I can advise to have a look at MCUEspressoIDE to how easy it is to select memory regions and put them as bootable. Just an idea :)
Furthermore, the CubeIDE doesn't seem to have the FreeRTOS capabilities of TrueStudio (TrueSTUDIO NRND). That's a bit inconvenient when debugging a project that only runs with FreeRTOS. I have since changed the firmware in ST Link to Segger.
Regards,
Hans
Martin KJELDSEN
Principal III
May 7, 2019
arm-none-eabi-size TouchGFX_Simulator.elf 
arm-none-eabi-objdump -h -S TouchGFX_Simulator.elf > "TouchGFX_Simulator.list"
 text	 data	 bss	 dec	 hex	filename
 304782	 252	 44196	 349230	 5542e	TouchGFX_Simulator.elf
Finished building: default.size.stdout
Finished building: TouchGFX_Simulator.list
 
10:27:15 Build Finished. 0 errors, 0 warnings. (took 12s.369ms)

Martin KJELDSEN
Principal III
May 7, 2019

So one issue i will raise is the post-generate script not being able to understand the CubeIDE format - But it's possible to update this manually for now.

hansd56
hansd56Author
Senior
May 7, 2019
Yes, I can confirm. The simulator is happy now.