0

I use avrdude on osx to do development for an xmega256a3. It's wonderful, it lets me flash my target just fine. However, when I try to use it to program the usersig block, it doesn't work so well. I was initially excited by some early success with it, but found subsequent flashes weren't working.

Through testing, I determined that if my usersig file was for all 0's, it worked fine. But all FF's didn't work. Given what little I know about flash, these leads me to believe that I'm either missing an option or avrdude isn't doing a complete job for what it needs to do here.

The command I'm using is

avrdude -p atxmega256a3 -P usb -c avrispmkii -e -U usersig:w:mySig.hex

Using AVR Studio 4 on a Windows box, I am able to program any of these files to the usersig flash block.

My question boils down to is this possible? if so what option/incantation am I missing? Or am I out of luck for programming usersig for this processor with avrdude?

(I'm using version 5.11.1 from the CrossPack guys)

Travis Griggs
  • 21,522
  • 19
  • 91
  • 167
  • [This bug](https://savannah.nongnu.org/bugs/?36384) is still open. Not sure if it's applicable or if it got rolled into either release since it was posted. But there's a patch available from a user. – embedded.kyle Jan 09 '13 at 13:21
  • The only thing I could see that might be different was that my avrdude.conf indiciated a user_sig page size of 0x100, but the referenced doc seemed to indicate page sizes were all 0x200. I patched said file, but still no change. – Travis Griggs Jan 21 '13 at 17:59

1 Answers1

0

It turns out that old versions of avrdude indeed did not support this. It requires a page erase of usersig, and that was not supported until version 6, which is due out soon. I've tested with svn builds of it, and with a two line patch submitted to day, it does the job.

Travis Griggs
  • 21,522
  • 19
  • 91
  • 167