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.
- Upload methods: Serial (incl using USB-Serial adapters), ST-Link V2
- Chip families: F301, F373, F405
- 95% of the Arduino core (felt no urgency to implement
shiftOut
ortone
but they should be easy) - Libraries:
Wire
,SPI
,EEPROM
,Encoder
, etc. - Important:
Serialx
(USART) is supported well, butSerialUSB
(using USB CDC) is not supported yet--coming soon. - Documentation!
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.
- Works with the Arduino IDE
- Awesome features that are not in Arduino: e.g.
- Hardware floating point, and advanced math libraries (Eigen is included)
- Non-blocking PWM input--use PWM as a fast, simple communication method
- Fast SD-card writing using SDIO
- Timer interrupts (run code with precise timing up to several MHz)
- ...
- Hands-free programming on boards with hardware support (FTDI chip with NRST/BOOT0 connections)
- Wireless programming on boards with hardware support (wireless-UART like XBee)
- Already in use in my several of my own critical projects, including
- "Flight control" boards with EKF orientation filtering, motor control and data logging @ 2 KHz
- Field-oriented brushless commutation @ 25 KHz
- 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 ;) ).
- 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.
If you're used to mercurial, git should be no problem. You can
- Download the repository as a zip file, or
- Clone it by typing
git clone https://github.com/avikde/koduino.git
at the location you want.
Links to get started are at http://avikde.me/koduino.
If this library is helpful to you, please consider contributing to it. The main areas that need help are:
- Adding support for more chips
- Maintaining upload tools for several OS'es / platforms, debugging wireless uploads, making uploads faster, etc.
- Contributing to the Arduino core: I often leave out functionality that I don't need (e.g.
tone
) but someone might!
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.