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

STM32CubeIDE and TouchGFX 4.10.0: Resolving compilation issues

  • May 21, 2019
  • 25 replies
  • 17915 views

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

This topic has been closed for replies.

25 replies

Franco77
Associate
May 21, 2019

Hi Martin, this your post is very precious, I'll try asap and I'll write a feedback for sure. Maybe some screenshots could be very helpful for better understandings 5/6/7 steps. THANKS!!!;)

eng23
Senior
May 21, 2019

Hi @Martin KJELDSEN​ ,

This tutorial worked for me! Only one thing that I needed to change was NOT excluding from build the OSWrappers.ccp, because if I exclude I get error generating .ELF file in touchgfx::OSWrappers::signalVSync() call.

So I included again and it worked!

Thanks for the tutorial.

Regards!

Anderson

Martin KJELDSEN
Principal III
May 22, 2019

Hi @eng23​,

Glad it helped. The reason for excluding the OSWrappers.cpp is because there may be two versions of it (+OSWrappers_cmsis.cpp). I guess you didn't have that one in your project? Maybe i'll update the guide to be more clear about this.

/Martin

eng23
Senior
May 22, 2019

Hi @Martin KJELDSEN​ ,

I searched for this file but I don't have it, neither in cmsis files.

Regards.

Anderson

HP_it
Senior II
May 22, 2019

Sorry, I can't get this to work.

During step 3 when I should build my project I get the following:

20:41:04 **** Build of configuration Debug for project Test1 ****
make -j4 all 
arm-none-eabi-gcc -mcpu=cortex-m7 -g3 -c -x assembler-with-cpp --specs=nano.specs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb -o "Startup/startup_stm32f746nghx.o" "../Startup/startup_stm32f746nghx.s"
arm-none-eabi-g++ "../Src/BoardConfiguration.cpp" -mcpu=cortex-m7 -std=gnu++14 -g3 -DUSE_HAL_DRIVER -DSTM32F746xx -DDEBUG -c -I../Middlewares/Third_Party/FreeRTOS/Source/include -I../TouchGFX/gui/include -I../TouchGFX/generated/fonts/include -I../Drivers/CMSIS/Device/ST/STM32F7xx/Include -I../TouchGFX/generated/texts/include -I../Src -I../Drivers/STM32F7xx_HAL_Driver/Inc -I../TouchGFX/generated/images/include -I../Middlewares/ST/STM32_USB_Host_Library/Core/Inc -I../Middlewares/ST/STM32_USB_Host_Library/Class/CDC/Inc -I../Inc -I../Drivers/CMSIS/Include -I../Middlewares/ST/TouchGFX/touchgfx/framework/include -I../TouchGFX/generated/gui_generated/include -I../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1 -I../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS -I../Drivers/STM32F7xx_HAL_Driver/Inc/Legacy -I../Middlewares/Third_Party/FatFs/src -O0 -ffunction-sections -fdata-sections -fno-exceptions -fno-rtti -fno-threadsafe-statics -fno-use-cxa-atexit -Wall -fstack-usage -MMD -MP -MF"Src/BoardConfiguration.d" -MT"Src/BoardConfiguration.o" --specs=nano.specs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb -o "Src/BoardConfiguration.o"
arm-none-eabi-g++ "../Src/GPIO.cpp" -mcpu=cortex-m7 -std=gnu++14 -g3 -DUSE_HAL_DRIVER -DSTM32F746xx -DDEBUG -c -I../Middlewares/Third_Party/FreeRTOS/Source/include -I../TouchGFX/gui/include -I../TouchGFX/generated/fonts/include -I../Drivers/CMSIS/Device/ST/STM32F7xx/Include -I../TouchGFX/generated/texts/include -I../Src -I../Drivers/STM32F7xx_HAL_Driver/Inc -I../TouchGFX/generated/images/include -I../Middlewares/ST/STM32_USB_Host_Library/Core/Inc -I../Middlewares/ST/STM32_USB_Host_Library/Class/CDC/Inc -I../Inc -I../Drivers/CMSIS/Include -I../Middlewares/ST/TouchGFX/touchgfx/framework/include -I../TouchGFX/generated/gui_generated/include -I../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1 -I../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS -I../Drivers/STM32F7xx_HAL_Driver/Inc/Legacy -I../Middlewares/Third_Party/FatFs/src -O0 -ffunction-sections -fdata-sections -fno-exceptions -fno-rtti -fno-threadsafe-statics -fno-use-cxa-atexit -Wall -fstack-usage -MMD -MP -MF"Src/GPIO.d" -MT"Src/GPIO.o" --specs=nano.specs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb -o "Src/GPIO.o"
arm-none-eabi-g++ "../Src/HW_Init.cpp" -mcpu=cortex-m7 -std=gnu++14 -g3 -DUSE_HAL_DRIVER -DSTM32F746xx -DDEBUG -c -I../Middlewares/Third_Party/FreeRTOS/Source/include -I../TouchGFX/gui/include -I../TouchGFX/generated/fonts/include -I../Drivers/CMSIS/Device/ST/STM32F7xx/Include -I../TouchGFX/generated/texts/include -I../Src -I../Drivers/STM32F7xx_HAL_Driver/Inc -I../TouchGFX/generated/images/include -I../Middlewares/ST/STM32_USB_Host_Library/Core/Inc -I../Middlewares/ST/STM32_USB_Host_Library/Class/CDC/Inc -I../Inc -I../Drivers/CMSIS/Include -I../Middlewares/ST/TouchGFX/touchgfx/framework/include -I../TouchGFX/generated/gui_generated/include -I../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1 -I../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS -I../Drivers/STM32F7xx_HAL_Driver/Inc/Legacy -I../Middlewares/Third_Party/FatFs/src -O0 -ffunction-sections -fdata-sections -fno-exceptions -fno-rtti -fno-threadsafe-statics -fno-use-cxa-atexit -Wall -fstack-usage -MMD -MP -MF"Src/HW_Init.d" -MT"Src/HW_Init.o" --specs=nano.specs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb -o "Src/HW_Init.o"
../Src/GPIO.cpp:2:10: fatal error: touchgfx/hal/GPIO.hpp: No such file or directory
 #include <touchgfx/hal/GPIO.hpp>
 ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
