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.

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

14 REPLIES 14
Martin KJELDSEN
Chief III

Hi @Community member​,

Sorry you're having these problems. We experience the same and it's incredibly frustrating. That's why, as you know, have tried to fix up some of the errors on a few of our Appliation Templates from within the designer and also provided working .ioc files. But it's difficult to keep up because we really just want CubeMX/CubeIDE to generate working projects out of the box.

Have you tried CubeIDE yet? It's "replacing" Atollic and offers CubeMX support directly from within the IDE through a plugin (Also CubeMX 5.2). Try it out and let me know. If you're still having problems let's look at it together.

Best regards,

Martin

Electron Hunter
Associate II

Hi Martin,

thanks for this quick reply - I will check the cube IDE and let you know...

But general I would like to stay with Atollic as I have a lot of working projects there already and porting to another IDE is always anoying... Also Atollic belongs to ST and I would consider it as part of ecosystem and working!

Does the CubeIDE share also the SerialWireView Debug option like the Atollic does - this is what I will miss most...

Thanks and best regards

Stefan

Martin KJELDSEN
Chief III

I'm no CubeIDE expert, but i've been told that CubeIDE is missing some of the features of Atollic (Like FreeRTOS debugging). I'm sure these things are on the roadmap, but until then maybe stick with Atollic.

Let me start by asking what you've tried so far and what still isn't working - You're still just trying to compile, right?

Best regards,

Martin

bitlischieber
Associate III

Hello,

I just was about to ask exactly the same question!

Currently I have a STM32F469I-Disco board and I am trying now since 2 days to make it compile in Atollic (TGX: 4.10 and Cube 5.2)!

Anyone tried the CubeIDE?

Hope in the Webinar tomorrow (https://www.st.com/content/st_com/en/about/events/events.html/touchgfx-technical-introduction-webinar.html) it will be covered how to create a working project.

Best regards,

Raphael

Electron Hunter
Associate II

Hello Martin,

here we go: Downloaded and installed CubeIDE, created new project via Board selector, IDE opens MX perspective and I configured just under the Middleware-GRAPHICS the TouchGFX Framework and use of LTDC-DSIHOST Interface as well as reset pin. Click on Execute for TouchGFX, it opens, create a button, click generate code, it aborts with error message....

OK, second aproach as I remember that you first need to generate code in MX before executing TouchGFX. But "genereat code" button in MX perspectine is nowhere to find... I close project, popup window asks for saving and generation of code (yipieaahh), click yes, open project again, execute Touch GFX again - same issue: generat code has error!

OK, third aproach: Open CubeMX standalone, configure Middleware graphics, do project settings and choose cubeIDE as tool, save and generate code. Go back to middleware-GRAPHICS, want to click Execute button for Touch GFX start - Button grey and no access! After double checking everything I found, that with same settings toolchain Atollic the button is available, Toolchain CubeIDE button is NOT available.

So Martin, what do you suggest as a further steps: CubeIDE does not work out of the Box - do you want to keep on fixing this with me? Second Topic: Fix it with Atollic, which I would prefer more. We also can do both ...

Thanks in advance and best regards

Stefan

Martin KJELDSEN
Chief III

Hi Stefan,

Thanks for trying it out!

I've experienced and fixed some of these errors before. Let me paste the process for you here written by someone else that should at least fix compilation issues:

1. Start STM32 project in C++. "Starting C" doesn't work for ToughGFX project.

2. Enable "GRAPHICS" in Middleware with the following settings and generate code:

- Graphics Framework = TouchGFX

- Display Interface = Display Parallel Interface using LTDC

3. Press "Execute" button in Configuration tab of GRAPHICS to activate ToughGFX Designer to design the GUI. This evokes "Post Generation" error right after launching ToughGFX Designer and "Code Generation" error after pressing "Generate Code" button in TouchGFX Designer. These two errors could be worked around by changing "PostGenerateCommand" in ***.toughgfx file under \TouchGFX folder even though I think these two could be ignored since I've found these two errors do not have negative impact in STM32CubeIDE.

4. Exclude the following folders:

- \Middlewares\ST\TouchGFX\touchgfx\framework\source\platform\

- \TouchGFX\simulator

5. Exclude the following file:

- \Middlewares\ST\TouchGFX\touchgfx\os\OSWrappers.cpp

6. Include library in MCU G++ Linker\Libraries:

\Middlewares\ST\TouchGFX\touchgfx\lib\core\cortex_mx\gcc\libtouchgfx-float-abi-hard.a (sub x by concrete core used)

Libraries (-I): touchgfx-float-abi-hard

Libraries search path (-L): folder containing the library

7. Build project WITHOUT GENERATING CODE AGAIN.

After all the steps shown above, TouchGFX project finally worked over F746-DISCO. This is simply a good beginning since I still found some other issues shown below:

1. I got good result of compiling (0 error) by using STM32F469-DISCO and STM32F429-DISCO, but didn't get expected execution since both seemed to stay in prvPortStartFirstTask. I did not deep dive into this issue to see if I missed anything. It would be great if you could help give me more clue of this issue.

2. If I generated code again in CubeIDE after generating code in TouchGFX Designer, the file/folder exclusion got mess up so the exclusion needed to be set again.

Electron Hunter
Associate II

Hi Martin,

thanks for this manual. At the beginning I initalized all peripheral settings for the board with default values. Then I followed all the steps above but still got compiler issues about missing files, just a few here, its 22 in total...

../Src/GPIO.cpp:2:10: fatal error: touchgfx/hal/GPIO.hpp: No such file or directory

../Src/BoardConfiguration.cpp:1:10: fatal error: common/TouchGFXInit.hpp: No such file or directory

../Src/STM32F7HAL_DSI.cpp:1:10: fatal error: touchgfx/hal/OSWrappers.hpp: No such file or directory

../Src/OTM8009TouchController.cpp:2:10: fatal error: OTM8009TouchController.hpp: No such file or directory

I can now start to fix it, but honestly I would consider that this should not happen on a promised "out of the Box Solution" with CubeIDE and so I would wish to ask you, if you will take care of this?

Anyway, as far as I understood your post, after succesful compile there is still some work to do as code is stucking somewhere...

In my opinion the best would be to get a tested .ioc file for the atollic studio, this would help a lot of users for sure!

If you need further infomation or test from my side to provide this I'll help you for sure.

If you don't think that this can be solved within a short period of time please let me know, so I will try to solve the problem on my own with a different aproach...

About the CubeIDE: It looks like nice copy of atollic, though I did not test any SWV Debugger etc. yet... As far as I read the RTOS Debugging is missing?

Thanks in advance and best regards

Stefan

Martin KJELDSEN
Chief III

Hi Stefan,

It's not something i can take care of personally since i'm not a part of the CubeMX or CubeIDE, team. But rest assured that these bugs have already been reported and will be fixed.

I think you're correct yes, that the RTOS debugging component is missing, but i'm positive they have that on the roadmap if CubeIDE is to be the replacement for Atollic.

Thanks!

Best regards,

Martin

Hi Martin,

is there anyone to contact personally or should I just post the same to the CubeMX Board?

About the IDE... I have been working on development site for a long time so I know about these roadmaps... we just started a new project and need the graphix support. So if it will work now it's OK for us, if not we need another solution...

Thanks

Stefan