Flashing from the HAH

A JeeNode can be flashed from the HAH system.  This is in anticipation of getting these into the shop very soon now on a limited basis as our first run was to make sure there where no fabrication errors before doing a larger run of PCB's.

http://www.dbzoo.com/livebox/hah_jeenode?&#flashing_from_the_hah

Member for

16 years 10 months

brett

15 years 2 months ago

I tried reflashing the latest firmware to an AVR328 with an Arduino bootloader from the HAH itself and it works just fine.  I use a JeeNode as my host board to perform the flash, but an Arduino should work just as well.

I also found that if I tried to "wget" the AVR-r271.hex file directly to the HAH system it seemed to get corrupted so I had to download it to my PC first them SCP/FTP it over.

Anyway this works - just thought I'd mentioned it - you can remove the (-v) switch to make the output a little shorted if you wish.

# ./avrdude -v -C ./avrdude.conf -c arduino -p m328p -P /dev/ttyUSB0 -b 57600 -Uflash:w:AVR-r271.hex

avrdude: Version 5.10, compiled on Jul 12 2011 at 14:18:41
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "./avrdude.conf"
         User configuration file is "/root/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyUSB0
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
         AVR Part                      : ATMEGA328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65     5     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino
         Hardware Version: 2
         Firmware Version: 1.16
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e950f
avrdude: safemode: lfuse reads as 0
avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "AVR-r271.hex"
avrdude: input file AVR-r271.hex auto detected as Intel Hex
avrdude: writing flash (19564 bytes):

Writing | ################################################## | 100% 6.27s

avrdude: 19564 bytes of flash written
avrdude: verifying flash memory against AVR-r271.hex:
avrdude: load data flash data from input file AVR-r271.hex:
avrdude: input file AVR-r271.hex auto detected as Intel Hex
avrdude: input file AVR-r271.hex contains 19564 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 5.00s

avrdude: verifying ...
avrdude: 19564 bytes of flash verified

avrdude: safemode: lfuse reads as 0
avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0
avrdude: safemode: Fuses OK

avrdude done.  Thank you.