cancel
Showing results for 
Search instead for 
Did you mean: 

How to properly start a TouchGFX 4.15 project in STM32CubeIDE

DBiro.1
Associate II

I am currently looking to start a TouchGFX 4.15 project inside the STM32CubeIDE but it is not as straight forward as I was hoping. My knowledge in some of the areas required to make it work are lacking so I'm hoping this thread will help me learn more as well as solve my problem. I am also new to STM32CubeIDE.

First, after creating the project and selecting my P-Nucleo-WB55 board, I immediately added the software pack for TouchGFX version 4.15, and enabled it along with the CRC that was required. Without adjusting any of the settings I went to debug and was presented with this list of errors

0693W000006ENdrQAG.png So I added the include path "C:\TouchGFX\4.15.0\touchgfx\framework\include" to the project. I also opened up the TouchGFX project and generated the initial code (just a screen with a button). Now I'm presented with this error.

0693W000006ENksQAG.png Does this issue with the linker have to do with TouchGFX generating C++ code while everything else is written in C?

4 REPLIES 4
MM..1
Chief III

On MCUs compatible with TouchGFX libs, exist more simple start, for example modified ioc file from example ...

For your MCU complicated (SPI internal ram...), maybe impossible. Try partial buffering and use lcd with framebuffer...

We are planning on using the partial frame buffer with an LCD to solve the low RAM issue. We have picked out a LCD touchscreen with an onboard driver that we will communicate to using SPI. We feel confident that we can get the solution to work once we understand the details in setting up a custom project.

MM..1
Chief III

I test simple create new select MCU and partial touch generated me this errors

../TouchGFX/target/TouchGFXHAL.cpp:37:2: error: #error "A user must implement C-methods touchgfxDisplayDriverTransmitActive() and touchgfxDisplayDriverTransmitBlock() used by the Partial Framebuffer Strategy."
 #error "A user must implement C-methods touchgfxDisplayDriverTransmitActive() and touchgfxDisplayDriverTransmitBlock() used by the Partial Framebuffer Strategy."
  ^~~~~
make: *** [TouchGFX/target/subdir.mk:28: TouchGFX/target/TouchGFXHAL.o] Error 1
make: *** Waiting for unfinished jobs....
"make -j8 all" terminated with exit code 2. Build might be incomplete.
 
20:50:38 Build Failed. 3 errors, 0 warnings. (took 2s.63ms)

Steps to add new to exist opened workspace.

On Project explorer click right mouse and select new STM32 Project ... Ide load updates data and open MCU selector, i test with MCU not board kit.

  1. I select STM32WB55RGV and create project -- when you prefer main.c set C project
  2. IDE opens ioc cubeMX i activate SPI1, CRC , and add software pack Touch activate it and setup Partial buffer width heght
  3. close ioc and save generate code. Then in touchgfx open template project and generate
  4. close touch and now and later reopen it by project file no template and generate code again close
  5. build project thats all

Ok a couple of things...

1) I was able to solve my linker problem by going to properties->C/C++Build->Settings->Tool Settings->MCU G++ Link and fixing the linker script so that it matches the correct linker script. This got messed up for me after adding the TouchGFX package for some reason.

2) After solving that issue, I was presented with another issue saying the file bits/c++config.h couldn't be found. So I included a path to that file as well.

3) Now it seems that there is an issue with the TouchGFX file generator. It seems that the file 'TouchGFXGeneratedHAL.cpp' has generated the externs correctly

0693W000006EPewQAG.pngbut for some reason generates the actual function call incorrectly

0693W000006EPffQAG.png

Only the partial frame buffer functions seems to be affected.

Have you not experienced any of these issues?