Skip to main content
Martin KJELDSEN
Principal III
May 27, 2019
Question

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

  • May 27, 2019
  • 29 replies
  • 12715 views

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

This topic has been closed for replies.

29 replies

Valentin Gros
Associate II
May 27, 2019

This project worked for me. I successfully tried to modify the screen with TouchGFX and then I rebuilt the project with STM32Cube IDE.

Thank you Martin Kjeldsen for your help.

Martin KJELDSEN
Principal III
May 27, 2019

Awesome, you're welcome! The slow boot time is because i created the project using the board selector, initializing peripherals with default values. This includes Ethernet and apparently that stack is very slow to start.

/Martin

Franco77
Associate
May 27, 2019

Very nice! And a project for STM32F469 Disco? Is it possible? :smiling_face_with_halo:

Thanks Martin

shorai
Associate III
June 5, 2019

Me too.

Martin KJELDSEN
Principal III
May 27, 2019

I will do the video first and then i may try to do more projects.

HP_it
Senior II
May 27, 2019

One word: AWESOME!

Thank you SO much for this @Martin KJELDSEN​

This is truly appreciated - works out-of-the.. well, not box, but zip file :D Amazing!

Martin KJELDSEN
Principal III
May 28, 2019

Wohoo! Nice! Glad it works for you :)

MSeit
Visitor II
May 28, 2019

​Hi Martin!

For me it doesn't worked.

After unpacking the 7z-file I saw that the  ".project/.cproject /.mxproject..."-files are completely empty? I'm able to open the "project from file System" with CubeIDE but there is no project afterwards at project explorer. I guess the reason for that are the empty project files.

Is there anything to do before?

MSeit
Visitor II
May 28, 2019

​Hi Martin!

Sorry - was my fault - the (company-) installed 7z tool was out of date... and therefore some files were empty...?

Martin KJELDSEN
Principal III
May 28, 2019

So it's working for you now?

MSeit
Visitor II
May 28, 2019

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

scottSD
Senior III
May 30, 2019

Thanks!

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

Looking forward to your video.

Martin KJELDSEN
Principal III
June 3, 2019

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

scottSD
Senior III
May 31, 2019

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.

scottSD
Senior III
May 31, 2019

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?

Valentin Gros
Associate II
June 3, 2019

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

Martin KJELDSEN
Principal III
June 3, 2019

It's a sticky now in the TouchGFX sub-forum.

/Martin

Valentin Gros
Associate II
June 3, 2019

Ah ok I didn't see you updated it. Thank you, I'll watch it !

jea74
Associate III
June 9, 2019

Hello Martin,

Your example works fine but It does not work anymore if I do any modification in the Designer !? If I try to (re) generate the code, I get this error:

C:/TouchGFX/4.10.0/env/MinGW/msys/1.0/Ruby193/lib/ruby/gems/1.9.1/gems/touchgfx-cli-4.10.0/lib/touchgfx/generators/sw4_project_updater.rb:74:in `block in ensure_source_nodes': undefined method `add_child' for nil:NilClass (NoMethodError)

from C:/TouchGFX/4.10.0/env/MinGW/msys/1.0/Ruby193/lib/ruby/gems/1.9.1/gems/touchgfx-cli-4.10.0/lib/touchgfx/generators/sw4_project_updater.rb:62:in `each'

from C:/TouchGFX/4.10.0/env/MinGW/msys/1.0/Ruby193/lib/ruby/gems/1.9.1/gems/touchgfx-cli-4.10.0/lib/touchgfx/generators/sw4_project_updater.rb:62:in `ensure_source_nodes'

from C:/TouchGFX/4.10.0/env/MinGW/msys/1.0/Ruby193/lib/ruby/gems/1.9.1/gems/touchgfx-cli-4.10.0/lib/touchgfx/generators/sw4_project_updater.rb:24:in `run'

from C:/TouchGFX/4.10.0/env/MinGW/msys/1.0/Ruby193/lib/ruby/gems/1.9.1/gems/touchgfx-cli-4.10.0/lib/touchgfx/generators/update_project.rb:44:in `run'