../Src/BoardConfiguration.cpp:1:10: fatal error: common/TouchGFXInit.hpp: No such file or directory
 #include <common/TouchGFXInit.hpp>
 ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Src/subdir.mk:87: Src/GPIO.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [Src/subdir.mk:85: Src/BoardConfiguration.o] Error 1

Another note on that step:

Shouldn't you make sure that the LCD RESET Pin XRES is tied to PI12 [LCD_DISP...] ?

eng23
Senior
May 22, 2019

Hi,

In step 3 you will have errors because touchgfx files are not generated at this moment, you must execute until step 7 to compile without errors.

About the reset pint question you are right, is necessary to set this. You can follow this other tutorial about CubeMX settings, because there are others like QUADSPI, LTDC...

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

Regards.

Nilesh Badodekar
Associate
May 24, 2019

Hi @Martin KJELDSEN​ , Can I follow the same method to use STM32L4R9-EVAL board with 1315A LCD?

Is there a reason TouchGFX is not enabled with CubeIDE on this platform? Only STemWIN shows up.

Thanks!

Martin KJELDSEN
Principal III
May 24, 2019

There's a good reason, yes. That combination is not supported yet from CubeMX side. It will be in version 6.0 at the end of the year - I know that's not very encouraging :\

/Martin

Pascal1
Associate
May 28, 2019

Hi Martin,

Even if it's not supported from CubeMX side (which just means that TGFX files are not populated and IDE right configured automatically), it would be nice to have the same kind of working project on L4R9 (ideally + DPI screen) in CubeIDE, as a proven/checked guide.

