MUFF WIGGLER Forum Index
 FAQ & Terms of UseFAQ & Terms Of Use   Wiggler RadioMW Radio   Muff Wiggler TwitterTwitter   Support the site @ PatreonPatreon 
 SearchSearch   RegisterSign up   Log inLog in 
WIGGLING 'LITE' IN GUEST MODE

Troubles uploading firmware to mutable instruments grids
MUFF WIGGLER Forum Index -> Music Tech DIY  
Author Troubles uploading firmware to mutable instruments grids
baszor
Hi guy's,

I've build a lot of st32 driven modules and was able to flash the chips with the st-link/v2 adapter.

Grids makes use of the mega328P chip and I try to use an arduino uno to flash.

I'm able to start the flashing process now after solving some USB access issues by Virtualbox running on OSX.
But i still get error's. Especially on the efuse flashing and in the end i get the error the programmer is not responding.

Does anybody have a clue what's going on here?
Or is only the bootloader and main part needed to pass? See the log below:

vagrant@vagrant-ubuntu-trusty-64:/vagrant/eurorack-modules$ sudo make -f grids/makefile bootstrap_all
make -f grids/makefile
make[1]: Entering directory `/vagrant/eurorack-modules'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/vagrant/eurorack-modules'
make -f grids/bootloader/makefile
make[1]: Entering directory `/vagrant/eurorack-modules'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/vagrant/eurorack-modules'
make -f grids/bootloader/makefile fuses
make[1]: Entering directory `/vagrant/eurorack-modules'
/usr/local/CrossPack-AVR/bin/avrdude -V -p m328p -c arduino -P /dev/ttyACM0 -B 10 -e -u \
-U efuse:w:0x05:m \
-U hfuse:w:0xd8:m \
-U lfuse:w:0xff:m \
-U lock:w:0x2f:m

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e950f
avrdude: erasing chip
avrdude: reading input file "0x05"
avrdude: writing efuse (1 bytes):

Writing | | 0% 0.00s ***failed;
Writing | ################################################## | 100% 0.05s

avrdude: 1 bytes of efuse written
avrdude: reading input file "0xd8"
avrdude: writing hfuse (1 bytes):

Writing | | 0% 0.00s ***failed;
Writing | ################################################## | 100% 0.05s

avrdude: 1 bytes of hfuse written
avrdude: reading input file "0xff"
avrdude: writing lfuse (1 bytes):

Writing | | 0% 0.00s ***failed;
Writing | ################################################## | 100% 0.06s

avrdude: 1 bytes of lfuse written
avrdude: reading input file "0x2f"
avrdude: writing lock (1 bytes):

Writing | | 0% 0.00s ***failed;
Writing | ################################################## | 100% 0.05s

avrdude: 1 bytes of lock written

avrdude done. Thank you.

make[1]: Leaving directory `/vagrant/eurorack-modules'
/usr/local/CrossPack-AVR/bin/avrdude -B 1 -V -p m328p -c arduino -P /dev/ttyACM0 \
-U flash:w:build/grids/grids.hex:i \
-U flash:w:build/grids_bootloader/grids_bootloader.hex:i \
-U lock:w:0x2f:m

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e950f
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 "build/grids/grids.hex"
avrdude: writing flash (12278 bytes):

Writing | ################################################## | 100% 2.36s

avrdude: 12278 bytes of flash written
avrdude: reading input file "build/grids_bootloader/grids_bootloader.hex"
avrdude: writing flash (31278 bytes):

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

avrdude: stk500_recv(): programmer is not responding
make: *** [bootstrap_all] Error 1
djthopa
Hope this helps, cant guarantee but i seem to remember doing this:

make -f grids/bootloader/makefile hex

make -f grids/makefile

make -f grids/makefile upload

make -f grids/makefile bake

make -f braids/makefile upload
baszor
djthopa wrote:
Hope this helps, cant guarantee but i seem to remember doing this:

make -f grids/bootloader/makefile hex

make -f grids/makefile

make -f grids/makefile upload

make -f grids/makefile bake

make -f braids/makefile upload


