How to flash dsp firmware for digital/fx filter boards

hello mutable community,

i am actually building a Shruthi with digital/fx filter boards,already did the hardware part,seems ok get +5v where it should be on the filter board,
so now i try to flash dsp firmware on the 328p since 2 two days but with no sucess…not very familiar with this so i tried by myself but i should say that
i don t understand everything about PATh and git
I am using a atmel avrisp2,i download all the things as said there http://mutable-instruments.net/shruthi1/firmware.
downloaded Shruthi-1 master folder at github unzip it on my desktop
well i plug the filter board with 9v ,the programmer to the isp header,get the green light on the programmer,
i tried to sets the fuses looks like workin

avrdude -B 100 -V -p m328p -c avrisp2 -P usb -e -U lock:w:0x2F:m -e -u efuse:w:0xFD:m -U fuse:w:0xD7:m -U lfuse:w:0xFF:m -U lock:w:0x2F:m

i get

avrdude:1 bytes of lock wirtten
avrdude done. thank you.

so after i try with this

avrdude -B 1 -V -p m328p -c avrisp2 -P usb \\ -U flash:w:dsp_0.1.hex:i -U lock:w:0x2F.:m

but that part not workin,so i tried to document myself but still no sucess,so i come here to get some help.
i know it s a lack of knowledge.
thanks for your help

Romain

> but that part not workin

What happens?

thanks to answer so fast :slight_smile:
when i put the second command line i get:

avrdude: device signature= 0x000000
avrdude: yikes ! invalid device signature .
double check connections and try again or use -F to override this check.

avrdude done.thank you.

I have no idea how you came up with the first command line to set the fuses:

-e -U lock:w:0x2F:m -e -u efuse:w:0xFD:m -U fuse:w:0xD7:m -U lfuse:w:0xFF:m -U lock:w:0x2F:m

There are two erase flags (?), one missing U flag (?) and no reference to hfuse. The command should be:

-e -u -U efuse:w:0xFD:m -U hfuse:w:0xD7:m -U lfuse:w:0xFF:m -U lock:w:0x2F:m

sorry,i made a mistake
i didn t get the fuses set before,
now with your command line it s workin for the fuses
so i put the second one

avrdude -B 1 -V -p m328p -c avrisp2 -P usb \\ -U flash:w:dsp_0.1.hex:i -U lock:w:0x2F.:m

and i have

avrdude :device signature=0x1e950f
avrdude: safe mode :fuses ok
avrdude done.thank you

so from this point i dont understand what i must do now

> i dont understand what i must do now

Nothing. With this last command the firmware is written. Did you see the “Writing: ##########” progress bar? Did it go up to 100%?

ok,but ,now i have a reading ########## progress bar it goes to 100%
not a Writing: ##########” one

Hey, what about posting exactly what you see on your screen? Like a screenshot of the command line? How am I supposed to help if you keep this all for yourself?

ok sorry ,

file:///H:/Capture%20d%E2%80%99%C3%A9cran%202014-08-10%20%C3%A0%2012.54.39.png
file:///H:/Capture%20d%E2%80%99%C3%A9cran%202014-08-10%20%C3%A0%2012.55.56.png

Last login: Sun Aug 10 13:10:00 on ttys000
MacBook-Pro-de-bernie-5:~ bernienoel$ avrdude -p m328p -c avrisp2 -P usb -B 10

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e950f

avrdude: safemode: Fuses OK

avrdude done. Thank you.

MacBook-Pro-de-bernie-5:~ bernienoel$ avrdude -B 100 -V -p m328p -c avrisp2 -P usb -e -U lock:w:0x2F:m -e -u -U efuse:w:0xFD:m -U lfuse:w:0xFF:m -U lock:w:0x2F:m

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

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

Writing | ################################################## | 100% 0.02s

avrdude: 1 bytes of lock written
avrdude: reading input file "0xFD"
avrdude: writing efuse (1 bytes):

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

avrdude: 1 bytes of efuse written
avrdude: reading input file "0xFF"
avrdude: writing lfuse (1 bytes):

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

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

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

avrdude: 1 bytes of lock written

avrdude done. Thank you.

MacBook-Pro-de-bernie-5:~ bernienoel$ avrdude -B 1 -V -p m328p -c avrisp2 -P usb \\ -U flash:w:dsp_0.1.hex:i -U lock:w:0x2F:m

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e950f

avrdude: safemode: Fuses OK

avrdude done. Thank you.

MacBook-Pro-de-bernie-5:~ bernienoel$

The command is either:

avrdude -B 1 -V -p m328p -c avrisp2 -P usb -U flash:w:dsp_0.1.hex:i -U lock:w:0x2F:m

Or:

avrdude -B 1 -V -p m328p -c avrisp2 -P usb \\

-U flash:w:dsp_0.1.hex:i -U lock:w:0x2F:m

I run the command line now it goes closer to the truth got this:

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 "dsp_0.1.hex"
avrdude: can’t open input file dsp_0.1.hex: No such file or directory
avrdude: write to file ‘dsp_0.1.hex’ failed

avrdude: safemode: Fuses OK

avrdude done. Thank you.

MacBook-Pro-de-bernie-5:~ bernienoel$

Have you downloaded dsp_0.1.hex and put it in the directory from which you are running the commands?

I think i must specify where is the .hex files,how you do this i am block at this point…

i downloaded it yes i got it as text file is write in hexadecimal,
it s this point that i don t understand,when you mean,
"put it in the directory from which you are running the commands"
must make this step from the terminal?

You are running the commands from your home directory, so put the .hex file in your home directory.

did it but i think it s the problem is the .hex i save it as dsp_01.txt.hex,
thanks for your attention

i think i found i do this :

MacBook-Pro-de-bernie-5:~ bernienoel$ avrdude -B 1 -V -p m328p -c avrisp2 -P usb -U flash:w:dsp_0.1.hex.txt: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 "dsp_0.1.hex.txt"
avrdude: writing flash (29526 bytes):

Writing | ################################################## | 100% 2.23s

avrdude: 29526 bytes of flash written
avrdude: reading input file "0x2F"
avrdude: writing lock (1 bytes):

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

avrdude: 1 bytes of lock written

avrdude: safemode: Fuses OK

avrdude done. Thank you.

MacBook-Pro-de-bernie-5:~ bernienoel$

hope i am right can you confirm ?

The firmware has been written successfully.