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

Flashing STM with pre-compiled .hex files? OSX?
MUFF WIGGLER Forum Index -> Music Tech DIY  
Author Flashing STM with pre-compiled .hex files? OSX?
TheMentat
Hi All,

Please excuse any bungled terminology, but I am trying to flash some .hex files containing firmware onto the STM chip of a module I've built (it's this m-Brane module... a mini Yarns). I guess the pcb I have needs some modified firmware to deal with a mistake on the PCB. meh

Anyhow, I have no problems using Olivier's vagrant environment to compile code and upload to the Yarns firmware to the module. But I now have these pre-compiled hex files that need to be used. I suspect there's some STLink utility that could be used with my STLINK V2, but from what I can tell, it needs a Windows machine.

Is it possible for an OSX user to burn pre-compiled .hex files?
troutblood
I copy/pasted this from a Facebook group posting a couple years ago. It's always worked for me.



STEP BY STEP TUTORIAL FOR NOOBS
HOW TO FLASH MUTABLE INSTRUMENTS MODULES ON OS X

1_open the terminal

2_ Install the homebrew library
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/…/install)"

2_ install this arm toolchain. type :
brew tap nitsky/stm32
then :
brew install arm-none-eabi-gcc
and :
brew install --HEAD stlink
(For mac os Sierra+ use : brew install stlink)

3- plug your st-link and jtag adapter to your module and power the module.

4_ open 2 terminal windows on the first one type
st-util
hit enter

on the second one type
arm-none-eabi-gdb
hit enter and then
tar ext :4242
hit enter

5_ now you can first load the boot loader and then the firmware
take them here already compiled
https://www.dropbox.com/sh/z7p2epcbigvl57c/AADl-A8MvFatvBTd0IGirK2ha?d l=0
download the folders you need
locate the .elf files.
now let's load! in the second window type : load
and then drag and drop the bootloader elf file, hit enter

repeat this process for the firmware elf file.

then type : run
hit enter it's on the chip

It will ask "The program being debugged has been started already.
Start it from the beginning? (y or n)"


type : N
type : disconnect
hit enter , you can now disconnect and turn off the power

turn the power back on and make some noise sweet jesus
TheMentat
thanks! I'll give it a shot!
TheMentat
Bah... seems this doesn't work with OSX 10.13. I get hung up on step 2
troutblood
Hmm. I wouldn't know anything about that. I'm on 10.11, and it works on that and previous versions.
TheMentat
OK... I think I figured it out...

I grabbed the arm-none-eabi formula from somewhere else:

2_ install this arm toolchain. type :
brew tap cs107e/cs107e
then :
brew install arm-none-eabi
and :
brew install stlink

Module seems to work (it's not bricked anyhow). I'll make sure it works as expected later...
dComposer
Hey Mentat - how did this work out? I’ve built a ton of modules but I’ve been scared to do any of the MI ones that need programming because I’m on a Mac and it sounds terrifying! Were you successful with these instructions?

PS: I dig the name! Almost done with Children of Dune right now...
MUFF WIGGLER Forum Index -> Music Tech DIY  
Page 1 of 1
Powered by phpBB © phpBB Group