Workflow and integrating TouchGFX in a STM32CubeIDE Ethernet project
Hello Peeps!
The Problem
I'm coming to you today with a burning question about the general workflow and best Plan of Approach when it comes to integrating TouchGFX and Ethernet (with LWIP). I've seen more posts about this subject, but none talk about the best way to go about it — instead focusing on the embedded software itself.
What I've Done
Using Berlinger's example projects and his explanation on setting up Ethernet on the H74x boards, I've managed to get Ethernet working. Or at least, the device is pingable — I haven’t touched SSL yet.
I've also successfully generated a working TouchGFX project and imported it into STM32CubeIDE, after which I was able to add custom button functionality.
Now comes the real challenge: combining the two of them...
After tinkering with it for a few days, I've run into a few issues or difficulties, no matter which approach I try.
TouchGFX → Ethernet
I could start with the already working TouchGFX project and integrate Ethernet that way. I've tried this. But, as others in the community have pointed out, TouchGFX doesn't generate a "complete" project — it's ideally used for showcasing.
Although if you do manage to get it working properly, you skip having to set up the display, drivers, GPIOs, and other middleware manually. That’s a big plus.
Ethernet → TouchGFX
Starting from Berlinger's Ethernet implementation could work, although the file structure differs from what STM32CubeIDE currently generates. I assume it’s because he either used an older version or manually modified the layout (e.g., lwipopts.h is right under LWIP/target in his project, but it's buried deeper in Cube-generated code).
This seems like the least ideal route — you'd have to manually add the entire TouchGFX stack on top of what appears to be an older or customized project structure.
New Clean Project?
Finally, I could generate a brand-new project using STM32CubeIDE, implement Ethernet using Berlinger's settings, then add TouchGFX support. This seems like the cleanest, most scalable, and future-proof method.
That said, it’s also the most time-consuming.
What's Your Take on This?
Any best practices or tips from your experience?
A Note About the Workflow
I'm using the STM32H747I-DISCO board for quick prototyping and to explore the STM32 family.
If I go with the "new clean project" approach, I wonder — can I leverage the fact that this board is officially supported?
A lot of scripts and boilerplate are already generated by ST’s tools. Couldn't I just copy/paste many of these into my custom project instead of redoing everything from scratch?
One Last Thing — Adding TouchGFX
If I were to implement TouchGFX from scratch in a new project, how should I go about it?
I've found two long videos that explain how to set up TouchGFX on a custom board, but this isn’t a custom board. I could treat it like one, but I feel like I’d waste a lot of time when I could be using ST’s built-in support and integration instead.
Thank you for reading! Feel free to share your thoughts on this, even if it's just brainstorming!
If you've got any further quastions, feel free to let me know. I'll try to answer they ASAP.
Cheers!
