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

Mutable Instruments DIY on pc
MUFF WIGGLER Forum Index -> Music Tech DIY Goto page 1, 2  Next [all]
Author Mutable Instruments DIY on pc
MatrixModulator
Hi everyone,

i'm starting a thread to get some help on how to do the firmware/flashing part on Mutable Instruments modules on PC.

it's my first time using Github with command line (power shell) included when installing Github.

I'm starting with Braids. On the mutable website it says to first clone the directory. http://mutable-instruments.net/modules/braids/open

Quote:
After having cloned the repository, don’t forget to run git submodule init && git submodule update to make sure the sub-projects referenced in the code are also pulled.


So i open the powershell "Git Shell" that comes when installing Github for windows. Then i looked for how to clone the directory here :
https://help.github.com/articles/cloning-a-repository/

So now first issue i have is, i'm able to change drive, but i'm not able to get to the folder i want it to clone the files. Usualy on command line i was using "cd:\foldername" but it doesn't work on this powershell and i can't find how online.

Thanks!
MatrixModulator
Okay.. i switched to use the bash command line instead of powershell on the config panel of the github software.

Using "$ cd foldername" to open the folder.

Then using:
$ git clone https://github.com/pichenettes/eurorack.git
to clone the directory.

Now i don't know how to do "git submodule init && git submodule update"
like specified on the mutable open page
duff
Are you in the braids sub directory when you try?
MatrixModulator
duff wrote:
Are you in the braids sub directory when you try?


I don't know..
I'm currently using
git clone --recursive git://github.com/pichenettes/eurorack.git
to clone everything with submodules, that's another correct way to do it right?
(found here at the bottom : http://longair.net/blog/2010/06/02/git-submodules-explained/ )
MatrixModulator
[/img]
duff
Yes that works too.
loderbast
are you using the vagrant thingy?

i think it does the git clone stuff for u. (also getting all the stuff the makefile needs)

its all in here:
http://mutable-instruments.net/forum/discussion/7355/making-firmware-h acking-easier/p1
and here: https://github.com/pichenettes/mutable-dev-environment
MatrixModulator
duff wrote:
Yes that works too.


Yeah it seems like it works, folder is now bigger in size.
But how you do it without that new command ?
I was having errors with submodule init && git submodule update
MatrixModulator
loderbast wrote:
are you using the vagrant thingy?

i think it does the git clone stuff for u. (also getting all the stuff the makefile needs)

its all in here:
http://mutable-instruments.net/forum/discussion/7355/making-firmware-h acking-easier/p1
and here: https://github.com/pichenettes/mutable-dev-environment


i don't know about that "vagrand thingy"... I just want to upload the firmware on my fresh new braids and elements builds.
duff
MatrixModulator wrote:
duff wrote:
Yes that works too.


Yeah it seems like it works, folder is now bigger in size.
But how you do it without that new command ?
I was having errors with submodule init && git submodule update


You have to be in the cloned directory (or within the structure below it).

$ git clone https://github.com/pichenettes/eurorack.git
$ cd eurorack
$ git submodule update --init
MatrixModulator
duff wrote:
MatrixModulator wrote:
duff wrote:
Yes that works too.


Yeah it seems like it works, folder is now bigger in size.
But how you do it without that new command ?
I was having errors with submodule init && git submodule update


You have to be in the cloned directory (or within the structure below it).

$ git clone https://github.com/pichenettes/eurorack.git
$ cd eurorack
$ git submodule update --init


Oh ok i guess missed that part: $ cd eurorack
MatrixModulator
Quote:
Toolchain

To build Braids’ code, an ARM EABI toolchain must be installed. We recommend jsnyder scripts (which include a lot of useful extras).

The path to the toolchain binaries must be specified in the TOOLCHAIN_PATH variable in makefile.inc.

To build the code, use the following command:

make -f braids/makefile

If you modify lookup tables and want the big resources.cc file to be regenerated:

touch braids/resources/resources.py && make -f braids/makefile resources


Do i need the toolchain if i just want to install the firmware?
What's the simplest way to get the firmware installed?
I know we can update the firmware with an audio file playing in the module but can i do this on a fresh diy build?
loderbast
MatrixModulator wrote:
I know we can update the firmware with an audio file playing in the module but can i do this on a fresh diy build?


nope it needs a bootloader to do that.

i think the easiest way is install virtual machine and vagrant and let the vagrant script do everything else for you (get the source from git, install the toolchain etc.)
i understand that you only want to program your modules not change anything in the code, but this is probably still the easiest way.
MatrixModulator
loderbast wrote:
MatrixModulator wrote:
I know we can update the firmware with an audio file playing in the module but can i do this on a fresh diy build?


nope it needs a bootloader to do that.

i think the easiest way is install virtual machine and vagrant and let the vagrant script do everything else for you (get the source from git, install the toolchain etc.)
i understand that you only want to program your modules not change anything in the code, but this is probably still the easiest way.


Cool thanks, so how do i run the vagrant script? Where is it?
loderbast
MatrixModulator wrote:

Cool thanks, so how do i run the vagrant script? Where is it?


files and expanaition are here: https://github.com/pichenettes/mutable-dev-environment

if some information is missing it should be in this thread:http://mutable-instruments.net/forum/discussion/7355/making-fir mware-hacking-easier/p1

good luck!
Altitude909
Dont waste your time with setting up a tool chain in the PC. Set up the VM and be done with it. You dont have to flash it from the VM either, just generate the binaries there and flash with STlink utility
av500
wasn't there a thread here where somebody collected all the actual binaries? so you would not even need the VM to compile if all you want is to flash a stock firmware.
MatrixModulator
Ok thanks, i'm currently waiting for the st-link to arrive here (just bought it) and have like 2-3 ways to do this as suggested by some fellow wigglers so i'll update this thread as soon as i'm a step ahead.

Thanks MY ASS IS BLEEDING
Conjure
I uploaded the code for him over FTDI last night with a virtual machine and TeamViewer razz Got his Braids and Elements code all compiled and uploaded to the modules.
MatrixModulator
Yes, i'm currently soldering jacks and pots grin
MY ASS IS BLEEDING MY ASS IS BLEEDING MY ASS IS BLEEDING MY ASS IS BLEEDING
squarewavesurfer
I have decided to write a long post to help others using windows 10 to program DIY mutable modules.

Background:

Over the last couple months I have started doing DIY mutable instruments builds. To date, with the help from muffwigglers users, I have successfully built and programmed Braids, Branches, Tides (sheep), and Rings.

Start by following the instructions here to install what you need to get started with the virtual machine:
https://github.com/pichenettes/mutable-dev-environment

other great resources:
- Tom Whitwell's blog on writing mutable code
https://medium.com/music-thing-modular-notes/how-to-get-started-writin g-your-own-firmware-for-mutable-instruments-clouds-a08173cec317#.opdlm ydjr
- DIY unsuccessful builds forum
https://www.muffwiggler.com/forum/viewtopic.php?t=143366&start=575&pos tdays=0&postorder=asc&highlight=
- DIY successful builds forum
https://www.muffwiggler.com/forum/viewtopic.php?t=138926&start=0&postd ays=0&postorder=asc&highlight=


Problem 1: If unable to get the mutable dev vagrant environment working in windows follow these instructions:


    If Guest Additions for Virtual Machine crash during install, follow these instructions:
      Thanks to sunlover on virtualbox.org forums (https://forums.virtualbox.org/viewtopic.php?f=2&t=64251)

      To fix the guest and install additions you have to enable 3D in the VM settings and then either:
      a) reinstall W10 and install 4.3.18 guest additions from scratch;
      or
      b) run
      VBoxWindowsAdditions-x86.exe /uninstall
      in the guest. Reboot the guest (this is important). And then install additions again.

      Generally to use W10 guest with VirtualBox 4.3.18:
      1) use 'Windows 8.1' guest type when the VM is created;
      2) enable 3D acceleration in the VM settings;
      3) install 4.3.18 guest additions.


