cancel
Showing results for 
Search instead for 
Did you mean: 

STMCubeIDE 1.3.0 + TouchGFX 4.13.0

WSpar.1
Associate III

I'm currently in a hurry building a touchscreen interface for the many DIY hospital ventilator projects that are running right now to cope with the ventilator shortage the world is facing right now caused by Covid-19. diyventilators.com

I bought the STM32F746G-DISCO board to quickly develop a touchscreen interface, so we don't have to solder many buttons and can monitor multiple patient parameters.

I build the whole interface in TouchGFX Designer 4.13.0 and was all the time able to run in on the target board initiated from TouchGFX Designer.

Now I want to continue development my code in STM32CubeIDE 1.3.0 and I got stuck.

When I open the .ico file within my TouchGFX project folder and try to build in CubeIDE I get:

make: *** No rule to make target 'C:/TouchGFXProjects/OpenVentilator/TouchGFX/gui/src/graph_screen/graph_widget/AbstractGraph.cpp', needed by 'Application/User/gui/AbstractGraph.o'.

So I thought, maybe I'm better of creating a new project inside CubeIDE by selecting my board STM32F746G-DISCO.

After creating there is no TouchGFX folder and the newer CubeIDE doesn't have GRAPHICS option in the list of additional software. I read they changed that.

So I managed to get TouchGFX folder added by CubeIDE in what basically is an empty project.

But it doesn't build.

Most errors are related to OSwrappers.hpp missing and touchgfx_init() missing.

I tried many things

  • added touchgfx at linking libraries
  • excluded simulator folders from build
  • found a working CubeMX project that I needed to migrate, but no luck
  • opened the TouchGFX project and made a 1 screen app and generate code
  • etc.

I worked all night but no luck, I desperately need a STMCubeIDE + TouchGFX working boilerplate to get started from, but STMCubeIDE offers all kinds of one-click installs that are not compiling at all.

Many tutorials are older CubeMX related not CubeIDE with build-in newer CubeMX

9 REPLIES 9
Alexandre RENOUX
Principal

Hello,

The Application Template STM32F746G-DISCO v3.0.0 is available in TouchGFX Designer. I do not know if you already used it but this version allows you to use CubeIDE. You then just have to add your GUI code to make it work. This is the recommended way for creating a project based on an ST board like EVAL or DISCO.

In this setup, you will find a .ioc file. This file can be open with CubeMX. This is where CubeIDE is already selected so you should not have to do anything with that.

0693W000000UySAQA0.png

Just go to STM32CubeIDE folder and click on the .project file. This will open your project and you can build and download into your board.

0693W000000UySFQA0.png

Hope this will help you,

If you have other questions, don't hesitate to ask.

/Alexandre

Martin KJELDSEN
Chief III

@WSpar.1​,

Amazing project. Please read the documentation on workflow to understand how to work with TouchGFX after GRAPHICS was removed from CubeMX. There should be a link in the sticky of this subforum. Generally:

* Starting from CubeMX/CubeIDE will NOT give you a working project since BSP is not considered AT ALL (touch, qspi, sdram, etc)

* Starting from TouchGFX designer for well known ST boards WILL have BSP and external peripherals configured to run TouchGFX

/Martin

chaaalyy
Senior II

Besides some bugs in IDE 1.3.0, maybe this video can give you a quick start to get the stuff basically up and running:

https://www.youtube.com/watch?v=12KXreXaLp0

works out of the box also in IDE 1.3 w. TGFX 4.13.

If you get build errors at the end, just generate code again in TGFX, clean and refresh project and evrything is fine. If useful for this kind of project: 2 weeks ago i built a small machine (not a vent..., just something mechanical movement and dig. I/O...) for a friend with 10A steppermotor driver, 8 channels 24V digital inputs and 8x 24V dig. outputs. Therefore i used STM32F746 Disco with IHM03A1 and PLC01A1 boards stacked. Fully compatible with cubeIDE 1.3 (also cubeMX of course) and TouchGFX 4.13.

/Charly

WSpar.1
Associate III

I did go through all kinds of approaches

Importing a TouchGFX .ico file into IDE will not work properly:

It shows an empty ToughGFX project folder, I opened that to import my existing GUI, many many build errors, I used Youtube videos to get QSPI and touch controller working. But after that I had weird volatile image behavior. I always had to do a 'Run target' of a random TouchGFX project before I run my own project inside IDE.

As soon as the USB power was disconnected, my application showed random noise on the screen. Probably because of SDRAM? So I copied the main.c file from my TouchGFX project into my IDE project and project build ok. So I commit that to my github project: https://github.com/sprucify/OpenVentilator-control

But now I have difficulties to clone the project on a clean pc and add it to an empty IDE workspace.

My original project was named OpenVentilator and my Github project I named OpenVentilator-control, so after cloning and adding to IDE the .ico is named OpenVentilator-control

CubeMX version differences:

I noticed TouchGFX was using CubeMX 5.5.0 for creating projects, but I had CubeMX 5.6.0 installed, so it wants to migrate projects all the time.

So I still don't have any luck with going the TouchGFX -> IDE route.

I wish I could get my Github commit back running again.

I'm almost giving up the whole ST eco system

Unbelievable they don't have at least there boilerplates for there own dev boards up and running for their customers.

weird volatile images... Did you take care about setting the external loader correctly ?

Yes I had the external loader setup.

I managed to get my github project going again.

Also installed CubeMX 5.5.0 instead of 5.6.0

So a STM32F746G-DISCO project created in IDE doesn't have QSPI, LTDC, touch etc setup

I fixed all those and had still the weird volatile image behavior.

It was only when I copied a main.c from my TouchGFX project to IDE project that the volatile behavior disappeared.

I didn't do a diff to compare the two files in detail, but I notices there where different MPU segment numbers between the two files.

So using the build-in MX inside the IDE to create a STM32F746G-DISCO project creates a project that is wrong in so many ways.

LTDC is wrong, graphics are not setup, external loader isn't setup.

All those settings can be automatically set by the IDE in my opinion.

Very helpful video, thanks

Hi,

Using CubeMX directly in CubeIDE is not the best way in my opinion. It is more stable to use CubeIDE and CubeMX separately.

You said "STM32F746G-DISCO project created in IDE" but did you create a project using Designer ?

Because the LTDC and QuadSPI, touch, etc. are set if you use the Application Template from Designer.

/Alexandre

I made the mistake to use the import project option inside IDE and import my ToughGFX project.

All kinds of stuff is stripped out (QSPI, SDRAM, Touch, etc)

Lesson learned :p

Does ST only want super advanced engineers to work with their tools?

In my opinion it is shipped super buggy.

It would be way better if they create working boilerplates for people to get started from.