Mac Tutorial: How to compile and upload the firmware of MIs eurorack modules


#101

Thanks Bennelong! Makes much more sense now. also I had downloaded the mac release tarball instead of the src in the tutorial.


#102

Is it preferable to install the gcc-arm-none-eabi from the precompiled binaries or to compile from the src?
Either way, I’m having trouble getting it to work on Yosemite or Lion.
Following the guide in How-to-build-toolchain.pdf, ./build-toolchain.sh gives errors after a long time compiling.


#103

So the toolchain seems to have been properly installed yet when I get to the final step to generate the .wav files I get this error message

Nicholass-MBP:~ nicholasblanchard$ cd /Users/nicholasblanchard/Documents/eurorack/
Nicholass-MBP:eurorack nicholasblanchard$ make -f /Users/nicholasblanchard/Documents/eurorack/clouds/makefile wav
stmlib/makefile.inc:303: build/clouds/depends.mk: No such file or directory
mkdir -p build/clouds/
/usr/local/arm-4.8.3/bin/arm-none-eabi-g++ -MM -g -O2 -Wall -Wno-unused-local-typedefs -fasm -finline -finline-functions-called-once -fdata-sections -ffunction-sections -fshort-enums -fno-move-loop-invariants -I. -DGCC_ARMCM4 -DSTM32F4XX -DAPPLICATION -DF_CPU=168000000L -DF_CRYSTAL=8000000L -DUSE_STDPERIPH_DRIVER -DSYSCLK_FREQ_168MHz=168000000L -Istmlib/third_party/STM -Istmlib/third_party/STM/CMSIS/CM3_f4xx -Istmlib/third_party/STM/CMSIS/CM3_f4xx/startup/gcc -Istmlib/third_party/STM/STM32F4xx_StdPeriph_Driver/inc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb-interwork -funroll-loops -fno-exceptions -fno-rtti clouds/clouds.cc -MF build/clouds/clouds.d -MT build/clouds/clouds.o
make: /usr/local/arm-4.8.3/bin/arm-none-eabi-g++: No such file or directory
make: ***** [build/clouds/clouds.d] Error 1
Nicholass-MBP:eurorack nicholasblanchard$


#104

did you change the toolchain path to where your toolchain is located in the clouds makefile?


#105

@bonobo No. however I just amended the directory path in the clouds makfile, then repeated the process to no avail. I am incredibly bad at this, can’t quit though I’ve made it this far!


#106

So I’ve managed to get as far as the ls /dev/cu.* step and its giving me this…

Nicholass-MBP:pyserial-2.7 nicholasblanchard$ ls /dev/cu.*
/dev/cu.Bluetooth-Incoming-Port /dev/cu.VWPHONE-ParrotSPP1
/dev/cu.Bluetooth-Modem /dev/cu.VWPHONE-ParrotSPP2
Nicholass-MBP:pyserial-2.7 nicholasblanchard$


#107

double post sorry


#108

well well well, doesn’t look like your USB<->serial adapter is hooked to your computer (or recognized by it).

IIRC you have to install some drivers from FTDI on OS X for this to work.


#109

smacking myself on the forehead for this one, I’ve certainly outdone myself… Its not even plugged in.

edit: Also still not getting anywhere with the make command for creating the wav file: Its spitting this out now. I do see that its made a “build” folder with a sub folder called “braids” after I entered this last time.

Nicholass-MBP:eurorack nicholasblanchard$ cd ./braids
Nicholass-MBP:braids nicholasblanchard$ make ./makefile wav
makefile:45: stmlib/makefile.inc: No such file or directory
make: ***** No rule to make target `stmlib/makefile.inc’. Stop.
Nicholass-MBP:braids nicholasblanchard$ make ./makefile wav
/users/nicholasblanchard/documents/eurorack/stmlib/makefile.inc:303: build/braids/depends.mk: No such file or directory
mkdir -p build/braids/
make: ***** No rule to make target `build/braids/startup_stm32f10x_md.d’, needed by `build/braids/depends.mk’. Stop.


#110

Follow the very helpful instructions provided by Olivier at http://mutable-instruments.net/modules/braids/open or the instructions by @flocked at the top of this thread. Those instructions state:

Now you can compile the code as wav files:

  1. Open Terminal and enter:
    1.1. cd /§pathToEurorackFolder§/
    1.2. make -f /§ModuleName§/makefile wav

Olivier’s instructions state: make -f braids/makefile wav

Thus, there is no need to change to the braids directory as you are doing. Just issue “make -f braids/makefile wav” from the top-level directory into which you cloned or unzipped all the source code for the various modules. ./braids is a subdirectory of this top-level directory. So is ./stmlib But ./stmlib is NOT a subdirectory of ./braids, which is why it is throwing the error you observe. Follow the instructions precisely and you’ll be right, don’t try to second-guess them or over-think the procedure, especially if you don’t really know what you are doing.


#111

@BennelongBicyclist
It seems to be working now. A build file was made with a sub folder of braids inside with a bunch of other files. However now the output is this (which is abrieviated due to there being a long chain of other things being executed before this):

Traceback (most recent call last):
File “stm_audio_bootloader/qpsk/encoder.py”, line 35, in
from stm_audio_bootloader import audio_stream_writer
ImportError: No module named stm_audio_bootloader
make: ***** [wav] Error 1
Nicholass-MBP:eurorack nicholasblanchard$

edit: and obviously the wav file was not created


#112

have you run git submodule init && git submodule update?


#113

I did initially, and I just did again I also looked in Finder and the “stm_audio_bootloader/qpsk/encoder.py” python file is indeed there which is puzzling.


#114

hmmm I think you must add . to your PYTHONPATH.

export PYTHONPATH=. should work


#115

Boom! It worked! I can’t thank you enough pichenettes! Also a big thank you toBennelongBicyclist for the help as well as @flocked for the tutorial!


#116

So… i finally finished my clouds build today, but i am having an issue with uploading the .hex: “Can’t init. Ensure that BOOT0 is enabled and reset device”.

I am a bit baffled. Of course i pressed the buttons in the given order many, many times. Also, i checked the traces at the switches and the stm32 looking at the schematics, seemed fine. Tried two different FTDI adapters, both had 3.3V at the RX and TX outs, both brought up the same error.

I did not yet install pots, jacks and LEDs, but that shouldn’t cause the problem, right?

Any help would be deeply appreciated.

PS: Google brought up this thread: http://mutable-instruments.net/forum/discussion/3987/braids-update-help-please-solved/p1 , which had the same problem, caused by not pressing the buttons properly.


#117

Have you connected the module to power? The FTDI won’t supply power to it. Just connect RX, TX and GND. TX and RX cross-connected from FTDI interface to module? Is the RX light on the FTDI flashing, indicating it is trying to communicate wirh the module?


#118

Thank you BennelongBicyclist, i thought FTDI power would be sufficient. Worked alright now.


#119

Is it possible to install that toolchain needed for clouds/elements on mac OS 10.6.8 ?

Thank you that much.
Carsten


#120

> Is it possible to install that toolchain needed for clouds/elements on mac OS 10.6.8 ?

I’d think so. I’m on 10.9.5, fwiw