Document 7293481

Download Report

Transcript Document 7293481

JTAGICE mk II
CS-423
Dick Steflik
JTAGICE mk II

Atmel's Official programmer for 8 & 32 MCUs

Works with AVR Studio 4 and AVR32 Studio 2


GUI based programmer/debugger
avr32program

installed with AVR32Studio (/bin)

command line access to programming and insight
into AVR32 development boards
JTAGICE mk II
Notice the connector placement
avr32program



use from inside of cygwin or a windows
command window
avr32program -h ;for options help
avr32program help commands ;for command
help
options
-h, --help
-l, --list
Display this help and exit.
Detect and print information about available
USB programmers.
-v, --verbose <level>
Display diagnostic messages.
-V, --version
Print the version number.
-c, --comport <port>
Connect to given serial port. If <port> is
'USB:serial', the programmer with the given
serial number will be used. The default is to
connect to a USB device.
-x, --xmlpath <directory> Specify path to XML part description files.
-p, --programmer <programmer> Specify which kind of programmer to use.
Can be either jtagicemkii (the default),
stk600 or avrone.
-G, --gui
Indicates that program is being called from a
graphical user interface. Changes progress
reporting.
-D, --daisy <devbefore,devafter,bitsbefore,bitsafter>
Specify JTAG daisy-chain parameters.
--part <partname>
Specify part name, fail unless target matches.
commands
chiperase
cpuinfo
Perform a JTAG chip_erase command.
Get CPU info from the CONFIG0 and CONFIG1
registers.
erase [-f <type@address>] [-u] [-o] [-a]
Perform a flash chip erase.
flashtest -f <type@address> [-e] [test type] [test options] Perform test(s) on flash.
getfreq <clock> ...
getvtg <voltage> ...
halt
Stop CPU execution. Causes the CPU to enter debug mode.
help
Get help on using avr32program.
program [-F <format>] [-O <offset>] [-s <size>] [-v] [-f <type@address>]
[-e] [-R] [-r] [-c <clocksource>] <file>
Program the memory with contents from <file>.
read [-F <format>] [-o <file>] [-O <offset>] -s <size> [-C]
Read <size> bytes from memory at <offset>.
commands
readfuses -f type@address <fuse> ...
Read flash fuses.
readregs <reg> ...
Read CPU registers.
reset [-r | --run=<address>] Reset CPU. Optionally cause
CPU to start executing after reset.
run [-R] [-O <offset>]
Cause CPU to start executing.
secureflash
Protect chip by setting security bit.
selftest
Run board selftest.
setfreq <clock>=<freq> ...
Set <clock>'s frequency to <freq>.
setvtg <voltage>=<val> ...
Set voltage <voltage> to value <val>.
verify [-F <format>] [-O <offset>] [-s <size>] <file>
Compare the contents of the given file to
the memory at <offset>.
writefuses -f <type@address> <fuse>=<val> ...
Write <val> to flash fuse <fuse>.
writeregs <reg>=<val> ...
Write <val> to register <reg>.
program command
program [-F <format>] [-O <offset>] [-s <size>] [-v]
[-f <type@address>] [-e] [-R] [-r] <file>
Program the memory with contents from <file>.
The format of the file is determined from its
suffix unless specified. If no suffix is
recognized, ELF is assumed.
-F, --format <format>
Specify format of file. Supported input
formats are 'bin' (raw binary) and 'elf' (ELF).
-O, --offset <offset>
The contents of the file will be written to
memory at the <offset> address. The default
offset is 0 for binary files. For ELF files,
the default offset is the ELF file's entry
point.
-s, --size <size>
-v, --verify
-e, --erase
Specify the number of bytes to write. The
default is to write the entire contents of
the file.
Verify memory after programming.
If programming flash, unlock and erase flash
sectors before programming.
-f, --flash <type@address>
Notify avr32program of a <type> flash memory at<address>
<type> possible values is currently limited to
'cfi' and 'internal'.
-R, --reset
Reset CPU after programming memory.
-r, --run, --run=<offset> Cause CPU to start executing after programming.
<address> is an optional address to start
executing from. If --reset is also specified,
execution will start after reset.
-c, --clock
Specify CPU clock source to use when programming
(support limited to UC3 parts). Valid clock
sources are 'xtal' (crystal connected to osc0),
'extclk' (external clock connected to osc0),
'int' (internal RC oscillator).
program example
avr32program program -e -v -fcfi@0 u-boot.bin
-e unlock and erase before programming
-v verify memory after programming
-f format – type = cfi @ 0
u-boot.bin file to get data from (assumption is file type is bin)