avikde / koduino

Arduino code for STM32 microcontrollers
http://avikde.me/koduino
Other
61 stars 25 forks source link
arduino board c chip hardware-support microcontroller serial

Documentation Status

Koduino

This is a library of code for boards developed using the STM32 F3/F4 microcontrollers, chosen for their great price/performance ratio, friendly built-in bootloaders, and (for the Cortex-M4F ones) FPU support.

Supported hardware

Supported software

Why does this library exist?

Roger Clark compiled a list of other STM32 Arduino compatibility projects. I really began working on this because my initial F373-based hardware was not supported by any of them. Even so, I think this library may have some of the folowing benefits for others as well.

As a user

  1. Works with the Arduino IDE
  2. Awesome features that are not in Arduino: e.g.
    1. Hardware floating point, and advanced math libraries (Eigen is included)
    2. Non-blocking PWM input--use PWM as a fast, simple communication method
    3. Fast SD-card writing using SDIO
    4. Timer interrupts (run code with precise timing up to several MHz)
    5. ...
  3. Hands-free programming on boards with hardware support (FTDI chip with NRST/BOOT0 connections)
  4. Wireless programming on boards with hardware support (wireless-UART like XBee)
  5. Already in use in my several of my own critical projects, including
    1. "Flight control" boards with EKF orientation filtering, motor control and data logging @ 2 KHz
    2. Field-oriented brushless commutation @ 25 KHz

As a developer

  1. Porting to new chips: This process is much easier than with libmaple, or Aeroquad32, etc. because this library uses a (relatively) portable interface layer, the ST standard periperal library, to try and use the same Arduino core code to interface with several microcontrollers. The alternative, to begin with the register map for each new chip, is tedious at best (trust me, I tried ;) ).
  2. Open-source hardware: No custom bootloaders are required. You can literally make your own board from one of the reference designs (repo coming soon), or even begin straight from the microcontroller datasheet reference schematic, and get your own hardware working quickly.

Get started

1. Get code from this repository

If you're used to mercurial, git should be no problem. You can

2. Program microcontrollers

Links to get started are at http://avikde.me/koduino.

Contribute

If this library is helpful to you, please consider contributing to it. The main areas that need help are:

You are welcome to fork, and please submit pull requests if you do! Additionally, I would love to have direct collaborators who have commit access--don't hesitate to get it touch.