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


#21

git submodule init && git submodule update


#22

Seems like I still have permissions issues trying to checkout.

Cloning into ‘avr_audio_bootloader’…
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Clone of ‘git@github.com:pichenettes/avr-audio-bootloader.git’ into submodule path ‘avr_audio_bootloader’ failed

Same happens in sourcetree as well as the cli


#23

Have you generated a keypair to use with GitHub? Git needs that to talk to GitHub over ssh, even for publicly accesible repositories.


#24

Sorry, the reference to avr-audio-bootloader.git did not use the public repo. This is fixed.


#25

trying to get github to accept the key, done the generation multiple times… now hunting to see if there is an issue with openSSH on 10.10.2 … I expect there will be and I’ve hit a brick wall!

nnnngh APPLE


#26

Reclone from scratch. This was a mistake on my side - the link to the avr-audio-bootloader repo was not a link to the public repo but to my private one. Sorry.


#27

I’m running OS X 10.10.latest and it all works nicely.


#28

keys added, to clone all I needed to do was to delete the folder and now I have a tonne of gcc errors around the ARM libraries.

The reference the the TOOLCHAIN path, does that get entered in full into the makefile as per the rest of the setup variables in the top section?


#29

> The reference the the TOOLCHAIN path, does that get entered in full into the makefile as per the rest of the setup variables in the top section?

Not sure I understand this. There is only TOOLCHAIN_PATH to modify, everything else is deduced from this.


#30

Just checking: did you compile and install the ARM EABI toolchain? You can’t build the code with the standard gcc or clang.


#31

yes that’s all in there. my errors now all relate to the numpy libraries. which install via pip no problem but I get this lovely message.

python stm_audio_bootloader/fsk/encoder.py \\
-s 48000 -b 16 -n 8 -z 4 -p 256 \\
build/peaks/peaks.bin
Traceback (most recent call last):
File “stm_audio_bootloader/fsk/encoder.py”, line 31, in
import numpy
ImportError: No module named numpy

my local path points to the MAMP’s python 2.7 I’m now starting to wonder if the compiler uses tha or not, as macports install made no difference to it all.

Unfortunately I need MAMP all hooked up for the python build for work… as this is their laptop :wink:


#32

even checking off python paths etc… still no luck, so I think I’ll take this as a sign that it’s simply not meant to be today.


#33

Could be the old multiple python instances problem. Presumably numpy was installed in site-packages. Just make sure that it was installed in the site-packages directory listed in the PYTHONPATH env variable which is being referenced by the instance of python being called by make.


#34

Do you know how to find the python path that make is utilising? ‘which python’ result I think is not the one being used


#35

In the shell that you are running make in:

$ env

and look for PYTHONPATH.

If it isn’t there, you may need to add it so python can find the site-packages directory

$ export PYTHONPATH=$PYTHONPATH:/whatever/site-packages

where whatever is the full path to site-packages where numpy is installed. If in doubt, check StackOverflow - it is a common problem and there is lots of advice there.


#36

ok found that this can be resolved with:

“sudo port select --set python python27”

For any MAMP users out there …

Now I’m back to this ::

python stm_audio_bootloader/fsk/encoder.py \\
-s 48000 -b 16 -n 8 -z 4 -p 256 \\
build/peaks/peaks.bin
Traceback (most recent call last):
File “stm_audio_bootloader/fsk/encoder.py”, line 35, in
from stm_audio_bootloader import audio_stream_writer
ImportError: No module named stm_audio_bootloader
make: ***** [wav] Error 1

folder exists in the project. Toolchain is set.


#37

That’s weird. Do you have . in your python path? I mean, will python know to look up modules in .?

export PYTHONPATH=$PYTHONPATH:/whatever/site-packages:.


#38

Updated to::

export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/site-packages:.

Working. YAY!

Sorry for all the hassles guys. I think it’s the stupid combinations of compilers I have to have for other work that have been causing the issues.

Now to go break some modules … I think I’ll start with peaks … worse case scenario is the cheapest goes first, I can’t afford to ruin too many tides or my braids as I find my way about the code.


#39

If it all goes pear-shaped, just reflash the module and start again. You can’t damage them by software means.


#40

You could damage things by configuring as output a processor pin that should be configured as input - causing a short somewhere and/or pushing the processor above current limits.

Or erasing the bootloader.

But a mere “bug” or mistake in the code doesn’t cause such things. As long as you mess with the application code itself (and not what’s in /drivers), you’re safe.