...
Note that Linux might require adding "sudo" in front of commands to get access to the relevant USB ports to be able to flash.
Note also that this does not install the most recent versions of this software. Therefore, it is sufficient to program but, for example, lacks debugging support with the JTAGICE3.
See the "Debugging" section for more info on how to make this work.
Tying it together – integrating it all and flashing the Zigduino firmware
...
For the Sconscript file look for all mentions of 'zigduino' and follow that example to add the relevant code for your (type of) board.
Debugging with the jtagice3 on Linux
Note, that I have not been able to get debugging working on Windows due to the lack of support for a recent standalone AVR-toolchain version on this platform. E.g., the jtagice3 has no support.
Therefore, only Linux is described. Thanks goes out to http://www.mikrocontroller.net/topic/301030#postform.
If you want to debug with the JTAGICE3, you aren't finished yet.
First off, you will need to update Avarice to the most recent version from their repo (2.13):
Code Block |
---|
svn checkout svn://svn.code.sf.net/p/avarice/code/trunk avarice-code sudo ./Bootstrap sudo ./configure sudo make sudo make install :/tmp/avarice-code/avarice$ avarice -h AVaRICE version 2.13svn20130104, Jun 30 2013 21:26:37 Usage: avarice [OPTION]... [[HOST_NAME]:PORT] Options: -h, --help Print this message. -1, --mkI Connect to JTAG ICE mkI (default) -2, --mkII Connect to JTAG ICE mkII -3, --jtag3 Connect to JTAGICE3 |
Then you need to connect your JTAGICE3 to your board. You will need to connect to 5 pins (+ 2 for ground) (reference: link ).
Note that your platform might not have a compliant 10-pin JTAG header. In that case, you will need to use the provided squid cable to connect.
For instance, this is necessary for the Zigduino platform (see also pinout on which wires to connect where).
You should have established a successful JTAG interface connection now.
To start debugging, run avarice through the following command:
Code Block |
---|
sven@ubuntu:~$ sudo avarice -P atmega128rfa1 -3 -j usb :4242
|
And finally, in another terminal, you can then start your debug session through:
Code Block |
---|
sven@ubuntu:~$ gdb
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) target remote :4242
Remote debugging using :4242
0x0041ff00 in ?? () |
View file | ||||
---|---|---|---|---|
|
...