Close

burning firmware onto an ST-Link to burn firmware onto anything else

davedarkodavedarko wrote 06/07/2021 at 18:37 • 1 min read • Like

at least I'm trying to find that out. The clones from aliexpress are supposed to be only able to program st chips. But I want to use it to program some SAMD-21 chips. Never done that as well. So this is a link drop first. Figuring it out for MAC OS.

install open-OCD via homebrew

for unlocking the stm for new firmware go here

https://hackaday.io/project/162597-st-link-clone-repurposing/log/156668-programming

install new firmware called cmsis-dap

https://mvdlande.wordpress.com/2015/10/05/cmsis-dap-on-a-cheap-st-link-v2-mini-adapter/

get this file

https://raw.githubusercontent.com/x893/CMSIS-DAP/master/Firmware/STM32/hex/CMSIS-DAP-STLINK21.hex

install with this line

openocd -f interface/stlink.cfg -f target/stm32f1x.cfg -c "init" -c "halt" \

    -c "flash write_image ./CMSIS-DAP-STLINK21.hex" -c "shutdown"


doing this to flash arturos latest keyboard firmware, had to install arm gcc first. Brew doesn't work as it's not trusted. Downloading here helped.

https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads

to compile arturos fine firmware, you need to add the ARM stuff to your path, otherwise you compile and wonder why he wont find "gcc-arm-none-eabi" again. 

export PATH="$PATH:/Applications/ARM/bin/"
Like

Discussions