Hi TinyOS user,
Does someone have experience with JTAG debugging on Eclipse. I try to debug my
TinyOS Code with the Yeti2 Plugin and a JTAG adapter (avr dragon). I can
connect avarice with the target (ATMega 1281). The target replies the device id
and the type. The last message is: Waiting for connection on port 4242
JTAG config starting.
Found a device: AVRDRAGON
Serial number: 00:a2:00:00:28:4b
Reported JTAG device ID: 0x9704
Configured for device ID: 0x9704 atmega1281
JTAG config complete.
Preparing the target device for On Chip Debugging.
Disabling lock bits:
LockBits -> 0xff
Enabling on-chip debugging:
Extended Fuse byte -> 0xff
High Fuse byte -> 0x1c
Low Fuse byte -> 0xe2
Waiting for connection on port 4242.
Connection opened by host 127.0.0.1, port 58180.
.
.
.
The next step is to connect the debugger of the eclipse plug-in with the proxy
listening on port 4242 @ localhost. The selected debugger is avr-gdb.
The avr-gdb console shows all commands
.
.
.
672^done
673-break-insert MicaTimer.h:92
(gdb)
&"No source file named MicaTimer.h.\n"
No source file named MicaTimer.h.
673^done
674-break-insert BlinkC.nc:59
(gdb)
&"No source file named BlinkC.nc.\n"
No source file named BlinkC.nc.
674^done
675-break-insert BlinkC.nc:65
(gdb)
&"No source file named BlinkC.nc.\n"
No source file named BlinkC.nc.
675^done
676-break-insert BlinkC.nc:71
(gdb)
&"No source file named BlinkC.nc.\n"
No source file named BlinkC.nc.
.
.
The problem is I can't set breakpoints successfully. In the code file in
eclipse there are warnings "Unresolved breakpoint". With the debug button I can
start the blink code on the controller but nothing happens with the breakpoints
and I can't monitor the register. The leds on the module starts blinking as
expected from the Blink example. The led on the JTAG adapter is flashing all
the time.
If I use the option of the Yeti2 debug setup "Use full file path to set
breakpoints" the the gdb error does not appear, but the breakpoint problem is
still the same.
.
.
.
61-break-insert /home/student/workspace_neu/Blink_for_Debug/src/BlinkC.nc:65
&"No source file named
/home/student/workspace_neu/Blink_for_Debug/src/BlinkC.nc.\n"
61^done
(gdb)
62-exec-continue
62^running
(gdb)
63 ptype const_uint8_t [6]
I compiled the project with the debug option, so there should be debugging
symbols defined in the main.exe which is created by the compiler
run: "make" "-C" "/home/student/workspace_neu/Blink_for_Debug" "-f"
"/home/student/workspace_neu/Blink_for_Debug/TinyOS_Plugin_Makefile" "meshbean"
"debug"
at 27.10.2010 21:16:13
set: TOSROOT = /opt/tinyos-2.1.1
set: TOSDIR = /opt/tinyos-2.1.1/tos
set: ECLIPSE_PROJECT = /home/student/workspace_neu/Blink_for_Debug
set: PFLAGS = \"-I/home/student/workspace_neu/Blink_for_Debug/src\"
set: MAKERULES = /opt/tinyos-2.1.1/support/make/Makerules
set: COMPONENT = /home/student/workspace_neu/Blink_for_Debug/src/BlinkAppC
make: Gehe in Verzeichnis '/home/student/workspace_neu/Blink_for_Debug'
mkdir -p build/meshbean
compiling /home/student/workspace_neu/Blink_for_Debug/src/BlinkAppC to a
meshbean binary
ncc -o build/meshbean/main.exe -Os -O1 -g -fnesc-no-inline
"-I/home/student/workspace_neu/Blink_for_Debug/src" -fnesc-separator=__ -Wall
-Wshadow -Wnesc-all -target=meshbean -fnesc-cfile=build/meshbean/app.c -board=
-DDEFINED_TOS_AM_GROUP=0x22 --param max-inline-insns-single=100000
-DIDENT_APPNAME=\"/home/student/w\" -DIDENT_USERNAME=\"student\"
-DIDENT_HOSTNAME=\"student-desktop\" -DIDENT_USERHASH=0xf2f906a7L
-DIDENT_TIMESTAMP=0x4cc87a7dL -DIDENT_UIDHASH=0x7f8472aaL -fnesc-dump=wiring
-fnesc-dump='interfaces(!abstract())' -fnesc-dump='referenced(interfacedefs,
components)' -fnesc-dumpfile=build/meshbean/wiring-check.xml
/home/student/workspace_neu/Blink_for_Debug/src/BlinkAppC.nc -lm
compiled /home/student/workspace_neu/Blink_for_Debug/src/BlinkAppC to
build/meshbean/main.exe
2464 bytes in ROM
51 bytes in RAM
avr-objcopy --output-target=srec build/meshbean/main.exe
build/meshbean/main.srec
avr-objcopy --output-target=ihex build/meshbean/main.exe
build/meshbean/main.ihex
writing TOS image
make: Verlasse Verzeichnis '/home/student/workspace_neu/Blink_for_Debug'
finished (exit code: '0', took: 00:04.015)
If someone know how to get it running, let me know what's wrong.
Cheers,
Mario
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help