cancel
Showing results for 
Search instead for 
Did you mean: 

Use TouchGFX 4.10 with CubeMX 5.2 and Atollic 9.3 on F769 Disco Board How to get it compiling / working? Is there a working example project / ioc file? Is there a step by step manual?

Electron Hunter
Associate II

Hello,

I was searching this forum and already found lots of help, but unfortunately I'm stuck to this issue. The Guide refers to CubeMX 5.0 and some things seem to be corrected since this version i.e. C/C++ combi project... but still CubeMX does not generate an Atollic project including TouchGFX that does compile and so far I was not able to fix it. Actually this is bit frustrating as TouchGFX together with the other stuff is all part of STM and promised as working solution...

So Maybe someone here has done this succesfully and would be so kind to share the .ioc file or give an updated step by step manual for the new software release as I'm sure I just miss some tiny things...

Thanks in advance and best regards

Stefan

PS: Without use of TouchGFX I can create a working project with CubeMX and also when I use the TouchGFX standalone and flash the Board from the Designer it works.

14 REPLIES 14

I don't think you need to post anything on the CubeMX board if you're thinking about making someone aware of these issues. They're already posted to internal bug tracking.

Let me know how far you get with that guide. Once you remove the "postGenerate" script from .touchgfx you should be able to generate TouchGFX files which would then get picked up by CubeIDE.

/Martin

Maybe it is still from interested for someone: I got it working with a 32F469IDISCOVERY Board, CubeMX 5.2, TouchGFX 4.10.0 as Atollic Project.

Here are the steps:

  1. Start a new CubeMX Project with the BoardSelector. Choose 32F469IDISCOVERY
  2. "Yes", initialize peripherals with default values
  3. Set FMC, SDRAM 1 settings:0690X000008BfgJQAS.png
  4. Set QUADSPI settings:0690X000008BfgOQAS.png
  5. Select DSIHOST "Adapted Command Mode with TE Pin"
    1. Display Interface:0690X000008BfgYQAS.png
    2. NVIC settings: DSI global Interrupt enabled
  6. Select LTDC "RGB888 - DSI mode"
    1. Parameter Settings:0690X000008BfgdQAC.png
    2. Layer Settings:0690X000008BfgiQAC.png
    3. NVIC: LTDC global interrupt enabled
  7. Middleware, GRAPHICS "TouchGFX"
    1.  Interface: LTDC-DSIHOST
    2.  Parameter Settings:0690X000008BfgnQAC.png
    3. TouchGFX:0690X000008BfgxQAC.png
    4. Platform Settings:0690X000008Bfh2QAC.png
  8. Project Manager:
    1. Choose a project name and location
    2. Toolchain/DIE: TrueSTUDIO
    3. Tick "Generate Under Root
    4. Save project
    5. Click "GENERATE CODE" top right…and afterwards "Close"
  9. Go back to "Pinout & Configuration", Middleware, Graphics, TouchGFX: Click "Execute". TouchGFX designer should start.
    1. Place a text or something else.
    2. Click "Generate Code" in the top right corner
    3. Verify "Code generation complete" in the bottom left corner
    4. Close TouchGFX Designer.
  10. Navigate in Explorer to the project folder and double click ".project". AttolicTrueStudio should start.
    1. Right click to the project folder, "Properties"
    2. Set the following filters:0690X000008BfhCQAS.png
      1.  \Middlewares\ST\TouchGFX\touchgfx\framework\source\platform\
      2. \TouchGFX\simulator
      3. \Middlewares\ST\TouchGFX\touchgfx\os\OSWrappers.cpp
    3. Disable RTTI0690X000008BfhHQAS.png
    4. Make a copy of "OSWrappers_cmsis.cpp" because CubeMX will delete it, if some modifications are made on the configuration. Location: Middlewares\ST\TouchGFX\touchgfx\os\OSWrappers_cmsis.cpp
    5. Build Project. Mine built with 0 errors and 2 warnings.
    6. I strongly recommend to create a backup .zip at this point!

If Display shows crap:

  • Check "BoardConfiguration.cpp"
    • touchgfx_init(). Correct values for dispWidth, dispHeight?
    • static void LCD_LL_Reset(void). Implemented? e.g.:
/* Activate XRES active low */
HAL_GPIO_WritePin(GPIOH, GPIO_PIN_7, GPIO_PIN_RESET);
HAL_Delay(20); /* wait 20 ms */
/* Desactivate XRES */
HAL_GPIO_WritePin(GPIOH,GPIO_PIN_7, GPIO_PIN_SET);
/* Wait for 10ms after releasing XRES before sending commands */
HAL_Delay(10);
  • Check "HW_Init.cpp"
    • MX_DSI_Init(void). OTM8009A_Init(.…) correct Orientation? M8009A_ORIENTATION_LANDSCAPE
    • MX_LCD_Init(). HAL_LTDC_SetPitch(&hltdc, 800, 0); correct value?

Hope this helps someone.

Br. Raphael

Hi Raphael,

thanks for this manual. It looks like the perfect combination of the Guide for CubeMX 5.0 and the latest info from Martin here as I guess the Exclusion from BUILD is the same for cubeIDE and Atollic.

I just did all your steps and it builds successfully - screen stays black on my STM32746 DISCO tough, but this I can handle hopefully quite fast.

Cheers

Stefan

Hi Stefan

Nice to hear that it built sucessfully at yours.

I had initially the same issue with the black screen. In my case, CubeMX (or maybe as result of a fault of mine) didn't implement the LCD reset routine, so I had to do this manually. However it looks like your board haven't a dedicated I/O for the LCD Reset.

Br. Raphael

Hi Raphael,

Reset should be PJ15 (DSI_RESET) and reset routine is iplemented - just need to check if it is once called at all

edit: implemented but never called... I keep on fixing ;)