eclipse-threadx / netxduo

Eclipse ThreadX - NetXDuo is an advanced, industrial-grade TCP/IP network stack designed specifically for deeply embedded real-time and IoT applications
https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/netx-duo/index.md
MIT License
242 stars 137 forks source link

Hardfault when receiving ARP packets #170

Closed dennisvbussel closed 1 year ago

dennisvbussel commented 1 year ago

I’m trying to run a TCP Echo server. My test application is able to obtain an IP via DHCP however hardfaults before I’m able to connect to the TCP socket when handling ARP packets. Below a snapshot: image

When I build the netxduo with NX_DISABLE_ARP_AUTO_ENTRY defined. The application is (sometimes) able to connect to the TCP socket however hardfaults either on socket_accept or socket_send when eventually using ARP. image image

When I take a look at the STM32H730VBTx CPU registers the sp is at 0x2404ffc8. Which is at the very end of the RAM_D1 region (base 0x24000000 and size 320KB (0x50000)). Could this indicate a memory leak?

Toolchain STM32CubeIDE v1.12.1 ThreadX & NetXDuo v6.2.0_rel STM32H730VBTx (Code execution from external flash in XIP mode) DP83825I driver (own implementation forked from the lan8742 driver provided by ST)

dennisvbussel commented 1 year ago

Never mind.... Enabled the stack checker and the App TCP Thread stack seems to cause issues, after doubling it the issue seems to be resolved.

TiejunMS commented 1 year ago

Good to know your issue is resolved.