Adding bootloader to working v1.02 Shruthi XT

Hi all - it’s been a while… I’ve been searching but can’t crack this:

I bought a working XT a while back (to add to the Shruthi, XT and Ambika I built myself) and it wouldn’t enter sysex update mode. From the forum it appears that whoever built it didn’t bother with the bootloader, as there are no problems with the XT itself.

So… I’ve got an AVRISPMkII, all the v1.,02 firmware Git resources, the AVR toolchain on my Mac, etc. but I’ve got one problem and one question…

(BTW, I’m no electronics engineer so pologies in advance as these will prob be numpty Qs)

Question: Can I add the bootload to the existing programmed chip juist by making/uploading the bootloader files via the AVR?

Problem: notwithstanding the above, I can’t get the AVRISPMkII to find the Atmega 644P, I’m getting the “bad AVRISPmkII connection status: Target not detected” error on AVRDude

I’ve got both green lights on the programmer (after attempted upload), I’m pretty sure it’s hooked up right (6x2 the other way around gives me the flashing amber on programmer after a few seconds) and I get same result whether I’m powering the control board via the standard 9v > filter > board, or not.

I’m ruling out a problem with the XT as it works fine under normal operation.


So I’m sure it’s user error, but I can’t learn enough about AVR flashing to figure out where the issues is…

Any advice grategully received, as ever.

Thanks, Simon

Update…

I realised that the original builder had put the AVRISP socket on the wrong side of the board. They are an @rse for doing so… I am a bigger @rse for not spotting it before posting.

So… I uploaded the bootloader usuccessfully, and then realised I had erased the chip as the upload script specified that.

So… I used ‘make bake_all’ to upload the firmware as a whole. That appeared to work in terminal. The XT then rebooted - I get a split second of splash screen and then row 1 of LCD shows ‘filter’ and row 2 looks as if it is scrolling through every parameter and value very quickly. LEDs 3 and 7 are lit and the XT is unresponsive.

I can reflash it, and it will now boot into what looks like sysex update mode (correct LEDs lit) and C6 will send firmware through midi with LEDs lighting and blinking in correct loading pattern.

My terminal logs for the AVR flash was:


/usr/local/CrossPack-AVR/bin/avrdude -B 1 -V -p m644p -c avrispmkII -P usb
-U eeprom:w:shruthi/data/factory_data/internal_eeprom.hex:i
-U flash:w:build/shruthi1/shruthi1.hex:i -U flash:w:build/muboot/muboot.hex:i
-U lock:w:0x2f:m

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e960a
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 “shruthi/data/factory_data/internal_eeprom.hex”
avrdude: writing eeprom (2048 bytes):

Writing | ################################################## | 100% 0.99s

avrdude: 2048 bytes of eeprom written
avrdude: reading input file “build/shruthi1/shruthi1.hex”
avrdude: writing flash (62046 bytes):

Writing | ################################################## | 100% 4.27s

avrdude: 62046 bytes of flash written
avrdude: reading input file “build/muboot/muboot.hex”
avrdude: writing flash (65490 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 65490 bytes of flash written
avrdude: reading input file “0x2f”
avrdude: writing lock (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of lock written

avrdude: safemode: Fuses OK (H:FD, E:D6, L:FF)

avrdude done. Thank you.


Ah, right… I thought that garbled screen looked familiar. It was in ‘programmer’ mode, right?

Cycled power/encode pressed until I got to Shruthi XT Full Control… now all is working :slight_smile:

Last job is to replace the encoder as builder super-glued the knob on… which makes removing the case top to change filters - or do anything else - a challenge :confused:

Yellow Magic board in and off we go to play…