Burning Bootloader via AVRISP pin on Shruthi-1 controlboard

Hi, I just finished assembling my shruthi and I am trying to figure how to load the bootloader to my atmega. With the chips currently un programmed I don’t get any led’s lighting up when I power with my 9v adaptor. So, I’m not even sure how I can tell if my atmega is receiving the data, I don’t want to brick my chip. Will any of the led’s on the controlboard blink?

Are you using a Avrisp programmer? You will see if the programming was successful on your computer. You can burn the firmware and the bootloader at the same time. Your shruthi should start normal after that.

These are the avrdude commands i use:

avrdude -B 100 -V -p m644p -c avrisp2 -P usb -e -U lock:w:0x3F:m -e -u -U efuse:w:0xFD:m -U hfuse:w:0xD6:m -U lfuse:w:0xFF:m -U lock:w:0x0f:m

avrdude -B 1 -V -p m644p -c avrisp2 -P usb \\ -U flash:w:shruthi1_0.97.hex:i -U flash:w:muboot.hex:i -U lock:w:0x2f:m

Woot! It worked! The flash was successful, thank you altitude for the commands.

dont forget to flash the presets for 2-16 also

You can use the burnito firmware for that. Flash it to the 644, with the EEPROM in it will flash the presets, then reflash the 644 with the control firmware, done.

@altitude, I guess I never flashed the muboot bootloader since I have the avrisp to reflash when I need. Considering I’m probably going to sell one or two of these I should get on that. I’ve only used Atmel studio to this point as its so easy to use.

I just use:

avrdude -V -p m644p -c avrisp2 -P usb -U eeprom:w:internal_eeprom.hex:i for the patches.

I just got used to avrdude so I use that most of the time since its so quick

@ altitude, I should already know this, but are you on mac or win?

Where do I get the .hex for the presets 2-16? There should be no conflict flashing presets 2-16 after the muboot and current firmware correct? Also, do the external eeprom presets typically load along with the firmware?

Update: I have located the internal eeprom.hex, woot.

windows, shouldn’t make a difference though

I tried flashing the internal eeprom hex through avrdude with the command you provided, but I got this error message:

WARNING: no end of file record found for Intel Hex file “internal_eeprom.hex”

avrdude: writing eeprom (0 bytes):

do you have that file in the same directory as you are running avrdude from? That might be a path issue

Oh, yea, I’m executing the .bat in the same folder the internal_eeprom.hex is in.

This can happen if you’ve incorrectly downloaded the hex file from github. Open it up in a text editor and look at it. If its an orderly set of lines with hex numbers (0-9, A-F) then the format is probably ok. If its random garbage you’ve got a binary and if it looks like HTML you’ve got page source (which is easy to do on github) also make sure the file is .HEX and not .HEX.txt or something like that

bingo, I just check it out. Opened it up with notepad, it looks like HTML, not orderly hex numbers.

Update: Instead of saving as .HEX from the github link, I copyed the hex code from google docs, pasted it to notepad and then saved it as .HEX. Flashed the internal eeprom without any error.

Thanks deadmonkey. :slight_smile:

Glad to help!

maybe it will be useful for someone, the command lines for the uploading of the firmware + presets with AVRISP mkII

avrdude -B 100 -V -p m644p -c avrispmkII -P usb -e -U lock:w:0x3F:m -e -u -U efuse:w:0xFD:m -U hfuse:w:0xD6:m -U lfuse:w:0xFF:m -U lock:w:0x0f:m

avrdude -B 1 -V -p m644p -c avrispmkII -P usb -U flash:w:shruthi1_0.97.hex:i -U
flash:w:muboot.hex:i -U lock:w:0x2f:m

avrdude -V -p m644p -c avrispmkII -P usb -U eeprom:w:internal_eeprom.hex:i

Excellent. Thanks for the info, untoldlb! Just saved me a lot of bother flashing a blank chip.

Would this be a good programmer, or better buy original Atmel one?

From the specifications, the line “NOT SUPPORT WIN7/VISTA SYSTEM NOT SUPPORT AVRSTUDIO 5.0 and Mac” … I’d buy the Atmel original instead.