All Projects → libopencm3 → Libopencm3 Examples

libopencm3 / Libopencm3 Examples

Simple example projects showing how to use libopencm3.

Labels

Projects that are alternatives of or similar to Libopencm3 Examples

Facereconstruction
Facial Landmark Detection and head pose compute use dlib, Real time Face Reconstruction use 3D Morphable Face Model fitting
Stars: ✭ 323 (-13.17%)
Mutual labels:  makefile
Awesome Music Production
A curated list of software, services and resources to create and distribute music.
Stars: ✭ 340 (-8.6%)
Mutual labels:  makefile
Hermit
Hermit is a monospace font designed to be clear, pragmatic and very readable.
Stars: ✭ 367 (-1.34%)
Mutual labels:  makefile
Python Docs Fr
French translation of the Python documentation.
Stars: ✭ 326 (-12.37%)
Mutual labels:  makefile
Makefile Templates
Makefile templates for different sized projects
Stars: ✭ 336 (-9.68%)
Mutual labels:  makefile
Intel Nuc Dsdt Patch
Patches and Clover configuration required for Intel NUC5/6/7/8 series mini PCs
Stars: ✭ 355 (-4.57%)
Mutual labels:  makefile
Alpine Elixir Phoenix
An Alpine Linux base image containing Elixir, Erlang, Node, Hex, and Rebar. Ready for Phoenix applications!
Stars: ✭ 320 (-13.98%)
Mutual labels:  makefile
7xx Rfc
At Railscamp X it became clear there is a gap in the current HTTP specification.
Stars: ✭ 4,190 (+1026.34%)
Mutual labels:  makefile
Phpthewrongway
A pragmatic view on PHP programming.
Stars: ✭ 338 (-9.14%)
Mutual labels:  makefile
Cs Wiki
Lambda School CS Wiki
Stars: ✭ 363 (-2.42%)
Mutual labels:  makefile
Node.docker
🌐 Super small Node.js container (~15MB) based on Alpine Linux OS
Stars: ✭ 328 (-11.83%)
Mutual labels:  makefile
Xmake
🔥 A cross-platform build utility based on Lua
Stars: ✭ 4,229 (+1036.83%)
Mutual labels:  makefile
Http2 Spec
Working copy of the HTTP/2 Specification
Stars: ✭ 3,622 (+873.66%)
Mutual labels:  makefile
Ports
Public git conversion mirror of OpenBSD's official cvs ports repository. Pull requests not accepted - send diffs to the [email protected] mailing list.
Stars: ✭ 324 (-12.9%)
Mutual labels:  makefile
Mfsbsd
mfsBSD
Stars: ✭ 367 (-1.34%)
Mutual labels:  makefile
Procursus
Modern iOS Bootstrap
Stars: ✭ 311 (-16.4%)
Mutual labels:  makefile
Proprietary vendor samsung
Stars: ✭ 342 (-8.06%)
Mutual labels:  makefile
Letter Boilerplate
Finest letter typesetting from the command line
Stars: ✭ 374 (+0.54%)
Mutual labels:  makefile
Luggage
Project to automate OS X package creation without using the packagemaker GUI
Stars: ✭ 368 (-1.08%)
Mutual labels:  makefile
Python Package Template
🚀 Your next Python package needs a bleeding-edge project structure.
Stars: ✭ 356 (-4.3%)
Mutual labels:  makefile

README

Build Status

Gitter channel

This repository contains assorted example projects for libopencm3.

The libopencm3 project aims to create an open-source firmware library for various ARM Cortex-M microcontrollers.

For more information visit http://libopencm3.org

The examples are meant as starting points for different subsystems on multitude of platforms. If you're just looking to test your build environment and hardware, the libopencm3-miniblink may be more useful, as it covers many more boards, but it is much more limited.

Feel free to add new examples and send them to us either via the mailinglist or preferably via a github pull request.

Usage

You must run "make" in the top level directory first. This builds the library and all examples. If you're simply hacking on a single example after that, you can type "make clean; make" in any of the individual project directories later.

For more verbose output, to see compiler command lines, use "make V=1" For insanity levels of verboseness, use "make V=99"

The makefiles are generally useable for your own projects with only minimal changes for the libopencm3 install path (See Reuse)

Make Flash Target

Please note, the "make flash" target is complicated and not always self-consistent. Please see: https://github.com/libopencm3/libopencm3-examples/issues/34

For flashing the 'miniblink' example (after you built libopencm3 and the examples by typing 'make' at the top-level directory) onto the Olimex STM32-H103 eval board (ST STM32F1 series microcontroller), you can execute:

cd examples/stm32/f1/stm32-h103/miniblink
make flash V=1

The Makefiles of the examples are configured to use a certain OpenOCD flash programmer, you might need to change some of the variables in the Makefile if you use a different one.

To program via a Black Magic Probe, simply provide the serial port, eg:

cd examples/stm32/f1/stm32-h103/miniblink
make flash BMP_PORT=/dev/ttyACM0

To program via texane/stlink (st-flash utility), use the special target:

cd examples/stm32/f1/stm32vl-discovery/miniblink
make miniblink.stlink-flash

If you rather use GDB to connect to the st-util you can provide the STLINK_PORT to the flash target.

cd examples/stm32/f1/stm32vl-discovery/miniblink
make flash STLINK_PORT=:4242

Flashing Manually

You can also flash manually. Using a miriad of different tools depending on your setup. Here are a few examples.

OpenOCD

openocd -f interface/jtagkey-tiny.cfg -f target/stm32f1x.cfg
telnet localhost 4444
reset halt
flash write_image erase foobar.hex
reset

Replace the "jtagkey-tiny.cfg" with whatever JTAG device you are using, and/or replace "stm32f1x.cfg" with your respective config file. Replace "foobar.hex" with the file name of the image you want to flash.

Black Magic Probe

cd examples/stm32/f1/stm32vl-discovery/miniblink
arm-none-eabi-gdb miniblink.elf
target extended_remote /dev/ttyACM0
monitor swdp_scan
attach 1
load
run

To exit the gdb session type <Ctrl>-C and <Ctrl>-D. It is useful to add the following to the .gdbinit to make the flashing and debugging easier:

set target-async on
set confirm off
set mem inaccessible-by-default off
#set debug remote 1
tar ext /dev/ttyACM0
mon version
mon swdp_scan
att 1

Having this in your .gdbinit boils down the flashing/debugging process to:

cd examples/stm32/f1/stm32vl-discovery/miniblink
arm-none-eabi-gdb miniblink.elf
load
run

ST-Link (st-util)

This example uses the st-util by texane that you can find on GitHub.

cd examples/stm32/f1/stm32vl-discovery/miniblink
arm-none-eabi-gdb miniblink.elf
target extended-remote :4242
load
run

Reuse

If you want to use libopencm3 in your own project, the easiest way is to use the template repository we created for this purpose.

See https://github.com/libopencm3/libopencm3-template

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].