Skip to content

Vivoware/Voltix_SDK

 
 

Repository files navigation

Build

Voltix Software Development Kit

The code in this repository allows building applications that run on battery-free Voltix devices. For a detailed description refer to the documentation.

For a quickstart with Voltix you can use our Arduino package which internally makes use of the SDK. For more involved projects, continue reading here.

Installation

Download the latest zip release and unpack it to a path on your machine.

Alternatively, clone this repository to get the latest development version of the SDK:

git clone --recursive [email protected]:VoltixTeam/Voltix_SDK.git

Linux

  • Install make from your distribution's repository (apt install build-essential on Ubuntu).
  • Install the GNU Arm Embedded Toolchain from your distribution's repository (apt install gcc-arm-none-eabi on Ubuntu) or from the official website.
  • For uploading firmware to your Voltix device install the voltix-probe Python package with
pipx install voltix-probe
  • Download the Voltix udev rules and copy them to the /etc/udev/rules.d/ directory on your machine.
  • Make sure your user belongs to the plugdev group and reload the udev rules with:
sudo udevadm control --reload-rules
sudo udevadm trigger

Windows

  • Install make via Cygwin following the instructions here.
  • Add the path to make (e.g. C:\cygwin64\bin for Cygwin) to your Path variable (Instructions).
  • Install the GNU Arm Embedded Toolchain from the official website.
  • For uploading firmware to your Voltix device install the voltix-probe Python package globally with
pipx install voltix-probe

Usage

Take a look at the examples for how you can use this SDK. We also provide a template project to get you started with your first Voltix project using the SDK.

In a nutshell: Your application must provide a Makefile that includes the SDK's Makefile and defines the following variables:

  • VOLTIX_SDK_ROOT: Path to the Voltix SDK
  • SRC_FILES: Your C/C++ source files
  • INC_DIRS: Paths to your header files
  • OUTPUT_DIR: Path where project is built
  • GNU_INSTALL_ROOT: Optional. Path to your gcc toolchain if not on your Path.
  • LIB_DIRS: Optional. Paths to static libraries.
  • LIB_FILES: Optional. Static libraries to link against.

Your code defines a main() function. This function is executed while the device has energy and suspended when energy becomes critically low. If the power supply is interrupted, the stack and all static and global variables are stored in non-volatile memory and restored as soon as the supply comes back.

There are a number of callbacks that your application can implement:

  • earlyinit(): Called right after every reset. Perform early stage initizialization required for low-power operation here
  • lateinit(): Called later after every reset. Initialize peripherals here.
  • suspend(): Called right before the application gets suspended. Abort any energy-intensive operation immediately.
  • resume(): Called right after the application gets resumed.

Your application may change the default size of the memory that is retained across power failures as well as the stack size by defining VOLTIX_RAM_RETAINED_SIZE and VOLTIX_STACK_SIZE in the Makefile. For an example, take a look at the dsp example's Makefile.

Features

  • Capacitor voltage monitoring
  • Driver for non-volatile RAM
  • Automatic checkpointing of user application
  • C++ support
  • Basic timing support
  • printf support
  • BLE advertising
  • Stella wireless protocol for bidirectional communication with a basestation
  • Drivers:
    • ADC
    • UART
    • I2C
    • SPI controller
    • MAX20361 boost convert
    • AM1805 RTC
    • VM1010 microphone
    • SHTC3 T&H sensor

Code structure

  • /core: Voltix runtime and peripheral drivers
  • /drivers: Drivers for external devices
  • /examples: Examples using the SDK
  • /external: External dependencies
  • /arduino: Arduino core

License

Most of the code in this repository is published under an MIT License. The Arduino core in /arduino is licensed under the LGPL 2.1.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 89.2%
  • C++ 8.1%
  • Makefile 1.9%
  • Shell 0.8%