Skip to content

Instantly share code, notes, and snippets.

@drsm79
Created June 5, 2018 22:07
Show Gist options
  • Save drsm79/1653b07ec05f5af29ae8ec1b1b6487a9 to your computer and use it in GitHub Desktop.
Save drsm79/1653b07ec05f5af29ae8ec1b1b6487a9 to your computer and use it in GitHub Desktop.
Setting up WSL for building Mutable Instrument firmware

Bit of trial and error has resulted in:

  • sudo apt install gcc-avr avr-libc
  • pull in the code & submodules: git clone https://github.com/pichenettes/eurorack.git && git submodule init && git submodule update
  • edit avrlib/makefile.mk to point AVRLIB_TOOL_PATH to /usr/bin and set PROGRAMMER to usbtiny
  • make -f branches/makefile

Seems to build...

➜  eurorack git:(master) make -f branches/makefile
/usr/bin/avr-g++ -c -mmcu=atmega88p -I. -g -Os -w -Wall -DF_CPU=20000000 -D__PROG_TYPES_COMPAT__ -fdata-sectio
ns -ffunction-sections -fshort-enums -fno-move-loop-invariants -DDISABLE_DEFAULT_UART_RX_ISR  -DATMEGA88P -DSE
RIAL_RX_0 -mcall-prologues -fno-exceptions avrlib/string.cc -o build/branches/string.o
/usr/bin/avr-g++ -c -mmcu=atmega88p -I. -g -Os -w -Wall -DF_CPU=20000000 -D__PROG_TYPES_COMPAT__ -fdata-sectio
ns -ffunction-sections -fshort-enums -fno-move-loop-invariants -DDISABLE_DEFAULT_UART_RX_ISR  -DATMEGA88P -DSE
RIAL_RX_0 -mcall-prologues -fno-exceptions avrlib/serial.cc -o build/branches/serial.o
/usr/bin/avr-g++ -c -mmcu=atmega88p -I. -g -Os -w -Wall -DF_CPU=20000000 -D__PROG_TYPES_COMPAT__ -fdata-sectio
ns -ffunction-sections -fshort-enums -fno-move-loop-invariants -DDISABLE_DEFAULT_UART_RX_ISR  -DATMEGA88P -DSE
RIAL_RX_0 -mcall-prologues -fno-exceptions avrlib/random.cc -o build/branches/random.o
/usr/bin/avr-g++ -c -mmcu=atmega88p -I. -g -Os -w -Wall -DF_CPU=20000000 -D__PROG_TYPES_COMPAT__ -fdata-sectio
ns -ffunction-sections -fshort-enums -fno-move-loop-invariants -DDISABLE_DEFAULT_UART_RX_ISR  -DATMEGA88P -DSE
RIAL_RX_0 -mcall-prologues -fno-exceptions avrlib/adc.cc -o build/branches/adc.o
/usr/bin/avr-g++ -c -mmcu=atmega88p -I. -g -Os -w -Wall -DF_CPU=20000000 -D__PROG_TYPES_COMPAT__ -fdata-sectio
ns -ffunction-sections -fshort-enums -fno-move-loop-invariants -DDISABLE_DEFAULT_UART_RX_ISR  -DATMEGA88P -DSE
RIAL_RX_0 -mcall-prologues -fno-exceptions avrlib/time.cc -o build/branches/time.o
/usr/bin/avr-g++ -c -mmcu=atmega88p -I. -g -Os -w -Wall -DF_CPU=20000000 -D__PROG_TYPES_COMPAT__ -fdata-sectio
ns -ffunction-sections -fshort-enums -fno-move-loop-invariants -DDISABLE_DEFAULT_UART_RX_ISR  -DATMEGA88P -DSE
RIAL_RX_0 -mcall-prologues -fno-exceptions avrlib/devices/wii_nunchuk.cc -o build/branches/wii_nunchuk.o
/usr/bin/avr-g++ -c -mmcu=atmega88p -I. -g -Os -w -Wall -DF_CPU=20000000 -D__PROG_TYPES_COMPAT__ -fdata-sectio
ns -ffunction-sections -fshort-enums -fno-move-loop-invariants -DDISABLE_DEFAULT_UART_RX_ISR  -DATMEGA88P -DSE
RIAL_RX_0 -mcall-prologues -fno-exceptions branches/branches.cc -o build/branches/branches.o
/usr/bin/avr-gcc -mmcu=atmega88p -lm -Os -Wl,--gc-sections -o build/branches/branches.elf build/branches/strin
g.o build/branches/serial.o build/branches/random.o build/branches/adc.o build/branches/time.o build/branches/
wii_nunchuk.o build/branches/branches.o  -lc
/usr/bin/avr-objcopy -O ihex -R .eeprom build/branches/branches.elf build/branches/branches.hex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment