cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE and TouchGFX 4.10.0: Resolving compilation issues

Martin KJELDSEN
Chief III

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

95 REPLIES 95
zul-a
Associate II

@Martin KJELDSEN​ 

Thanks. Found it after a bit of digging. Next time please post the link in the comment...=)=)=)=)

Regards

Sure ;) The release note is a sticky at the top of this forum.

/Martin

More importantly. Is the issue you were having resolved?

/Martin

Ok, so maybe I am missing something here. I installed CubeIDE v1.1.0, CubeMx v 5.4. Setup TouchGFX within CubeMx and setup the location in CubeMX to be pointing to TouchGFX V4.12.3. But when I "Execute" TouchGFX it says the following:

0690X00000AqZCpQAN.png

Why is it doing this? The External application Info said "Minimum Supported Version" was 4.10.0.

The following link says the above message will be shown when "Opening a 4.10.0 project in 4.12.3":

https://touchgfx.zendesk.com/hc/en-us/articles/360009767400

It's the first time executing from Stm32CubeIDE 1.1.0 and not a 4.10.0 project.

Anyway, I selected "Yes" and was able to "Generate Code" inside TouchGFX v 4.12.3. Then I edited the project file's post generate command:

"PostGenerateCommand": "echo test"

After this, successfully generated (within TouchGFX).

However, building a project inside STM32cubeIDE v 1.1.0, still gives the errors on the SDL2 files (as seen throughout this entire thread). AND excluding them from being build does not clear up these errors.

And doing a "Exclude resource from build", does not solve this issue.

I am confused about Martin's statement that we have to "Manually generate code in TouchGFX". Does this mean Stm32CubeIDE v1.1.0 needs to be setup to no longer build TouchGFX files?

Martin, can you explain this?

By doing this manually, does that mean it has to be "excluded" from the build process within Stm32CubeIDE?

zul-a
Associate II

@scottSD​ Here are couple of things I did to make it work/compile fine.

(1) When you get the error at your 1st compile once you have set up touch gfx delete HALSDL2.hpp file.just excluding the folder from build is not good enough. see attached

(2) Once you have done step 1 compile again to be greeted by similar errors. Now exclude 2 simulator folders from build as shown in the attachment.

It should now build fine. Let me know hoe you get on

Regards0690X00000AqZXTQA3.png0690X00000AqZXOQA3.png

thanks zain.ulabidin1.5551676461061162E12

That took care of the simulator related errors. Now I'm getting the OSWrapper error.

I guess I'm going to have to refresh myself on HP's video as well as my notes. I figured these problems would have gone away with the STM32CubeIDE update.....

OK, it finally worked for me. An important step was to build the project BEFORE clicking "EXECUTE" in the CubeMX > Middleware >TouchGFX. When I did this, things seemed to play nice together.

I was able to TouchGFX 4.12.3 to play nicely with Stm32CubeIDE 1.1.0 without needing to exclude the simulator files from build using the following steps:

1) Inside STM32CubeIDE, Create new project for the STM32F7G46-Discovery.

2) Setup QUADSPI flash in STM32CubeMX perspective.

3) Setup the TouchGFX in STM32CubeMx perspective.

4) STM32CubeIDE: Project > Build All.

5) "Execute" TouchGFX in STM32CubeMX perspective.

6) This opens TouchGFX Designer. Create a design there.

7) TouchGFX > "Generate Code".

8) Edit the TouchGFX project file's "PostGenerateCommand" to be "echo test" (accept the External changes when prompted by TouchGFX).

9) Exit TouchGFX.

10) STM32CubeIDE: Run > Debug. This works except touch screen driver needs to be enabled, copied, and included. (See HP's video).

There are a number of details in #10 that would be best done by following HP's video from about 11:30:

https://www.youtube.com/watch?v=43qQhrXc3n4&list=PLibkEAAdgBQ-d4LvImVNNDlYKCX0tj6aH&index=2&t=80s

After this point, I was able to regenerate CubeMX code without any issues. To edit the TouchGFX design, simply double click the TouchGFX project file in the Project Explorer or in the project directory using Windows File Explorer (under ProjectName/TouchGFX/). DO NOT click the "Execute" button again inside the Stm32CubeMX perspective.

After any TouchGFX Designer changes, click "Generate Code" within TouchGFX and then Run > Debug within STM32CubeIDE.

In order to speed up the loading of the STM32F746-Discovery, comment out the call to MX_ETH_Init() in main.cpp.

ALI3
Associate II

Hello Everyone,

I do the settings as following screenshots and then I generate code and resolve the issues on CubeIDE.

Now when download the program on STM32F469-Disco board the screen remains black (all 4 LEDs are on).

Would you please let me know what is missing?

Thanks,

0690X00000Arra8QAB.png

0690X00000Arra3QAB.png0690X00000ArraDQAR.png0690X00000ArrZyQAJ.png0690X00000ArrZtQAJ.png0690X00000ArrZoQAJ.png0690X00000ArrZjQAJ.png