cancel
Showing results for 
Search instead for 
Did you mean: 

Failing to recreate LWIP example code on NUCLEO-H743ZI2

aa_hunter
Associate II

I am trying to create a simple UDP server using the NUCLEO-H743ZI2 board. I will port this to a similar microcontroller in the same family (STM32H750B) once I get it working. I am able to build the example code from this repository: 
https://github.com/stm32-hotspot/STM32H7-LwIP-Examples/tree/main/STM32H743_Nucleo_ETH

It successfully responds to pings and shows up in my router device list. I used:

STM32CubeIDE Version: 1.17.0 

STM32Cube FW_H7 Version 1.12.1.

Following the instructions in the README, I attempted to build the application from scratch on the NUCLEO board, but I haven't been able to get it to respond to a ping despite a few days of troubleshooting. 

Can someone tell me if there is something wrong with my configuration file?

 

1 ACCEPTED SOLUTION

Accepted Solutions
STackPointer64
ST Employee

Hello @aa_hunter, and welcome to ST community!

Attached is a project for the NUCLEO-H753. You can compare configurations and have a working project. Please make sure to add the proper linker file configuration to your project. Let me know if you need further assistance.

Best regards,

To improve visibility of answered topics, please click 'Accept as Solution' on the reply that resolved your issue or answered your question.

View solution in original post

8 REPLIES 8
aa_hunter
Associate II
 
STackPointer64
ST Employee

Hello @aa_hunter, and welcome to ST community!

Attached is a project for the NUCLEO-H753. You can compare configurations and have a working project. Please make sure to add the proper linker file configuration to your project. Let me know if you need further assistance.

Best regards,

To improve visibility of answered topics, please click 'Accept as Solution' on the reply that resolved your issue or answered your question.
aa_hunter
Associate II

Thanks STackPointer64! I will compare against my config and let you know of any questions. 

STackPointer64
ST Employee

Hello @aa_hunter,

Have you been able to identify the issue causing your application to malfunction?

Best regards,

To improve visibility of answered topics, please click 'Accept as Solution' on the reply that resolved your issue or answered your question.

Thanks Stackpointer,

I haven't completed testing the solution you provided yet--I'm currently on travel and it could be a couple of weeks before I will have time to test it, but I will follow up here once I do.

 

Thanks!

HI @STackPointer64,

Sorry for the delayed response to your most recent post. I have been working on a different section of the project and only in the last week have I returned to the ethernet implementation on a new Nucleo-h753zi board. 

I have been trying to compile the Lwip_demo code you posted for me last month with no success. It fails to build with the following errors:

make: *** [Middlewares/Third_Party/LwIP/system/OS/subdir.mk:19: Middlewares/Third_Party/LwIP/system/OS/sys_arch.o] Error 1
make: *** [Middlewares/Third_Party/LwIP/src/netif/ppp/subdir.mk:91: Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o] Error 1
make: *** [Middlewares/Third_Party/LwIP/src/netif/ppp/subdir.mk:91: Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o] Error 1
make: *** [Middlewares/Third_Party/LwIP/src/netif/ppp/subdir.mk:91: Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o] Error 1
make: *** [Middlewares/Third_Party/LwIP/src/netif/ppp/subdir.mk:91: Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o] Error 1
make: *** [Middlewares/Third_Party/LwIP/src/netif/ppp/subdir.mk:91: Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o] Error 1
make: *** [Middlewares/Third_Party/LwIP/src/netif/ppp/subdir.mk:91: Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o] Error 1
../Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.c: fatal error: cannot open Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.su for writing: Permission denied
compilation terminated.
make: *** [Middlewares/Third_Party/LwIP/src/netif/ppp/subdir.mk:91: Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o] Error 1
make: *** [Middlewares/Third_Party/LwIP/src/netif/ppp/subdir.mk:91: Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o] Error 1
make: *** [Middlewares/Third_Party/LwIP/src/netif/ppp/subdir.mk:91: Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o] Error 1
make: *** [Middlewares/Third_Party/LwIP/src/netif/ppp/subdir.mk:91: Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o] Error 1
make: *** [Middlewares/Third_Party/LwIP/src/netif/ppp/subdir.mk:91: Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o] Error 1
make: *** [Middlewares/Third_Party/LwIP/src/netif/ppp/subdir.mk:91: Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o] Error 1
make: *** [Middlewares/Third_Party/LwIP/src/netif/ppp/subdir.mk:91: Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o] Error 1
make: *** [Middlewares/Third_Party/LwIP/src/netif/ppp/subdir.mk:91: Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o] Error 1
make: *** [Middlewares/Third_Party/LwIP/src/netif/ppp/subdir.mk:91: Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o] Error 1
make: *** [Middlewares/Third_Party/LwIP/src/netif/ppp/subdir.mk:91: Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o] Error 1
make: *** [Middlewares/Third_Party/LwIP/src/netif/ppp/subdir.mk:91: Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o] Error 1
make: *** [Middlewares/Third_Party/LwIP/src/netif/ppp/subdir.mk:91: Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o] Error 1
"make -j20 all" terminated with exit code 2. Build might be incomplete.

 I tried to duplicate the application using the .ioc file and I can get it to compile and modifying the linker file for the RX and TX descriptors. However, when running it I don't see the IP address in my router (or using nmap) with either DHCP or by specifying a static IP address. 
What information do you need from me to help diagnose this issue?
Thanks,

Aaron

Hi @STackPointer64,

I was able to run the demo code successfully, thanks!  I will build on that code to implement the rest of my application. My concern is how to duplicate the Lwip configuration when I need to port it to my own PCB (I will use the same microcontroller). When I attempted to follow the step by step instructions on this thread:
https://community.st.com/t5/stm32-mcus/how-to-create-a-project-for-stm32h7-with-ethernet-and-lwip-stack/ta-p/49308
I was never able to get my dev board to respond to pings. 

What is the easiest way to port the demo to a new PCB? I think I should only have to change the clock configuration but maybe there are other considerations, like modification of the linker file and other code?

Thanks,

Aaron

Hello @aa_hunter

I have changed the accepted solution to my answer to make it more visible and easier to find for others who may face the same issue.

Regarding your question:
What is the easiest way to port the demo to a new PCB? I think I should only have to change the clock > configuration, but maybe there are other considerations, like modification of the linker file and other code?

I suggest you check the PCB schematics for the NUCLEO-H753 board and ensure that the PHY is properly wired and integrated into your PCB. Pay special attention to the clocking, following the manufacturer’s guidelines closely, as this is critical for the application to work correctly.

Best regards,

To improve visibility of answered topics, please click 'Accept as Solution' on the reply that resolved your issue or answered your question.