cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to port TouchGFX generated code to STM32F429I Disc1 board.

Rajesh1
Associate II

We are able to run the TouchGFX code on target using TouchGFX 4.15.0 version.

When trying to port the generated to custom project created using STM32CubeIDE 1.4.2 version the display does not work.

I request correct configuration setting for display on STM32F429I Disc1.

Regards,

Rajesh K.

8 REPLIES 8
Martin KJELDSEN
Chief III

I'm confused.

You can make it work using 4.15.0. What is it exactly? How did you come by that project? Application Template?

What is this "custom" project? Also created using touchgfx? By custom do you then mean custom hardware based on f429? Or what? Is the application running? Did your configuration code get executed?

Please add more details (also generally when you ask for help - it's impossible to help otherwise).

/Martin

Rajesh1
Associate II

Hi Martin,

Thanks for your response.

We have tried two methods to use LCD available on evaluation board [STM32F429I Discovery].

Method.1: [Using Application Template]

  1. Open TouchGFX Designer [version 4.15.0] which is already installed in laptop.
  2. Choose application template for STM32F429I Discovery board
  3. Design UI screens to display on LCD and generate code
  4. Build the generated code using STM32CubeIDE [version 1.2.0] and run on the STM32F429I Discovery board
  5. We are able to view the UI screens on the LCD

Method.2: [Using Custom Template]

  1. Open STM32CubeIDE [version 1.2.0] which is already installed in laptop.
  2. Create project by selecting STM32F429I discovery board
  3. Initialize all peripherals to default state [FMC, DMA2D, LTDC, SPI5, I2C3]
  4. Add X-CUBE-TouchGFX.4.15.0 from additional softwares
  5. Configure parameters of TouchGFX Generator
  6. Open TouchGFX from STM32CubeIDE workspace and design UI screens
  7. Generate and build code. Run the code on STM32F429I discovery board
  8. We are not able to view the UI screens on the LCD

To summarize, Method.1 is working and Method.2 is not working.

We request the missing configuration setting in Method.2

Regards,

Rajesh K

​Hi Rajesh!

The problem here is that when you select a board from cubemx/cubeIDE, you do not get any BSP - So, external flash / ram is not configured, for instance, just MCU defaults settings for controllers.

​That's why it works in TouchgFX - because we did that work.

Hi,

The application templates provided when you start a project from Designer has all the optimized configuration needed to start graphic projects on the boards. When you start from CubeIDE or CubeMX a project with the default peripheral state, it misses the extra hand written configuration code we provided, along other necessary configuration for external RAM/flash for example. If you compare for example TouchGFXHAL.cpp in the target folder of your project created from CubeIDE (method 2) and the same TouchGFXHAL.cpp in the target folder of the project created with an application template (method 1), you can see the extra user code added.

Why do you wish to start a project directly from CubeIDE ? I would suggest to start a project from the application template provided by TouchGFX Designer (method 1) and then add the extra settings (USB Host for example if needed) to this project. If you truly need or wish to do method 2, then you need to add manually all the additional hand written configuration code. All of this is available in the code of the method 1 project. Be also careful with the pin settings and clock configuration.

/Romain

/Romain

Rajesh1
Associate II

Hi Romain,

Thanks for your feedback.

Using method 1, we are not able to configure other peripherals using STM32CubeIDE, because .ioc file is not generated. [Ex: If we want to generate UART code for serial communication along with TouchGFX code .ioc file is not available].

Using method 2, If we replace TouchGFXHAL.cpp generated using method 1, will it fix the issue ?

Regards,

Rajesh K.

Tauqir  Hassan
Associate III

Hello @Rajesh​ , were you able to fix this issue ? I am in the same boat as you were. Using Method-1, I am able to run the GUI and interact with my LCD, however this method doesn't generate an .ioc file. And with Method-2, I am unable to run/see the GUI.

This is issue is also related to following queries : https://community.st.com/s/question/0D53W00001TEO5eSAH/i-cant-import-project-from-touchgfx-to-cube-ide-stm429i-disco

https://community.st.com/s/question/0D53W00001KSrT2SAL/problem-imporing-project-from-touchgfx-to-stm32cubeide-using-dac-2-channel

I request assistance, @Martin KJELDSEN​ , @Romain DIELEMAN​ .

TouchGFX Version: 4.20.0

STM32CubeIDE Version : 1.7.0

Board : STM32F429I-DISC1

Hi,

The TouchGFX Board Setup (new name for application template) for the STM32F429I-DISC1 available in TouchGFX Designer 4.20.0 does contain an ioc file if you navigate in your project's folder.

Concerning method 2, as we wrote above this is expected as you are missing all the custom code to configure the RAM, flash, touch controller etc.. (some are automatically done by TouchGFX Generator but some do require hand written code depending on your configuration). You can see this by comparing TouchGFXHAL.cpp for both method 1 and method 2 projects.

/Romain