Problem 2: ssh commands don't work in command prompt for windows 1

    To use ssh commands in windows 10:

    - Install git: http://git-scm.com/download/win

    - Open Command Prompt (Run as Administrator)

    - type: PATH=%PATH%;C:\Program Files\Git\usr\bin
    - this has to be typed each time you open the command prompt


Problem 3: After "vagrant up" (step 4 below), if mounting fails try this:
    - if mounting fails, go to Oracle and remove the mutable dev master virtual machine and restart your computer (not sure why, but this seems to help) and return to step 1 (below)



After the above (and every time I want to compile or upload code), I am able to get the environment up and running by:

    1. Open Command Prompt (Run as Administrator)

    2. type: set PATH=%PATH%;C:\Program Files\Git\usr\bin

    3. type: cd c:\Users\your user name here\.vagrant.d\mutable-dev-environment-master\

    4. type: vagrant up
      - wait for command prompt to return to "c:\Users\your user name here\.vagrant.d\mutable-dev-environment-master\"


    5. type: vagrant ssh
      - wait for command prompt to show "vagrant@vagrant-ubuntu-trusty-64:/vagrant/eurorack-modules$"


    6. type: git submodule update --init

    7. type: make -f braids/bootloader/makefile hex
    type: make -f braids/makefile

    8. type: make -f braids/makefile upload_combo_jtag



step 7 and 8 will vary depending on the module and the interface you are using.

Look on the mutable site's open source section of each module for info: http://mutable-instruments.net/modules/braids/open

For ARM modules (e.g. Braids, Rings):
I am using the recommended Olimex ARM-USB-OCD-H (note: you also need adapter ARM-JTAG 20-10 from Olimex)

For AVR modules (e.g. Branches):
I am using the Olimex AVR-ISP-MK2 (note: you need an adapter to go from the 10-pin ICSP10 to the 6-pin mini jtag - I made my own).



