Hey all,
I'm having an issue getting the AN00241 lib_ethernet example working on a custom XMOS board (XEF216-512-TQ128-C20, with a KZ9131 PHY). (I've successfully run other code on this board, including the lib_xua examples with audio output, so the XMOS/XSYS interface itself is fine, there's probably just some issues with the PHY I'm using, so I want to debug)
I'm using an xTAG-3 programmer on Mac OS X Ventura with the latest XTC_15.2.1.
My problem is that I can't get any debug_printf() messages to show, and it seems like the board itself refuses to run/hangs when I try run it in --xscope mode.
Steps to reproduce:
Downloading the latest GitHub lib_ethernet (and other needed libraries)
cd lib_ethernet/examples/AN00241_gigabit_ethernet_demo_slicekit
make all
xrun bin/AN00241_gigabit_ethernet_demo_slicekit.xe
This appears to run properly (putting physical probes on the board shows that GPIO is changing state as expected).
However if I instead do
xrun --xscope bin/AN00241_gigabit_ethernet_demo_slicekit.xe
then I never see any debug_printf() messages, even if I put them at the top of every main function called and it appears like the program is not even running / the GPIO does not toggle as expected.
I have tried xgdb, with 'connect' / 'load' / 'c', and the program appears to run, but there is still no debug output, and there are also no line numbers so I can't add any breakpoints. I've removed the -O3 flag, added -g everywhere I can (including in lib_ethernet), as well as -fxscope and -DDEBUG_PRINT_ENABLE=1 but still no cigar.
If anyone has any suggestions I'd be very grateful!
lib_ethernet debug_printf() not working
-
- Member
- Posts: 8
- Joined: Tue Sep 12, 2023 11:43 pm
-
- Respected Member
- Posts: 367
- Joined: Wed May 31, 2017 6:55 pm
Does your hardware provide the xlink connections to the xTAG connector, and is the port declaration in your XN file consistent with the hardware?
Also, have you tried a completely stripped down test program that just contains a debug_print()? Better to establish that it is working in isolation.
Also, have you tried a completely stripped down test program that just contains a debug_print()? Better to establish that it is working in isolation.