cancel
Showing results for 
Search instead for 
Did you mean: 

CubeIDE to Toughgfx integration + build error

PKara.1
Associate II

Having issues running a GUI project generated using CubeIDE with TouchGFX application. Please see details below:

Software Versions in use:

  1. STm32CubeIDE v1.5.1
  2. TouchGFX v4.16.1

Hardware

  1. STM32F429I-DISC1

Steps followed to start a test project:

  1. Start a fresh project in STM32CubeIDE using STM32F429I-DISC1 template
  2. Select C++ as target language and Initialise all peripheral in default mode
  3. Project Builds and loads on the board with no issue
  4. Next, use Software Packs to add TouchGFX. Activate Graphics Application, Interface = Parallel RGB , Application Tick Source = LTDC.
  5. Save and Generate Code
  6. open .part to open TouchGFX and create a single screen. Save and Generate Code
  7. Project Build Fails with error "GPIO.hpp no such file or directory
  8. Go to properties of Main Project and "Middlewares/ST/touchgfx/framework/include/touchgfx/hal" to path which contains the missing GPIO.hpp file
  9. Project Builds successfully and uploads on board however nothing happens on display.

A new project created using TouchGFX runs with no issues.

Attached : STM32CubeIDE & TouchGFX projects

Regards,

Prashant

10 REPLIES 10
MM..1
Chief II

And what is your question?

HP
Senior III

When doing a 'custom' project this way, you have to write the MX_TouchGFX_Process(); call in the task you created for it. Insert at around line 934. The call is captive so don't use the task for anything else. Create a separate task for HW interactions.

Why is that tGFX doesn't 'just' work? well, the code generator haven't got any idea of which task to setup to run this task so you have to do it yourself.

@Martin KJELDSEN​ - this would actually make really good sense when talking 'ease of use': When enabling tGFX, having a checkmark saying something like 'autogenerate task for tGFX' (if using RTOS of course). This could setup the total heap and create a separate tGFX task that can fire the _process() method.

PKara.1
Associate II

Q1: What do I need to change in STM32CubeIDE project to make it display graphics on the board.

Q2: In attached test project I only have 2 simple TouchGFX screens and yet the IDE is showing 99.93% RAM usage. Is this normal or have I missed some setting to further optimise the code?

Romain DIELEMAN
ST Employee

Quick question: what is your board revision ? The latest one (rev E) seems to not work with our application template at the moment unfortunately.

/Romain

Q1:

  • when you start project from IDE you need sometimes use REFRESH after generate before build. (normal eclipse)
  • you ask display, this is from IDE next problem, project wizard dont add drivers BSP, because this way isnt designed for discovery boards, but for custom
  • ...

Q2:

RAM usage is based on method where you place framebuffer. Check your code and use external SDRAM ...

I cant see a revision number on my board but I did purchase it back in April 2019 so I doubt that's the latest revision. Also on the back there's a stock number with C-01 so i assume its rev C ?

PKara.1
Associate II

Understood. I wrongly assumed the call to gfx process calls will be generated when generating the code from TouchGFX but I can now see the separation of two codes (TouchGFX and CubeIDE).

Thanks

Changing buffer location from "By Allocation" to "By Address" reduced RAM usage from 99% to 22%.

Thanks.

Hi,

We're struggling a bit with the freertos/task interface when using x-cube-touchgfx. It's definitely something that would be great to enhance and allow more control of - Especially with upcoming video decoder support which requires an additional task.

/Martin