cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE and TouchGFX 4.10.0: Resolving compilation issues

Martin KJELDSEN
Chief III

Hi everyone,

I've removed the previous, textual guide. Instead, here's a video guide on how to get CubeIDE and TouchGFX working on an STM32F746G-DISCO board. I accidentally exported the video in 720p but have created a 1080p version. Leaving both links here because the 720p version may have useful comments and resolutions:

1080p: https://youtu.be/VOs2LYO7wSA

720p: https://youtu.be/xZ0pPhQCQUY

And here's the project i created and modified:

https://community.st.com/s/question/0D50X0000At0N95SQE/cubeide-100-touchgfx-4100-working-project-inside-stm32f746gdisco

 (NOTE: This project does not have the modifications from our STM32F746G-DISCO/CubeMX article).

Best regards,

Martin

95 REPLIES 95

Hi Nilesh,

Can you show me an error log?

/Martin

Hi @Pascal​,

We have an unofficial L4R9 + DPI screen template here, but it's not CubeMX or CubeIDE-ified. I'm not sure if and when we'll be able to release this but i'll investigate.

/Martin

Thomas Laurenson
Associate II

Hi @Martin KJELDSEN​ 

Firstly, thanks a lot for this guide, very helpful.

However I have an issue when I want to integrate somes images.

I started from your working project and then added somes images, but then I get this error:

'ExtFlashSection will not fit in region 'FLASH'

0690X000008iYtTQAU.png

I guess it's because the linker needs to be updated to support the QSPI Flash, but could you provide some help about this ?

The article here: https://touchgfx.zendesk.com/hc/en-us/articles/360019884752-Configuring-STM32F746G-DISCO

Only state about the EWARM\stm32f746xx_flash.icf, but the linker file for STM32CubeIDE is totally different, I guess I have to modify STM32F746NGHX_FLASH.ld, but not really sure what to do there.

Also, In your video you seems to let the default configuration for the QSPI, but in the article stated above, the configuration seems a bit different:

0690X000008iYtxQAE.png

When I configure the QSPI like this and generate again, and after I exlude everything related to the simulator, I get a lot of compilation errors:

0690X000008iYu7QAE.png

any ideas ?

Thanks,

Thomas.

Hi Thomas,

I have some ideas. It's getting late so i'll come up with a reply tomorrow. One hint: When you generate code again, CubeMX will actually delete your OSWrapper_cmsis.cpp source file, causing linker errors. You can reinstate that. Also, yes, i did a quick "initialize peripherals in default mode" and did not do any optimizations as per our written guide just to get a working CubeIDE project. Maybe i should have stated that - Thanks for the tip.

/Martin

Hi Martin,

You were right OSWrapper_cmsis.cpp was deleted by CubeMX, i had to copy it from a saved project, and also add some paths to the source paths (Middleware and TouchGFX were missing) and managed to get a compiling project again.

Also, i modified the linker script like this:

added:

QUADSPI (r) : ORIGIN = 0x90000000, LENGTH = 16M

ExtFlashSection :

{

*(ExtFlashSection ExtFlashSection.*)

*(.gnu.linkonce.r.*)

    . = ALIGN(0x4);

} >QUADSPI

Now the images go into the ExtFlashSection correctly:

0690X000008iaS0QAI.png

But when i run a session the screen just show rubbish pixels.

not sure if the images are loaded into the external flash, or if the program can work with the external flash correctly.

Thomas.

Hi Tomas,

Great news. You probably have to program the QSPI using ST-Link or STCubeProgrammer. I'm not sure if CubeIDE can configure these tools properly. The rubbish pixels are probably just due to that, unless you do not recognize anything in your application at all 🙂 Let me know

/Martin

Martin,

My bad, i skipped the part where I had to include the BSP files for the QuadSPI and add the code for initilization.

After I've done this, the QuadSPI was working correctly, but I still did not have my images, in fact you were right again CubeIDE  cannot load the external Flash, so I used STCubeProgrammer external loader.

Once I loaded the code+images with STCubeProgrammer, I was able to run debbug sessions with CubeIDE with all my images 🙂 !

Thanks for the help.

I will then have to figured out how to load the Flash when i'll move to my custom board, but that's another subject ;).

Thomas.

You're awesome. Good job.

Let me know if there's anything else i can do.

/Martin

TMitc
Associate II

​Wondering if anyone in this thread has been able to get a similar idea working but on the F769i Discovery board. As of right now there are no published guides or workarounds, so any information would be greatly appreciated.

-Tyler

ALomb
Senior

I updated STM32CubeIDE to latest version 1.0.2 (MX Version 5.3.0).

When I run the TouchGFX Designer from MX I still have to change "PostGenerateCommand" item with "echo Test" in the .touchgfx file.

Now, however, leaving the Designer and after generating code from MX all "extra" settings of project are lost.

For "extra" settings I mean project settings changes in linker file for QSPI , include paths related to touch and qspi drivers, output generation in hex format.

Also, to make changes to the GUI using STM32CubeIDE , do I always have to run the designer from MX?

Thanks

/Antonello