Firmware upload - teach me please

Hi there guys,

Just bought of a set of PCBs to build my first Shruthi XT, with a Shruthacon filter…yeah, totally missed this projects, luckily, it is not too late.
I’ll receive the boards and the pre-programmed chips, but, I just realised than man, I could add these gerbers to my next JLCPCB order, so I could build another one, with the Polivoks filter.

My problem is that although I’m familiar with Arduino, I’m totally noob if we are talking about flashing things…:frowning:

I have a Pololu 2.1, but I’ve never used it.
With PIC, I was able to flash a few chips for various projects, so I’m OK with connecting things up on a breadboard, yet, I’m still not sure how to put the firmware into the Shruthi.

I’ve read every single bit of info I was able to find, yet, still scratching my head when it comes to command line things under Mac Os.

As far as I understand it correctly, I connect the programmer to the computer and then I connect the programmer to the Shruthi bard VIA the ISP port, power up the Shruthi, then, I have to upload the firmware … somehow.

I’m not really looking for a deep method, just you know, like with PICs, load the hex file, then wait.

If I’m correct, after this, I have to load the factory presets as well, or, can I load those after the firmware flashing via MIDI sysex?

Sorry again guy and thank you very much for the help in advance!

See this link:

https://mutable-instruments.net/archive/shruthi/firmware/

Thank you matrix12x, I’ve read that.
I see that I can download the latest firmware in sysex format, I assume that is for already working units, not for units with the blank chip.

My problem starts after I’ve cloned the git :frowning:

Ok, so, followed the instructions and now I have the hex file.
If I’m correct, the only thing I have to make now is to use the make bake_all command, or, do I start with the bootloader first?

The bake_all command does everything: set the fuses, flash the bootloader and the main firmware.

1 Like

The patches are installed by SysEx once the main firmware is installed and the unit is running normally.

1 Like

Splendid, thank you very much!
I’ll try to upload the firmware today (finally, boards have arrived, parts as well, build is done), but, my hex file is 175K and after reading the tutorial, it turned out, it should be max. 64K.

When I tried to type the make size command, I got this

cat shruthi1.size | awk ‘{ print $1+$2 }’ | tail -n1 | figlet | cowsay -n -f moose
/bin/sh: figlet: command not found
/bin/sh: cowsay: command not found
make: *** [size] Error 127

Sorry for being such a n00b, first time I use an AVR programmer ever :smiley:

This is fine.

The size of the firmware is not the same as the size of the hex file (the same way, for example, the number of letters in a Word document is not the same as the size of the .docx file).

Oh, hells bells, then I’m ready to burn my first firmware!
I’ve checked (through AnyDesk at my home computer) and the make bake_all runs smoothly, obviously, runs into an error since neither the AVR nor the Shruthi is plugged, but in theory, it’ll work!

Thank you very much, I’ll let you know!

Ok, so, got home, tried it and got this message :frowning:

avrdude: usbdev_open(): did not find any USB device “usb”
make[1]: *** [fuses] Error 1
make: *** [bake_all] Error 2

I have a Pololu 2.1, it is recognised by macOS.
What the problem is guys, any ideas?

Ok, find out that I’ve should put the correct port number there instead of usb, so, now it is

/dev/cu.usbmodem003109464

Now …
encoders-Mac-Pro:shruthi-1 encoder$ make -f bootloader/makefile upload
/usr/local/CrossPack-AVR/bin/avrdude -V -p m644p -c stk500 -P /dev/cu.usbmodem003109464
-B 1 -U flash:w:build/muboot/muboot.hex:i -U lock:w:0x2f:m
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

Ah!
Success!
The problem was (silly me!) that the dev/cu… address was incorrect.
What I’ve included (ends with 003109464) was something else, 003109462 was the Programmer Port number.
I’ve flashed the thing with the make bake_all command, now everything works like a charm!

I’ve built the Polyvoks filter board for this one, sounds really really really faaaat!

1 Like