thanks ... but that didn't help... seriously, i just don't get it especially the braids part hihi
djthopa
baszor wrote:
djthopa wrote:
Hope this helps, cant guarantee but i seem to remember doing this:

make -f grids/bootloader/makefile hex

make -f grids/makefile

make -f grids/makefile upload

make -f grids/makefile bake

make -f braids/makefile upload


thanks ... but that didn't help... seriously, i just don't get it especially the braids part hihi


Oh shite!

I do recall the bake bit!

Good luck thumbs up
baszor
If you take a look at the log, the fuses are written at the 2nd try, the grids.hex passes, but the writing of the bootloader.hex passes/fails? Also the lock bits are not written....
col
My notes on flashing a uGrids via Vagrant:

avrdude -V -p atmega328p -c usbasp -P usb -B 10 -e -u -U efuse:w:0x0f:m -U hfuse:w:0xd8:m -U lfuse:w:0xff:m -U lock:w:0x2f:m


avrdude -V -p atmega328p -c usbasp -P usb -B 10 -U flash:w:grids.hex
Altitude909
I'd say the device your flashing with is causing the issues. The codes running, but the programmer is hanging up
col
what comes up if you run lsusb ?

It should list the programing device then you can run the commands directly and see whats going on.
baszor
col wrote:
what comes up if you run lsusb ?

It should list the programing device then you can run the commands directly and see whats going on.


Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 2341:0001 Arduino SA Uno (CDC ACM)
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

and when I run dmesg i get:

[ 48.879325] usb 2-1: new full-speed USB device number 2 using ohci-pci
[ 49.187287] usb 2-1: New USB device found, idVendor=2341, idProduct=0001
[ 49.187300] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[ 49.187310] usb 2-1: Product: Arduino Uno
[ 49.187320] usb 2-1: Manufacturer: Arduino (www.arduino.cc)
[ 49.187329] usb 2-1: SerialNumber: 6493534313335121A061
[ 49.196113] cdc_acm 2-1:1.0: ttyACM0: USB ACM device
[ 49.208786] usbcore: registered new interface driver cdc_acm
[ 49.208790] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters

So I can program at /dev/ttyACM0?


[EDIT] "The weirdest thing is that if I remove some leads from the arduino to the grids board the same communication happens... maybe i'm communicating with the arduino instead of the grids boards eek!
I just ordered a cheap USBavr programmer. Will continue when the thing has been delivered..."
baszor
col wrote:
My notes on flashing a uGrids via Vagrant:

avrdude -V -p atmega328p -c usbasp -P usb -B 10 -e -u -U efuse:w:0x0f:m -U hfuse:w:0xd8:m -U lfuse:w:0xff:m -U lock:w:0x2f:m


avrdude -V -p atmega328p -c usbasp -P usb -B 10 -U flash:w:grids.hex


... how do i program the bootloader? with what command?
slo
I had all kinds of trouble with my Uno’s, I was trying to use them as an ISP.
Finally I flashed Optiboot bootloader and then they worked.
http://www.gammon.com.au/bootloader
baszor
Solved the issue in a VM with windows... after installing the arduino IDE there, flashing went perfect with avrdude (could even use the gui version avrdudess)
copied the hex files to windows, wrote them and the fuses. And off we were.
Thanks for the support!
col
baszor wrote:
col wrote:
My notes on flashing a uGrids via Vagrant:

avrdude -V -p atmega328p -c usbasp -P usb -B 10 -e -u -U efuse:w:0x0f:m -U hfuse:w:0xd8:m -U lfuse:w:0xff:m -U lock:w:0x2f:m


avrdude -V -p atmega328p -c usbasp -P usb -B 10 -U flash:w:grids.hex


... how do i program the bootloader? with what command?


I don't think mine used one, I thought it was combined in the grids.hex. If your "make" generated one then you would use:

avrdude -V -p atmega328p -c usbasp -P usb -B 10 -U flash:w:grids_bootloader.hex
baszor
Ready to go! thanks for the help guy's!

MUFF WIGGLER Forum Index -> Music Tech DIY  
Page 1 of 1
Powered by phpBB © phpBB Group