How to debug ETH_LWIP APP using semihosting

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
The ETH_LWIP APP provides the possibility to enable debug messages. It does so using the SEGGER_RTT APP.
As an alternative, instead debug semihosting can be used following the next steps:

1. In project setting, add XMC_DEBUG_ENABLE to preprocessor symbols
3793.attach

2. Also in the project settings, under linker settings add –specs=rdimon.specs
3794.attach

3. In main.c add an extern function declaration to initialise_monitor_handles() and call it in main() function.
3795.attach

4. In file lwipopts.h add the following macro definition to enable debug messages

#define LWIP_DEBUG 1

Now you need to turn on the generation of debug messages from the module you are interested in, i.e. the DHCP module

#define DHCP_DEBUG LWIP_DBG_ON

More details can be found at http://www.nongnu.org/lwip/2_1_x/group__lwip__opts__debug.html

5. In the debug configuration, semihosting need to be enabled.
0 Likes
0 Replies