HowTo: Compile MutableInstruments firmware under Win7-64bit step by step

Yes, good jorb. Need moar hacks!

Windows is so sick when you try to setup such toolchains. In my case one time I have luck with only arduino/python installed, avrlib makefile.mk edited and python and arduino added to windows path, another time i need WinAVR and MSYS. Both times it works with long filenames.

Just checked with clean install of Windows7 x64.
Here’s the way it works for me

  1. install python-2.5.4.amd64.msi (get from here ) to it’s default destination c:\\python25
  2. unzip arduino-1.0.1-windows.zip (get from here ) to c:\\arduino
  3. Press Win+Pause/Break >Advanced system settings> Environment variables, doubleclick “path” variable and add ;c:\\python25;c:\\arduino\\hardware\\tools\\avr\\utils\\bin to the end of it’s line. (exactly all the bold text) Press Ok, Ok.
  4. Download avril, avril-firmware-tools and shruthi1 source archives from github, extract contents of shruthi(midipal) archive somewhere, than extract contents of avril and avril-firmware-tools archives to shruthi1\\avrlib and shruthi1\\tools folders respectively. Do the same for midipal.
  5. Open avrlib\\makefile.mk in text editor and replace path variables with
    AVRLIB_TOOLS_PATH = C:\\arduino\\hardware\\tools\\avr\\bin/
    AVRLIB_ETC_PATH = C:\\arduino\\hardware\\tools\\avr\\etc/
  6. In the windows shell cd to shruthi folder and type “make”, “make midi” or “make syx” if you need .mid/.syx files. After completing firmware compilation cd to build/shruthi1 (or build/midipal) and look for fresh firmware.

Updated the python command line to convert to .syx format.

hey this could be a chance for me to learn to do it once in a professional manner. are the instructions also true for Windows 7 32 bit ?

Just had a go at this on Win7 32 bit. I followed Schrab’s instructions (getting the x86 version of Python 2.5) and kept getting the depends.mk: No such file or directory error when running make (described in an earlier forum post by Mr_Roboto).

I did two things, one or both may have been required to fix it. Firstly I installed WinAVR, to get to the ‘sh.exe’ mentioned in that thread. (I don’t think this was necessary as the same file resides in the Arduino package, and anyway I didn’t seem to need it) The installation of WinAVR adds the ‘winavr\\utils\\bin’ folder to the path, which might be important.

Secondly I quit the command line prompt I had been using and started a new one (I think an open cmd doesn’t receive changes to the path) - successfully compiled shruthi and ambika_voicecard with just a make in the relevant project folder.
I had to do *make f controller/makefile* to create ambika_controller.hex is this the right way to do it?

Yes, make -f controller/makefile for the mobo code and make -f voicecard/makefile for the voicecard code.

@mangros that’s i’m talking about :wink:
and you’re absolutely right about cmd. PATH variable values reading during shell startup.
I have no more clear windows installtions so now i’m deploing Windows XP in virtual machine, I want to check all the steps with it maybe record step-by-step video.
UPD: try to use c:\\arduino\\hardware\\tools\\avr\\utils\\bin instead of c:\\arduino\\hardware\\tools\\avr\\bin in the Windows PATH variable. I think i’ve made a mistake with it. It’s not simillar to makefile.mk path!

Yes, it’s my fault! Windows path variable sould be c:\\arduino\\hardware\\tools\\avr\\utils\\bin

Here is my video tutoral for W7 x64

(actually just step-by-step screen capture). There’s something strange happened with background music during recording so just mute it.
If anyone needs Windows XP video - tell me. It’s recorded but not edited yet.

1 Like

schrab, you are my personal TutorialHero™

Thanks Frank!
After doing this i’ve understood that screen recording is much easier than taking screenshots and writing comments.
If no one is against this i’ll make future tutorials this manner.

Anyone got avrdude working on Windows 7 64 bit? My setup keeps failing with:

/WinAVR/bin/avrdude -V -p m644p -C /WinAVR/bin/avrdude.conf -c avrispmkII -P usb -B 10 -e -u \\
-U efuse:w:0xfd:m \\
-U hfuse:w:0xd6:m \\
-U lfuse:w:0xff:m \\
-U lock:w:0x2f:m
avrdude: usbdev_open(): did not find any USB device "usb"
make[1]: ***** [fuses] Error 1

@kvitekp what type of programmer you’re using?

AVRISP mkII – it works perfectly when I use it with AVR Studio 4

avrdude -V -p m644p -c avrisp2 -P usb -e -U lock:w:0x3F:m -e -u \\ -U efuse:w:0xFD:m \\ -U hfuse:w:0xD6:m \\ -U lfuse:w:0xFF:m \\ -U lock:w:0x0f:m is what use

Ok. got my environment up on my laptop and can compile everything like I should however, I have a question: What is the correct procedure to compile items like the peripheral nunchuck hex?

Generally: make -f path/to/the/makefile bake sets the fuse for a project and uploads it.

For more complex projects with both a firmware + a bootloader there is a specific command…

do i so that from anywhere or do i have to be in the root?

In the root (directory in which README, .gitignore etc is located)