from C:/TouchGFX/4.10.0/env/MinGW/msys/1.0/Ruby193/lib/ruby/gems/1.9.1/gems/touchgfx-cli-4.10.0/lib/touchgfx/cli/inside.rb:45:in `update_project'

from C:/TouchGFX/4.10.0/env/MinGW/msys/1.0/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'

from C:/TouchGFX/4.10.0/env/MinGW/msys/1.0/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'

from C:/TouchGFX/4.10.0/env/MinGW/msys/1.0/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'

from C:/TouchGFX/4.10.0/env/MinGW/msys/1.0/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'

from C:/TouchGFX/4.10.0/env/MinGW/msys/1.0/Ruby193/lib/ruby/gems/1.9.1/gems/touchgfx-cli-4.10.0/lib/touchgfx.rb:16:in `<module:CLI>'

from C:/TouchGFX/4.10.0/env/MinGW/msys/1.0/Ruby193/lib/ruby/gems/1.9.1/gems/touchgfx-cli-4.10.0/lib/touchgfx.rb:9:in `<module:TouchGFX>'

from C:/TouchGFX/4.10.0/env/MinGW/msys/1.0/Ruby193/lib/ruby/gems/1.9.1/gems/touchgfx-cli-4.10.0/lib/touchgfx.rb:8:in `<top (required)>'

from C:/TouchGFX/4.10.0/env/MinGW/msys/1.0/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'

from C:/TouchGFX/4.10.0/env/MinGW/msys/1.0/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'

from C:/TouchGFX/4.10.0/env/MinGW/msys/1.0/Ruby193/lib/ruby/gems/1.9.1/gems/touchgfx-cli-4.10.0/bin/touchgfx:6:in `<top (required)>'

from C:/TouchGFX/4.10.0/env/MinGW/msys/1.0/Ruby193/bin/touchgfx:22:in `load'

from C:/TouchGFX/4.10.0/env/MinGW/msys/1.0/Ruby193/bin/touchgfx:22:in `<main>'

and of course in Cube I also get errors:

Src/BoardConfiguration.o: In function `FrontendApplication::handleTickEvent()':

C:/Users/jea/ws_1.0.0/SPIREX/Debug/../TouchGFX/gui/include/gui/common/FrontendApplication.hpp:18: undefined reference to `Model::tick()'

Src/BoardConfiguration.o: In function `FrontendHeapBase::gotoStartScreen(FrontendApplication&)':

C:/Users/jea/ws_1.0.0/SPIREX/Debug/../TouchGFX/generated/gui_generated/include/gui_generated/common/FrontendHeapBase.hpp:75: undefined reference to `FrontendApplicationBase::gotoScreen1ScreenNoTransition()'

Src/BoardConfiguration.o: In function `FrontendHeap::FrontendHeap()':

C:/Users/jea/ws_1.0.0/SPIREX/Debug/../TouchGFX/gui/include/gui/common/FrontendHeap.hpp:68: undefined reference to `FrontendApplication::FrontendApplication(Model&, FrontendHeap&)'

C:/Users/jea/ws_1.0.0/SPIREX/Debug/../TouchGFX/gui/include/gui/common/FrontendHeap.hpp:68: undefined reference to `Model::Model()'

Src/BoardConfiguration.o:(.data._ZL12fontProvider+0x0): undefined reference to `vtable for ApplicationFontProvider'

I have also to re-exclude the simulator stuff folders and files...

Any ideas ?

Thanks in advance,

J.

Martin KJELDSEN
Principal III
June 11, 2019

Hi @jea74​,

You must remove the "post generate" command in the .touchgfx project file. It's trying to execute sw4_project_updater.rb but it does not know CubeIDE. It's a bug that has been reported.

/Martin