Nima Askari
Nima AskariEmbedded C / 20+ years

Firmware libraries, engineered to drop in.

Lightweight, non-blocking C libraries for STM32, and five installers that put any library into an STM32, Zephyr, ESP-IDF, Arduino or PlatformIO project with one command.

stars
4,000+
followers
1,000+
installers
5
U1 STM32-INSTALLER
$ pip install stm32-installer
$ stm32-installer nimaltd/stm32-installer-example
Fetching nimaltd/stm32-installer-example ...

Files
  written example/src/example.h
  written example/src/example_config.h
  written example/src/example.c

Project
  updated CMake  Added example to CMakeLists.txt

Done. #include "example.h" and you are away.
01

One command, five platforms

Each installer copies the library into your project, adds it to the build, brings what it needs, and keeps your settings through every update.

stm32-installer

For STM32 projects in CMake, STM32CubeIDE, Keil, IAR and Makefile.

  • Adds the library to your project file, and backs the file up first
  • Any library it needs comes with it
  • An update keeps your settings
$ pip install stm32-installer
$ stm32-installer nimaltd/stm32-installer-example

The example blinks an LED without HAL_Delay(), in any STM32 project.

zephyr-installer

For Zephyr and nRF Connect SDK applications.

  • Makes the library a Zephyr module of your application
  • Adds it to CMakeLists.txt and switches it on in prj.conf
  • Its settings are in Kconfig
$ pip install zephyr-installer
$ zephyr-installer nimaltd/zephyr-installer-example

The example builds in any Zephyr application, native_sim included.

esp32-installer

For ESP-IDF projects, on any ESP32 chip.

  • Makes the library a component in components/, with its own CMakeLists.txt
  • Its settings are in idf.py menuconfig
  • The symbols it needs go into sdkconfig.defaults
$ pip install esp32-installer
$ esp32-installer nimaltd/esp32-installer-example

The example is a period that never blocks, with its settings in menuconfig.

arduino-installer

For the Arduino IDE, version 1 or 2, and arduino-cli.

  • Into your sketchbook's libraries folder, for every sketch
  • Or into one sketch's src folder, for that sketch alone
  • Writes the library.properties Arduino knows the library by
$ pip install arduino-installer
$ arduino-installer nimaltd/arduino-installer-example

The example builds for any board, and prints on Serial.

pio-installer

For PlatformIO, with any framework: Arduino, ESP-IDF, STM32Cube, or none at all on the native platform.

  • Into lib/, with the library.json PlatformIO builds it by
  • The defines it needs go into platformio.ini, for every environment
  • Names any environment the library will not build in
$ pip install pio-installer
$ pio-installer nimaltd/pio-installer-example

The example builds with every framework, and runs on your computer with no board.

02

Libraries

Ready for stm32-installer, each with one command. The rest are moving over one by one.

spif 723

Driver for SPI NOR flash, W25Qxx and compatible, on the STM32 HAL.

  • SPI NOR
  • DMA
  • LittleFS
stm32-installer nimaltd/spif

ee24 181

Driver for 24xx I2C EEPROMs, 24C01 to 24C512, on the STM32 HAL.

  • I2C
  • EEPROM
  • DMA
stm32-installer nimaltd/ee24

seq 65

Non blocking state sequencer and interrupt task queue for STM32, with no RTOS.

  • No RTOS
  • Interrupt safe
stm32-installer nimaltd/seq

osal

OS abstraction layer for STM32: the same mutex and delay on bare metal, FreeRTOS and ThreadX.

  • FreeRTOS
  • ThreadX
  • Bare metal
stm32-installer nimaltd/osal

littlefs

LittleFS by the littlefs project, a fail-safe file system, ready for stm32-installer.

  • File system
  • Power loss safe
stm32-installer nimaltd/littlefs

More on GitHub

All 58 repositories

03

Make your library installable

The installers are not only for my libraries. Put one installer.yml at the root of any library's repository, and all five can install it: each reads its own keys and leaves the others alone.

Only name and files are required. Everything else, the libraries it needs, its options, its settings and each platform's own keys, is there when you want it.

The keys, platform by platform:

installer.yml
name: mylib
description: Driver for the X chip
repository: https://github.com/you/mylib
license: Apache-2.0

files:
  headers:
    - src/mylib.h
    - src/mylib_config.h   # your settings
  sources:
    - src/mylib.c
04

About, and support

Nima Askari

Nima Askari

Electronics engineer and embedded developer. More than 20 years of C for STM32 microcontrollers, across embedded programming, electronics design and hardware testing, and most of it spent on one goal: libraries that are actually easy to use.

  • Third place, National Skills Competition of Electronic Engineering, Iran, 2003
  • B.Sc. in Electronic Engineering, Chamran University, Rasht

Free and open source

Every library and installer here is free. If one saved you an afternoon, a star helps other engineers find it, and a coffee keeps them coming.