‎2019-05-21 12:53 AM
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:
(NOTE: This project does not have the modifications from our STM32F746G-DISCO/CubeMX article).
Best regards,
Martin
‎2019-05-21 02:07 AM
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!!!;)
‎2019-05-21 11:09 AM
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
‎2019-05-22 02:15 AM
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
‎2019-05-22 05:00 AM
Hi @Martin KJELDSEN​ ,
I searched for this file but I don't have it, neither in cmsis files.
Regards.
Anderson
‎2019-05-22 05:20 AM
Okay, thanks for the feedback. This may only be available for boards where you can choose cmsis under OS.
‎2019-05-22 11:43 AM
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...] ?
‎2019-05-22 11:56 AM
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.
‎2019-05-22 11:43 PM
Exactly what @eng23​ is saying. It can be a bit difficult to understand the flow, especially since CubeIDE is a more generic solution than CubeMX. being Eclipse based. Until you configure TouchGFX as the graphics middleware and build+generate, there will be no touchgfx files at all present in the right places - These are generated through the CubeMX module.
/Martin
‎2019-05-23 12:05 AM
Still no luck.
I thought that the first post was the complete guide on how to do things.
I tried to follow the guide guide with setting up the QSPI and Graphics. Should I let the Cube generate code at that point?
in step 5 you write 'Could be worked around' - do you mean 'Could' as in it could be or as in it should be worked around?
Step 6 is hard for me to follow. Is it enough just to rightclick on the folder structure and select exlude from library? Is it strictly necessary or would the project be able to build regardless?
I know you guys are working hard to get this more automated. Is there a public timeframe for this?