cancel
Showing results for 
Search instead for 
Did you mean: 

CubeIDE 1.0.0 + TouchGFX 4.10.0: Working project inside (STM32F746G-DISCO)

Martin KJELDSEN
Chief III

Hello everyone,

Due to an increasing number of people having issues with CubeIDE and TouchGFX Integration i'm attaching a working project for STM32F746G-DISCO for your inspection - There were a good number of things to do before it worked, only some of which i highlighted in my quick-guide and even some of those steps were a bit ambiguous and could be executed in different ways.

I've written down what i've done to get this project working and i will use this in planning a video tutorial - It has to be somewhat official, so i can't simply start up the screencast and start talking. But i'll keep you updated.

/Martin

84 REPLIES 84

Hi Martin!

YES!!! There was one warning while compiling – but nothing serious – and then display showed the two red and green boxes and buttons.

I also tried to do some changes with TouchGfx – so implemented two company backgrounds – and it worked from the first trial on!!

Later on I also changed names and behavior and properties of buttons inside TouchGfx, saved it, switched immediately to CubeIDE and the project compiled with all changes without any error! No need to generate code inside TouchGfx - only saving it.

Thanks a lot!!

I’ve seen that there are a huge number of differences to my first generated code (made with CubeIDE & TouchGfx like described by ST in former articles) especially also in the project preferences.

Some behavior of my CubeIDE was strange too before – could not “exclude from build�??? – and this also worked now. I guess you have had a lot of work to get it run ;-)?

Waiting for an instruction document or video or whatever to see the magic!

Best regards Marco

That's great, Marco! 🙂 I will work on editing the video today so that it can be released.

scottSD
Senior III

Thanks!

I was also able to modify the TouchGFX code, generate it, and flash the Disco board.

Looking forward to your video.

scottSD
Senior III

Martin,

I am pretty new with the STM32 in general. I was adding some images into your example with TouchGFX and got the following error:

==========================================================================

............ region `FLASH' overflowed by 45788 bytes

collect2.exe: error: ld returned 1 exit status

make: *** [makefile:99: f746g-disco-test.elf] Error 1

"make -j8 all" terminated with exit code 2. Build might be incomplete.

==========================================================================

I have created other projects with TouchGFX that used more images in the past so it is likely your example project has something setup up differently that is causing it to use the flash differently. In those previous examples, I used the TouchGFX "run target" option which had no problems. When running your example, the "run target" button is disabled.

Any ideas on how to resolve this would be greatly appreciated.

It looks like the flash is not setup with nearly enough flash space as is available for the STM32F746G-DISCO:

0690X000008aI3DQAU.png

I found the following TouchGFX link discussing configuration of the STM32F746G-DISCO and it said to set this to 24 instead of 1:

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

However, when I tried the configuration (by using the STM32CubeMX perspective in STM32CubeIDE) I got a different compile error altogether. This time, it is failing for not knowing where the TouchGFX simulator files (SDL2/SDL_video.h) . I ran into this error when trying to use STM32CubeIDE in the past and did not find a way to resolve this.

Interestingly, I ran into this same or a similar error when trying to get Atollic TrueSTUDIO to work with TouchGFS.

Any suggestions?

The "Exclude build" problem is a bug. It won't update the folders graphically in the IDE, but it IS actually excluded. Sometimes it does show though. It's been reported to the CubeIDE team.

Did you check out the video i made?

/Martin

Hope you enjoyed the video. I realize there are a few issues with it based on feedback from users that i may fix up.

/Martin

Valentin Gros
Associate III

Hello Martin,

For now I'm using the working project you gave us. I'm creating a pulse generator for test equipment. You were speaking of a tutorial video in a previous comment , but I can't find the link ?

Best regards,

Valentin

Hi Scott,

The linker script for the project you're working on defines a memory range for various segments (e.g. QUADSPI flash where images are placed by default). You've added enough images to your project to overflow this region by 45788 bytes. If you're adding large full screen images and your bit depth is e.g. 24 this would potentially take up a lot of memory.

Can you tell me something about the nature of your images?

/Martin

Hi @scottSD​,

Oops, didn't notice you'd already replied. The FLASH region is internal flash. QSPI flash will start at 0x90000000 and the buld analyzer does not mention this because it only knows the MCU and the built in flash.

Check the linker script to see how much is allocated for the QSPI region. Here's the gcc linker script i have for an STM32F746G-DISCO project made with CubeIDE. Here, QSPI is 16MB. Check your images and bitdepth and it may make sense.

/* Specify the memory areas */
MEMORY
{
RAM (xrw)      : ORIGIN = 0x20000000, LENGTH = 320K
FLASH (rx)     : ORIGIN = 0x8000000, LENGTH = 1024K
QUADSPI (r)    : ORIGIN = 0x90000000, LENGTH = 16M
}