https://github.com/libopencm3/libopencm3-miniblink
blinkies for _any_ board supported. Useful for testing your toolchain and build environment
https://github.com/libopencm3/libopencm3-miniblink
Last synced: 24 days ago
JSON representation
blinkies for _any_ board supported. Useful for testing your toolchain and build environment
- Host: GitHub
- URL: https://github.com/libopencm3/libopencm3-miniblink
- Owner: libopencm3
- License: other
- Created: 2018-08-29T14:28:04.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-05-08T10:42:37.000Z (about 1 year ago)
- Last Synced: 2024-05-08T11:39:18.684Z (about 1 year ago)
- Language: Makefile
- Size: 47.9 KB
- Stars: 26
- Watchers: 7
- Forks: 16
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# libopencm3-miniblink
This repository contains miniblink examples for any and all boards we can find.
It is intended to be a basic starting point for people who want to test that
their compiler toolchain, flash programming and/or debugger are all working as
expected.It contains _only_ basic blinky examples, one for each board. If you are
looking for full examples that setup complicated clocks, or use onboard
peripherals, you are in the *wrong* place.# Building
Just run ```make```.
If necessary, this will checkout and build the libopencm3 repository, and
then generate a blinky for every known board in the bin directory.If you want to see exactly what it did, run ```make V=1```
# Flashing
Unfortunately, flashing these examples is a _very_ openended task. Below are
some examples that might be helpful, but this is not an exhaustive list.## Using [OpenOCD](http://openocd.org/)
OpenOCD can support a multitude of debug interfaces and targets. Unfortunately
this makes it's config more verbose than some tools.The general form is
```
$ openocd -f interface/.cfg -f target/.cfg \
-c "program file.elf verify reset exit"
```For boards with integrated debuggers, you can sometimes shortcut with a "board.cfg" file instead.
```
$ CMD="program ${ELF_FILE} verify reset exit"
$ openocd -f interface/stlink.cfg -f target/stm32f1x.cfg -c "${CMD}"
$ openocd -f board/stm32l4discovery.cfg -c "${CMD}"
```## Using [st-flash](https://github.com/texane/stlink)
st-flash or st-util can be used with STM32 targets only, with STLink
debugger hardware.```
$ st-flash write path/to/yourfile.bin 0x8000000
```# Next steps
If you _are_ looking for more complicated examples, the [Original libopencm3-examples](http://github.com/libopencm3/libopencm3-examples)
is still relevant, though it's not well maintained, particularly for newer hardware.Other places to look are the [USB Gadget-Zero Tests](https://github.com/libopencm3/libopencm3/tree/master/tests/gadget-zero) are also good at testing your USB hardware. You may also find interesting pieces at https://github.com/karlp/libopencm3-tests and there's also a showcase listed on https://github.com/libopencm3/libopencm3/wiki/Showcase