Problem 4: Errors received when trying to upload firmware to module using the mutable vagrant environment using the Olimex AVR-ISP-MKII:
    Note: the instructions for code compiling may not be 100% correct as I compiled it weeks ago. It was the uploading of the code I couldn't do until today.

    Here is how I got it to work with some help from muffwiggler user adam:


    1. Use mutable vagrant environment to compile the bootloader and code. This will create the build folders: Branches and Branches_Bootloader in \.vagrant.d\mutable-dev-environment-master\eurorack-modules\build
    - make -f branches/bootloader/makefile hex
    - make -f branches/makefile

    2. Install Atmel Studio 7.0 (may not be able to detech Olimex avr isp mkii at first): To fix this error (thanks to Ant2N on the Olimex forums) https://www.olimex.com/forum/index.php?topic=4065.0):

    - Download Zadig: http://zadig.akeo.ie/. Zadig is a USB driver manager for Windows, and saved me a hundred times this year. The last version comes with the libusb-win32 (v1.2.6.0) driver embedded.

    - Open Zadig, Options, List All Devices. The AVRISP mkII device should appear in the list.
    - Replace its current driver by libusb-win32 (v1.2.6.0)

    3. Use Atmel Studio 7.0 to flash the chip:

    - Select Tools -> device programmer
    - Select IVR isp mkii from Tool list
    - select device (select the exact chip: ATmega88PA)
    - select apply
    - program fuses:
    - extended fuse: 0xF8
    - high fuse: 0xDD
    - low fuse: 0xE2
    - program lock bit:
    - lockbit: 0x2F
    - under program file, program device from ELF production file: open bootloader ELF file: /builds/branches_bootloader/branches_bootloader.elf, check flash, then select program
    - under program file, program device from ELF production file: open firmware ELF file: /builds/branches/branches.elf, check flash, then select program


    DONE!
jonny_w
Fantastic, thanks for that squarewavesurfer! SlayerBadger!
xbted
The command that worked for me to get the ssh working was:

set PATH=%PATH%;C:\Program Files\Git\usr\bin

I think it needs 'set' in front of 'PATH'
squarewavesurfer
xbted wrote:
The command that worked for me to get the ssh working was:

set PATH=%PATH%;C:\Program Files\Git\usr\bin

I think it needs 'set' in front of 'PATH'


thanks, I mistakenly left that out. I have updated my previous post.
loydb
I've got VirtualBox installed, along with the extensions and Vagrant. Unfortunately, 'vagrant up' fails (see below). Am I supposed to create a virtual machine first?

Thanks!

-- cut




Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.

C:\Users\Loyd>cd "c:\Program Files\Oracle\VirtualBox"

c:\Program Files\Oracle\VirtualBox>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'base' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/uri/rfc3986_parser.rb:66: in `split': bad URI(is not URI?): file:///c:/Program Files/Oracle/VirtualBox/base (URI::InvalidURIError)
from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/uri/rfc3986_parser.rb:72: in `parse'
from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/uri/common.rb:226:in `parse'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/acti on/builtin/box_add.rb:471:in `metadata_url?'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/acti on/builtin/box_add.rb:81:in `block in call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/acti on/builtin/box_add.rb:79:in `map'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/acti on/builtin/box_add.rb:79:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/acti on/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/acti on/builder.rb:116:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/acti on/runner.rb:66:in `block in run'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/util  /busy.rb:19:in `busy'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/acti on/runner.rb:66:in `run'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/acti on/builtin/handle_box.rb:82:in `handle_box'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/acti on/builtin/handle_box.rb:42:in `block in call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/acti on/builtin/handle_box.rb:36:in `synchronize'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/acti on/builtin/handle_box.rb:36:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/acti on/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/acti on/warden.rb:95:in `block in finalize_action'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/acti on/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/acti on/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/acti on/builder.rb:116:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/acti on/runner.rb:66:in `block in run'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/util  /busy.rb:19:in `busy'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/acti on/runner.rb:66:in `run'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/acti on/builtin/call.rb:53:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/acti on/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/plugins/provider s/virtualbox/action/check_virtualbox.rb:17:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/acti on/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/acti on/builder.rb:116:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/acti on/runner.rb:66:in `block in run'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/util  /busy.rb:19:in `busy'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/acti on/runner.rb:66:in `run'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/mach ine.rb:225:in `action_raw'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/mach ine.rb:200:in `block in action'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/envi ronment.rb:567:in `lock'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/mach ine.rb:186:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/mach ine.rb:186:in `action'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/batc h_action.rb:82:in `block (2 levels) in run'

c:\Program Files\Oracle\VirtualBox>vagrant init
`Vagrantfile` already exists in this directory. Remove it before
running `vagrant init`.

c:\Program Files\Oracle\VirtualBox>
MUFF WIGGLER Forum Index -> Music Tech DIY Goto page 1, 2  Next [all]
Page 1 of 2
Powered by phpBB © phpBB Group