It would suppose for us manually changes to update gui parts during dev but at least it would be usefull to be sure on the correct files choice and right configuration on this board.

It would be an acceptable solution to wait the full integration at the end of the year.

Thanks.

Morgan1
Visitor II
May 26, 2019

Hi Martin,

I've followed the guide, the only (minor) issue I found was the path

\Middlewares\ST\TouchGFX\touchgfx\lib\core\cortex_mx\gcc\

for me is actually

\Middlewares\ST\TouchGFX\touchgfx\lib\core\cortex_m7\gcc\

I can test that most of the steps have been successful by checking what issues they cause when omitted, however unfortunately I still have a problem:

arm-none-eabi-g++ -o "car3.elf" @"objects.list" -ltouchgfx-float-abi-hard -mcpu=cortex-m7 -T"C:\Users\Morgan\STM32CubeIDE\workspace_1.0.0\car3\STM32F746NGHX_FLASH.ld" --specs=nosys.specs -Wl,-Map="car3.map" -Wl,--gc-sections -static -L"../ \Middlewares\ST\TouchGFX\touchgfx\lib\core\cortex_m7\gcc\" --specs=nano.specs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -lstdc++ -lsupc++ -Wl,--end-group

c:/st/stm32cubeide_1.0.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.make.win32_1.0.0.201904231117/tools/bin/sh: syntax error: unterminated quoted string

make: *** [makefile:75: car3.elf] Error 2

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

Regards,

Morgan

Martin KJELDSEN
Principal III
May 27, 2019

Hi Morgan, yes, the x was supposed to refer to the core (e.g. x = 4f or 7). Sorry that wasn't more clear.

Seems like there's an error in the generated command, but there are no unterminated quoted strings. Not something i've seen before (with my limited CubeIDE experience) and it doesn't seem like you have weird characters or spaces that need escaping either. Strange issue - i'll have to see if i come across it myself at some point - Can you tell me the exact steps you tried?

/Martin

HP_it
Senior II
May 26, 2019

I must be doing something fundamentally wrong when I try to create this project.

Would you (@Martin KJELDSEN​  be able to make a short video showing how to set this up? I'm going crazy about this.

Martin KJELDSEN
Principal III
May 27, 2019

Hi,

Argh. Sorry you're having these issues - I'll see if i can get the time to do a short video on this.

Which issues are you having now?

HP_it
Senior II
May 27, 2019

Well that's the problem, I'm not sure where things go south.

The different guides all use EWARM as the target environment which is not a possible solution for me since I'm trying to prepare a workspace for students who will not be able to use IAR for example. even with the Kickstart edition the code limit is 32k so that won't work (current workspace is about 48k)

CubeIDE seems the way to go but I would imagine the same problems with missing BSP files apply here?

There seems to be a very specific order in which to generate the MX code and the TouchGFX project files to make the system work. It could also be that somehow I'm missing some files or dependencies on my computer but I'm not good enough with eclipse to know my way around to those specific menus. Therefore a video would solve a lot of my problems because I can just pause that to keep up.

If you can find the time it would be greatly appreciated! It could be a single one-take in Danish if you'd like that better. It doesn't event have to be public. I would be interested in doing a video guide afterward with the same content (if you have some specific rules for creating content which I don't)

Martin KJELDSEN
Principal III
May 27, 2019

Please find a working STM32F746G-DISCO project in here:

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

Working on the script and video tutorial now.

Martin KJELDSEN
Principal III
May 28, 2019

Hi Guys,

I've shot a video of how to get a working STM32F746G-DISCO CubeIDE 1.0 project using TouchGFX 4.10. I won't have time to finish editing (since it's a public company video) until monday next week, probably. But at least it's shot and i just need to put the finishing touches on it.

/Martin

Martin KJELDSEN
Principal III
May 29, 2019

I just updated the original post with a video tutorial.

Martin KJELDSEN
Principal III
May 29, 2019

I also changed the title of this post to: "STM32CubeIDE and TouchGFX 4.10.0: Resolving compilation issues"