Inspired from Arduino's Blink, this time for an ARM Cortex-M3 MCU (STM32F103)!
If you don't already have the ARM GNU Toolchain, then you can install it via brew
.
$ brew tap osx-cross/arm
$ brew install arm-gcc-bin
$ cd !$
$ git submodule update --init # (Only needed once)
$ pushd libopencm3 && make && popd
$ make -C src
$ arm-none-eabi-gdb src/stm32f103-blink.elf
$ > target extended-remote :4242
$ > load
$ > run
$ arm-none-eabi-gdb src/stm32f103-blink.elf
$ > target extended-remote /dev/tty.usbmodemXXXXX
$ > monitor tpwr enable !if not powered by another source
$ > monitor swdp_scan
$ > attach X
$ > load
$ > run
$ tio --baudrate 115200 --databits 8 --flow none --stopbits 1 --parity none /dev/tty.usbmodemXXXXX