AVARICE command line question

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm trying to use AVARICE for the first time and can't find the documentation on the command line. Could some kind person please respond with a simple example to download a program though JTAGICE? Thanks in advance.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

Well the easiest way is to type:

avrdude

And it will come up with a list of command line options. If you are on linux type

man avrdude

For a man file on avrdude. If you are on Windows (ie: WinAVR) I think in the doc folder there should be some documentation.

Anyway here is how to do it:

avrdude -c stk500 -p atmega128 -P com1 -U flash:w:test.hex

This will use the stk500 connected to com1 to program an atmega128. It will erase the device, program the file test.hex (which should be in the directory you are running the command from), then verify the device.

Regards,

-Colin

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for responding Colin,

My problem is with AVARICE for the JTAG interface. From what I have read AVRDUDE, which works great with my STK500, does not work with JTAGICE. JTAG does not show up as one of the AVRDUDE options either. That was a great dissapointment to me.

Anyway, I'm using a windows machine and the man file on AVARICE is not easy to decipher in a text editor.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

Oops :oops: Sorry I didn't read your post correctly, and thought you said avrdude.

Anyway for avarice go to the command line and type:

avarice --help

It has all the options plus a little example, something like this should work:

avarice --program --file test.bin --part atmega128 --jtag /dev/com1

Note that the com port is specified as /dev/com1 here, not just com1.

Regards,

-Colin

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Colin,

That got me off the ground just fine. This is what I added to my make file to handle the AVaRICE. There are two versions, one is verbose to make it more clear but it's just a comment..

program:
# avarice --program --verify --file $(TARGET).hex --part $(MCU) --jtag /dev/com1 --jtag-bitrate 1MHz
avarice -p -v -f $(TARGET).hex -P $(MCU) -j /dev/com1 -B 1MHz

I found that the case of the jtag bit rate is case sensitive.

Thanks again,

Tom

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

> I found that the case of the jtag bit rate is case sensitive.

Yeah, and kHz has to be misspelled as KHz. I think I once filed a
patch for this to Ted Roth, but I'm not sure whether it's been
integrated. Hmm, no, it doesn't seem so.

Jörg Wunsch

Please don't send me PMs, use email if you want to approach me personally.