Reading a ATMEL AVR with the AVRISPmkII

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

Is it possible to read the Hex data contained in a AVR
using AVR Studio 4.18 and a AVRISPmkII Programmer?
I wish to be able to read the data and retain it as a
.hex file. I don't see where this can be done using
Studio. I know it can be done with the Pony2000 Program with my simple Serial
AVR programmer but I would like to be able to do it with my recently acquired AVRISPmkII using Studio.

Thank You,

Vince

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

In the Studio Programming tab, you choose Flash Read rather than Flash Program.

It will prompt you for a filename.

David.

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

In Studio click the toolbar icon that looks like a chip with "CON" on it. In the dialog that appears select AVRISPmkII and leave the port selection on USB. This will connect to the chip via ISP. On the "Main" tab make sure the AVR model is selected. To make sure you are communicating press the [Read Signature] button. As long as that returns the correct three bytes go to the "Program" tab and within the "Flash" section press the [Read] button and proceed from there.

Note that if the lock bits are set you will apparently read the chip contents but in fact the .hex file will be full of junk with a byte sequence 00 00 01 01 02 02 03 03.... etc.

Cliff

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

Thanks for the feedback. I got it now. You have to save the hex read file and then view it in another
program such as Notepad++ or similar. I was expecting
AVR Studio to display the contents of the read hex file and that was where I got messed up.

Vince

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

Of course Studio can show the contents of a .hex - after receiving it then File-Open it. Studio will ask to create a .aps file to go alongside (as it has to know which AVR it is for) then it will (if you made the right choice) load the file into the simulator where you can look at a disassembly. Be warned it is very "raw" - no label annotation or anything like that.