cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX project with custom board

kb24
Senior

Hi, I will use STM32H7B3RI in our final product and its not available in TouchGFX so I need to develop a project with STM32CubeMX. I have STM32H7B3I-DK now and I can create projects and run those on development kit. TouchGFX generates its own STM32CubeMX and STM32CubeIDE files so I can generate code and run it. I created new STM32CubeMX project and did exact same settings with the project that generated by TouchGFX. I compared both generated files and added missing files like BSP drivers. When I compile project generated by TouchGFX it gives a big .bin file (~2 GB) but when I compile my project it gives small .bin file (~1 MB), also I can’t upload my project to board. What am I missing? Is there any guide to create a project with CubeMX for any board?

1 ACCEPTED SOLUTION

Accepted Solutions
kb24
Senior

Hi, thank you for the answer. Actually I watched Embryonic.dk's video before but I didn't know he has another video for external flash. Here is the video link.

https://www.youtube.com/watch?v=ELMK35I86QE&ab_channel=embryonic.dk and it helped me a lot. Thank you to him.

First I created a project with TouchGFX, we need some files generated by it. I will call this project original project.

Then I created a project with CubeMX and did exact same setting with original projects CubeMX file. After that I generated code.

I designed two simple screens with image buttons in generated TouchGFX file.

0693W000008wPUxQAM.jpgIn the CubeMX I was using this package so I get some missing files from there.

First I copied Components folder to project directory from C:\Users\user_name\STM32Cube\Repository\STM32Cube_FW_H7_V1.8.0\Drivers\BSP\

0693W000008wPWUQA2.jpgI need these 3 folder in Components so I deleted others.

Then I copied STM32H7B3I-DK  folder from same directory and deleted unnecessary files.0693W000008wPYuQAM.jpgThese 9 files are needed.

After that I created a folder to copy files from original project in Core/Inc.

0693W000008wPc3QAE.jpgThen in the CubeIDE I add those folders as Source Location and Includes otherwise we cant have correct output files and my problem was this.

0693W000008wPd1QAE.jpgThen I added this files to Includes for both C and C++.

0693W000008wPedQAE.jpgAfter that we should copy following files from original project our TouchGFX/target. It will provides touchscreen events etc.0693W000008wPiLQAU.jpgFinally we should make our STM32H7B3LIHXQ_FLASH.ld file same with original project. After all these steps I could upload project and saw its working.

View solution in original post

3 REPLIES 3
Romain DIELEMAN
ST Employee

Hi,

I believe you already had a look at the online documentation and the board bring up / TouchGFX AL development articles, but I can recommend the ST official videos and especially this one from Embryonic.dk . Hope this helps.

When comparing the application template for the H7B3 dk board and your custom one watch out for custom code which can have been added to the generated files (especially the ones in TouchGFX/target). And just to make sure you have also properly configured your board and your display, are you able to transmit a framebuffer to the display without TouchGFX ?

/Romain

kb24
Senior

Hi, thank you for the answer. Actually I watched Embryonic.dk's video before but I didn't know he has another video for external flash. Here is the video link.

https://www.youtube.com/watch?v=ELMK35I86QE&ab_channel=embryonic.dk and it helped me a lot. Thank you to him.

First I created a project with TouchGFX, we need some files generated by it. I will call this project original project.

Then I created a project with CubeMX and did exact same setting with original projects CubeMX file. After that I generated code.

I designed two simple screens with image buttons in generated TouchGFX file.

0693W000008wPUxQAM.jpgIn the CubeMX I was using this package so I get some missing files from there.

First I copied Components folder to project directory from C:\Users\user_name\STM32Cube\Repository\STM32Cube_FW_H7_V1.8.0\Drivers\BSP\

0693W000008wPWUQA2.jpgI need these 3 folder in Components so I deleted others.

Then I copied STM32H7B3I-DK  folder from same directory and deleted unnecessary files.0693W000008wPYuQAM.jpgThese 9 files are needed.

After that I created a folder to copy files from original project in Core/Inc.

0693W000008wPc3QAE.jpgThen in the CubeIDE I add those folders as Source Location and Includes otherwise we cant have correct output files and my problem was this.

0693W000008wPd1QAE.jpgThen I added this files to Includes for both C and C++.

0693W000008wPedQAE.jpgAfter that we should copy following files from original project our TouchGFX/target. It will provides touchscreen events etc.0693W000008wPiLQAU.jpgFinally we should make our STM32H7B3LIHXQ_FLASH.ld file same with original project. After all these steps I could upload project and saw its working.

Perfect 👌

/Romain