Skip to content

Blink for the STM32F103 (ARM Cortex M3) with support for USART communication and GDB extended remote debugging using libopencm3.

License

Notifications You must be signed in to change notification settings

petrutoader/stm32f103-blink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stm32f103-blink

Inspired from Arduino's Blink, this time for an ARM Cortex-M3 MCU (STM32F103)!

Installing ARM GNU Toolchain on Mac

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

Cloning and compiling libopencm3

$ cd !$
$ git submodule update --init # (Only needed once)
$ pushd libopencm3 && make && popd

Compiling the software

$ make -C src

To run with GDB (ARM GNU GDB)

For st-util:

$ arm-none-eabi-gdb src/stm32f103-blink.elf
$ > target extended-remote :4242
$ > load
$ > run

For Black Magic Probe

$ 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

To open the serial communication (using tio)

$ tio --baudrate 115200 --databits 8 --flow none --stopbits 1 --parity none /dev/tty.usbmodemXXXXX

Sources

About

Blink for the STM32F103 (ARM Cortex M3) with support for USART communication and GDB extended remote debugging using libopencm3.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published