2019-05-27 04:06 AM
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
2019-05-28 06:48 AM
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
2019-05-28 11:48 PM
That's great, Marco! :) I will work on editing the video today so that it can be released.
2019-05-30 07:28 AM
Thanks!
I was also able to modify the TouchGFX code, generate it, and flash the Disco board.
Looking forward to your video.
2019-05-31 01:28 PM
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.
2019-05-31 02:41 PM
It looks like the flash is not setup with nearly enough flash space as is available for the STM32F746G-DISCO:
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?
2019-06-03 12:55 AM
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
2019-06-03 01:00 AM
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
2019-06-03 01:18 AM
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
2019-06-03 01:33 AM
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
2019-06-03 01:40 AM
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
}