Git Product home page Git Product logo

libopencm3-miniblink's Introduction

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

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/<your debugger>.cfg -f target/<your 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

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 is still relevant, though it's not well maintained, particularly for newer hardware.

Other places to look are the USB Gadget-Zero Tests 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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.