HardFault in etharp_raw with LwIP and NUCLEO-H723ZG
I'm quite new to STM32, and I'm trying to get LwIP up and running on my NUCLEO-H723ZG. No matter what I've tried so far, my board has always goes into HardFault, specifically during MX_LWIP_Init(), when the HAL calls etharp_raw(). Here is the full call stack for reference:

Here are the lines of code in etharp.c in which the HardFault occurs:
etharp_request_dst():

etharp_raw():

These are the steps I followed so far:
- Set up a new CubeIDE project for the NUCLEO-H723ZG board, and enabled:
- Speculation, ICache, DCache, MPU
- Debug with Trace Async Sw
- USB Device, CDC class (I need it)
- FreeRTOS with CMSIS_V2, USE_NEWLIB_REENTRANT
- ETH, Rx descriptor to 0x30000000, Tx descriptor to 0x30000100
- LwIP, LAN8742 interface, heap pointer to 0x30000200
- Set my clock configuration to use the High Speed Internal RC (this NUCLEO board doesn't have a HSE crystal), 550MHz clock
- Set the SYS timebase to TIM6
- Followed the detailed guide by @Adam BERLINGER in this forum post
- Set up the MPU with all the correct addresses for the STM32H723
- Set every ETH pin with Very High speed
- Set all the stack sizes following the guide
- Configured LwIP, again following the guide
- Modified the code as described in the post and in the GitHub repo (including the _FLASH.ld linker script), except for adding lwiperf, since I'm not even able to reach the main loop of the code.
I've also tried:
- Doing everything as above, but without FreeRTOS:
- In this case, I didn't follow the last step of modifying the code, since any of that resulted in compilation errors. I also tried with and without modifying the linker script.
- I added MX_LWIP_Process() in the while(1) loop.
- Not enabling the MPU and cache (resulted in memory faults when run)
- With DHCP or static IP, same results
- Increase stack and heap size to 0x1000 (didn't help)
- Straight up using the default CubeMX configuration and LwIP settings without enabling RTOS (obviously didn't work)
- Commenting LWIP_RAM_HEAP_POINTER in lwipopts.h to force LwIP to use the heap instead of a pre-defined memory address.
- With a static IP address set in CubeMX, I don't get a HardFault and the while loop is entered, but I can't ping the board
- If, instead, I enable DHCP, I never get an IP address. Doing printf on gnetif.ip_addr.addr always returns 0.0.0.0
I'm quite lost on what could be the cause. Any help would be highly appreciated,
Marco
