just a little follow-on with the following setup:
PC---(usb & serial)---ICEMK2---(JTAG)---MIB510/MICAz(mote, not the isp jtag
port!)
I cannot make it connect/communicate using the usb cable (though I /think/
AVRstudio saw the pod via USB) to the pod. /dev/usb<N>, /dev/ttyUSB<N>, and
various other guesses didn't work and all that appears in device manager is
"Jungo:JTAGICE mkII".
ice-gdb seems fine via /dev/ttyS0 (even though the pod is getting power from
the usb port!)
ce-insight seems to start up fine, loads the program, opens the insight
debug window, but keeps popping up a "connect to target" window, none of
which settings seem to work... Any help would be greatly appreciated! :)
Cheers, Ben
!p.s. cygwin outputs below! :
The following seems to work fine, and debugging with ice-gdb is possible
(but ugly!):
$ avarice -2rl -j /dev/ttyS0
AVaRICE version 2.4, Feb 3 2006 19:01:16
Defaulting JTAG bitrate to 1 MHz. Make sure that the target
frequency is at least 4 MHz or you will likely encounter failures
controlling the target.
JTAG config starting.
Found a device: JTAGICEmkII
Serial number: 00:b0:00:00:08:92
Reported JTAG device ID: 0x9702
Configured for device ID: 0x9702 atmega128
JTAG config complete.
Reading Fuse Bytes:
Extended Fuse byte -> 0xff
High Fuse byte -> 0x19
Low Fuse byte -> 0xff
Reading Lock Bits:
Lock bits -> 0xff
Bit 7 [ Reserved ] -> 1
Bit 6 [ Reserved ] -> 1
Bit 5 [ BLB12 ] -> 1
Bit 4 [ BLB11 ] -> 1
Bit 3 [ BLB02 ] -> 1
Bit 2 [ BLB01 ] -> 1
Bit 1 [ LB2 ] -> 1
Bit 0 [ LB1 ] -> 1
and starting up a debug with ice-gdb seems to work okay (IF I use the serial
cable):
[EMAIL PROTECTED] /opt/tinyos-2.x/apps/Blink
$ export AVARICE_ARGS='--mkII --jtag /dev/ttyS0'
[EMAIL PROTECTED] /opt/tinyos-2.x/apps/Blink
$ ice-gdb build/micaz/main.exe
AVaRICE version 2.4, Feb 3 2006 19:01:16
Defaulting JTAG bitrate to 1 MHz. Make sure that the target
frequency is at least 4 MHz or you will likely encounter failures
controlling the target.
JTAG config starting.
Found a device: JTAGICEmkII
Serial number: 00:b0:00:00:08:92
Reported JTAG device ID: 0x9702
Configured for device ID: 0x9702 atmega128
JTAG config complete.
Erasing program memory.
Erase 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 -> 0x19
Low Fuse byte -> 0xff
Downloading FLASH image to target...............
Download complete.
Waiting for connection on port 6423.
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "--host=i686-pc-cygwin --target=avr"...
Connection opened by host 127.0.0.1, port 2339.
0x00000000 in __vectors ()
(gdb)
but using ice-insight:
$ ice-insight build/micaz/main.exe
AVaRICE version 2.4, Feb 3 2006 19:01:16
Defaulting JTAG bitrate to 1 MHz. Make sure that the target
frequency is at least 4 MHz or you will likely encounter failures
controlling the target.
JTAG config starting.
Found a device: JTAGICEmkII
Serial number: 00:b0:00:00:08:92
Reported JTAG device ID: 0x9702
Configured for device ID: 0x9702 atmega128
JTAG config complete.
Erasing program memory.
Erase 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 -> 0x19
Low Fuse byte -> 0xff
Downloading FLASH image to target...............
Download complete.
Waiting for connection on port 6423.
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf
> Of Murray,
> Ben
> Sent: 04 February 2008 12:31
> To: Tinyos help Forum (E-mail)
> Subject: [Tinyos-help] JTAG connection/debugging MICAz with mib510 and
> AVRATJTAGICE_MKII
>
>
> Hi
> I had a trawl through the forums for mkII related woes and
> came across this
> guide:
> http://www.inrialpes.fr/planete/people/francill/stuff/AvrJtagIce.pdf
> but I have a few issues (may actually be a side issue with
> USB) getting it
> all set up...
>
> I can:
> a-set the jtag fuse when the mib510 is connected to the serial port
> b-connect to the mkII using avarice/ice-gdb/ice-insight when
> the pod is on
> the serial port /dev/ttyS0
>
> I cannot:
> c-program or set fuses etc on the mote when the pod is on the
> serial and is
> connected to the jtag for the mote/mib510
> d-run the debugger having connected to the pod - it appears
> to want a second
> serial link to the mib510 rather than going via the pod's
> jtag connector.
> e-connect or do anything via the usb port (using avarice
> --mkII --jtag usb
> give the error that there is no such file/directory as
> usb...? It seems
> happy connecting via serial /dev/ttyS0 but then ice-insight
> also seems to
> want to connect via /ttyS0)
>
> Perhaps it's a usb connection error (Cygwin / XP / T2) or
> perhaps there's a
> "better" way to go about debugging someone can suggest, or a
> guide-for-idiots type introduction to jtag debugging for T2/nesC? Is
> AVRStudio any use for debugging TinyOS programs?
>
> Cheers!
> Ben
>
> **************************************************************
> *****************
> Please consider the environment before printing this email.
> **************************************************************
> *****************
> This email and any files transmitted with it are intended
> solely for the use of
> the individual or entity to whom they are addressed and may
> not be divulged to
> any third party without the express permission of the
> originator. Any views
> expressed in this message are those of the individual sender,
> except where the
> sender specifically states them to be the views of Thales
> Research & Technology
> (UK) Limited.
> **************************************************************
> *****************
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/t
inyos-help
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help