pichenettes / eurorack

Eurorack modules
2.56k stars 717 forks source link

Instructions for uploading firmware using OSX #28

Open catkins opened 4 years ago

catkins commented 4 years ago

Hi there! Love your work.

I was wondering whether you though it could be useful to folks to include instructions for uploading firmware using OSX without needing to use the Vagrant dev environment.

For me, uploading firmware to Peaks and Braids was relatively straightforward using an STLink-V2 and an Olimex ARM-JTAG-20-10 adaptor.

Requires Homebrew

## SETUP (only required the first time)

# add PX4 formulae to homebrew
brew tap PX4/homebrew-px4

# install STM32 & ARM toolchain
brew install stlink open-ocd px4/px4/gcc-arm-none-eabi-48

# create projects directory if you don't have one and switch to that directory
mkdir ~/projects
cd ~/projects

# clone the mutable eurorack repository
git clone https://github.com/pichenettes/eurorack.git

# switch to the repository
cd eurorack

# clone submodules
git submodule update --init --recursive

## FLASHING THE MODULE

# switch to your checkout of the mutable eurorack repository
# note: change the path if you cloned it to another location
cd ~/projects/eurorack

# configure make scripts to point to the correct ARM toolchain
# note: you will need to repeat this step in the future if you are flashing modules
export TOOLCHAIN_PATH="$(brew --prefix px4/px4/gcc-arm-none-eabi-48)/"

# compile bootloader
# note: this is for peaks, but the steps are the same for most other modules, just change the path to the correct makefiles
make -f peaks/bootloader/makefile hex

# upload to device
make -f peaks/makefile upload_combo_jtag
lijon commented 4 years ago

I just tried this here and it works fine!

djdoz commented 2 years ago

Thanks catkins! This works well for me!