avr-chat
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-chat] Struggling to write usersig with avrdude on an xmega256a3


From: Travis Griggs
Subject: Re: [avr-chat] Struggling to write usersig with avrdude on an xmega256a3
Date: Sat, 9 Feb 2013 11:09:30 -0800


On Feb 9, 2013, at 8:44 AM, address@hidden (Joerg Wunsch) wrote:

Travis Griggs <address@hidden> wrote:

I'd love to give it a try. I've downloaded it from svn. I followed
the instructions. On OSX (10.8), I had to brew autoconf and
automake, and then it all seemed to build. I also had to create a
symlink from /usr/local/etc/avrdude.conf to the dl'ed one. Alas,
with that fixed, it complains it wasn't compiled with USB support.

../configure needs to find libusb.  (At the end of configure, it
announces which libraries have been found and which haven't.)

If you have installed libusb (and preferrably, also libelf) from
MacPorts, the following command ought to work:

$ env CPPFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib ./configure
<snip>


I got closer, thanks to your help. I use brew, I haven't had good luck with what MacPorts does to my machine. I don't really want to go there (ever) again. I had to 

brew install libelf
brew install libusb

This was not enough though, I also needed to

brew install libusb-compat

Changing to

env CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ./configure

did the trick (Brew puts libs in /usr/local instead of /opt/local)

Now I had an avrdude that didn't complain of lacking usb support, but alas it still doesn't seem to work. I turned on -v to create the following output:

travisg$ ~/Downloads/trunk/avrdude/avrdude -v -p atxmega256a3 -P usb -c avrispmkii -U usersig:w:0EA7EE10.hex:i

avrdude: Version 5.11svn, compiled on Feb  9 2013 at 11:03:28
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/usr/local/etc/avrdude.conf"
         User configuration file is "/Users/travisg/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : usb
         Using Programmer              : avrispmkii
avrdude: usbdev_open(): Found AVRISP mkII, serno: 000200085694
         AVR Part                      : ATxmega256A3
         Chip Erase delay              : 0 us
         PAGEL                         : P00
         BS2                           : P00
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 0
         StabDelay                     : 0
         CmdexeDelay                   : 0
         SyncLoops                     : 0
         ByteDelay                     : 0
         PollIndex                     : 0
         PollValue                     : 0x00
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           prodsig        0     0     0    0 no        512  512      0     0     0 0x00 0x00
           usersig        0     0     0    0 no        512  512      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
           fuse1          0     0     0    0 no          1    0      0     0     0 0x00 0x00
           fuse2          0     0     0    0 no          1    0      0     0     0 0x00 0x00
           fuse4          0     0     0    0 no          1    0      0     0     0 0x00 0x00
           fuse5          0     0     0    0 no          1    0      0     0     0 0x00 0x00
           lock           0     0     0    0 no          1    0      0     0     0 0x00 0x00
           data           0     0     0    0 no          0    0      0     0     0 0x00 0x00
           eeprom         0     0     0    0 no       4096   32      0     0     0 0x00 0x00
           application    0     0     0    0 no     262144  512      0     0     0 0x00 0x00
           apptable       0     0     0    0 no       8192  512      0     0     0 0x00 0x00
           boot           0     0     0    0 no       8192  512      0     0     0 0x00 0x00
           flash          0     0     0    0 no     270336  512      0     0     0 0x00 0x00
           fuse0          0     0     0    0 no          1    0      0     0     0 0x00 0x00

         Programmer Type : STK500V2
         Description     : Atmel AVR ISP mkII
         Programmer Model: AVRISP mkII
avrdude: stk500v2_recv_mk2: error in USB receive
         Hardware Version: 21
         Firmware Version Master : 1.17
         Vtarget         : 3.0 V
         SCK period      : 8.00 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9842
avrdude: NOTE: Programmer supports page erase for Xmega devices.
         Each page will be erased before programming it, but no chip erase is performed.
         To disable page erases, specify the -D option; for a chip-erase, use the -e option.
avrdude: reading input file "0EA7EE10.hex"
avrdude: writing usersig (512 bytes):

Writing |                                                    | 0% 0.00savrdude: stk600_xprog_page_erase(): unknown paged memory "usersig"
Writing | ################################################## | 100% 0.35s

avrdude: 512 bytes of usersig written
avrdude: verifying usersig memory against 0EA7EE10.hex:
avrdude: load data usersig data from input file 0EA7EE10.hex:
avrdude: input file 0EA7EE10.hex contains 512 bytes
avrdude: reading on-chip usersig data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
         0x0a != 0x0e
avrdude: verification error; content mismatch

avrdude done.  Thank you.

There seems to be an issue doing the page erase, "unknown paged memory 'usersig'".

That's closer though!

--
Travis Griggs
"Ninety per cent of most magic merely consists of knowing one extra fact." -Terry Pratchett


reply via email to

[Prev in Thread] Current Thread [Next in Thread]