2025-06-27 12:48 AM
Hello Peeps!
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.
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.
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.
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.
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.
Any best practices or tips from your experience?
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?
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!
2025-06-27 2:25 AM
Hello @Troy_457 and welcome to the ST community,
As STM32H747I-DISCO is natively supported by TouchGFX, is convenient for you to start with TouchGFX then add Ethernet.
But you need first to check the RAM used for both functions in order to prevent any overlap. Check also the MPU configuration.
You need to go step by step by adding functions, so don't go add all the staff from the beginning.
Good luck.
2025-06-27 2:48 AM
Hi @mƎALLEm , and thank you for the warm welcome!
I’ve actually tried this approach already, but got stuck after a few days of tinkering.
I started by generating a working TouchGFX project and imported it into CubeIDE, after which I attempted to integrate Adam Berlinger’s Ethernet example.
While I managed to build and run his standalone Ethernet project successfully, implementing it into the TouchGFX-generated project has proven quite difficult. The file structure is vastly different, and I feel like some of the CubeMX-generated components (maybe middleware or configuration files?) are missing from the TouchGFX project.
I come from a hardware (electronics) background, so I’m still getting up to speed with embedded development. I suspect RAM layout or MPU misconfiguration might be causing issues, because although the combined project builds and runs, the display stays off (no backlight, no output) and the Ethernet interface isn't pingable either. The absence of any runtime errors makes it harder for me to pinpoint the root cause.
Just to clarify: both the Ethernet project and the TouchGFX project run fine independently — the problem only appears when trying to combine them.
If you still believe this is the best way forward, I’d be happy to give it another try.
Would you be willing to share what I should check in the MPU configuration or RAM usage to avoid conflicts?
Any help would be much appreciated, as I’ve been struggling to find a clear path forward on my own with this method.
Thanks again!
2025-06-27 2:57 AM - edited 2025-06-27 2:59 AM
Hard to provide more details.
You need to study and check what memories was used in your separated project with TouchGFX project and what memories was used in your separated ETH project. Same for the MPU: region numbers used, region configured. This is the first step you need to do.
In mean time as TouchGFX project is using FreeRTOS, you need to create your ethernet project with RTOS. I think this is the most important step to do: Ethernet + FreeRTOS.
As I said you need to go step by step and you shouldn't add all the staff from the beginning. This will makes difficult to debug ..