• Stars
    star
    251
  • Rank 160,615 (Top 4 %)
  • Language
    Shell
  • License
    MIT License
  • Created about 9 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Development environment for the firmware of Mutable Instruments' products

Vagrant environment for Mutable Instruments modules hacking

This configuration file and this shellscript create a Linux (ubuntu) virtual machine configured with all the right tools for compiling and installing the firmware of Mutable Instruments' modules.

Kudos and inspiration

Requirements

The Extension pack consists of a file with the vbox-extpack extension. On windows, double click on it. On OS X or Linux, the file needs to be installed from the command line with the command:

VBoxManage extpack install <filename>

Finally if you are running a Linux operating system you will want to add your user to the vboxusers group so that the virtual machine can access your USB devices. Run the following command:

sudo usermod -a -G vboxusers $USER

Then log out and log back in to make sure the group change takes effect.

Usage

First, clone this repository:

git clone https://github.com/pichenettes/mutable-dev-environment.git

or download:

https://github.com/pichenettes/mutable-dev-environment/archive/master.zip

To start the VM, open a terminal in the mutable-dev-environment directory with the Vagrantfile and run:

vagrant up

The first time the VM is started, all tools will be downloaded, and the latest version of the code will be grabbed from github. The process takes about 15 minutes, depending on the speed of your internet connection or computer.

Then, you can log onto the virtual machine by running:

vagrant ssh

Once in the virtual machine, you can try, for example, to compile Clouds' bootloader and code:

make -f clouds/bootloader/makefile hex
make -f clouds/makefile

To write the firmware to the module with an Olimex ARM-USB-OCD-H JTAG adapter, use:

make -f clouds/makefile upload

Using other programmers is of course possible, please see Customization.

Or you can generate a .wav file for the built-in audio updater:

make -f clouds/makefile wav

The firmware update file will be put in build/clouds/clouds.wav.

Once you're done with your hacking session, you can leave the VM terminal with:

exit

The virtual machine continues running and can be reaccessed with vagrant ssh. It can also be suspended with vagrant suspend, halted with vagrant halt, and completely destroyed with vagrant destroy. Note that with this last command, you might lose any files you have created inside the VM's disk image!

Moving files between the VM and the host

By default, the working directory (eurorack-modules) is installed in the /vagrant directory, which is shared between the VM and the host. You can thus use any text editor on the host to modify the files. Note that any file can be transferred between the VM and the host by being copied in this location.

If you prefer working in a more self-contained environment and leave your host directory clean, you can comment the line CODE_DIRECTORY=/vagrant and uncomment the line CODE_DIRECTORY=/home/vagrant before setting up the VM. The code will not be installed in the shared directory, and will be accessible only from within the VM.

USB issues

To pass through USB devices from your real machine to the virtual machine, consult the VirtualBox USB documentation.

Customization

Using a different programmer

To use a programmer other than the default (AVR ISP mkII, ARM-USB-OCD-H) it is no longer necessary to edit the makefiles. Instead, the programmer can be set in the shell for the current session, e.g.

export PGM_INTERFACE=stlink-v2
export PGM_INTERFACE_TYPE=hla

for ARM projects using a JTAG adapter. Similarly for AVR projects, you can use

export PROGRAMMER=stk500
export PROGRAMMER_PORT=/dev/tty.usbserial-xxxxxxxx

Any further calls to make will then automatically use these settings. To make them permanent, add the exports to the end of ~/.bashrc.

See stmlib/makefile.inc and avrlib/makefile.mk for more options that can be customized.

Another way (e.g. to test if settings are correct) is to just specify the value in the call to make:

PGM_INTERFACE=ftdi/olimex-arm-usb-tiny-h make -f braids/makefile upload

Custom repository URL

If you want to build code from your own github fork, you can specify the repository to clone when you create the VM via the USER_GITHUB_URL environment variable, e.g.

USER_GITHUB_URL=https://github.com/<username>/eurorack.git vagrant up

The Mutable Instruments' repository is automatically added as the git remote pichenettes.

More Repositories

1

eurorack

Eurorack modules
C++
2,576
star
2

midipal

MIDI swiss army knife
C++
270
star
3

shruthi-1

Firmware and hardware description files for the Shruthi-1, an hybrid monosynth
C++
206
star
4

stmlib

STM32F project template and utility routines used for Mutable Instruments products
C++
162
star
5

ambika

Hybrid 6-voice polysynth with flexible voicecard architecture
C++
125
star
6

avril

AVR development library based on C++ templates.
C++
106
star
7

breadboard-friends

A collection of cute breakout boards riding solderless breadboards, mostly for analog audio works
89
star
8

cvpal

Cheap and cheerful 2-channel USB to CV/Gate interface
Assembly
78
star
9

mutable-instruments-documentation

Online documentation and knowledge base for Mutable Instruments modules (WIP)
75
star
10

anushri

Analog synthesizer with digital drum machine
C++
65
star
11

plaits-editor

Editor for Plaits hidden models
JavaScript
64
star
12

module_tester

Test signal generator for Eurorack module
C++
53
star
13

stm-audio-bootloader

Audio (FSK / QPSK) bootloader for STM32F projects
C++
39
star
14

mutable-instruments-diy-archive

Documentation of ancient Mutable Instruments DIY projects
36
star
15

avr-midi-bootloader

Pure C version of the Mutable Instruments SysEx bootloader
Python
36
star
16

avrilx

C++ template library for AVR XMega peripherals
C++
36
star
17

avr-audio-bootloader

Audio (FSK / QPSK) bootloader for AVR projects
Python
19
star
18

shruti1

This project has been discontinued. The revised design is now known as the Shruthi-1
C++
19
star
19

magnatagatune

scripts used to generate the magnatagatune dataset from tagatune annotations and magnatune data
Python
17
star
20

avril-firmware_tools

Tools for conversion of firmware files to .mid and .syx files
Python
17
star