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.
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- Install
makefrom your distribution's repository (apt install build-essentialon Ubuntu). - Install the GNU Arm Embedded Toolchain from your distribution's repository (
apt install gcc-arm-none-eabion 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- Install
makevia Cygwin following the instructions here. - Add the path to
make(e.g.C:\cygwin64\binfor Cygwin) to yourPathvariable (Instructions). - Install the
GNU Arm Embedded Toolchainfrom the official website. - For uploading firmware to your Voltix device install the voltix-probe Python package globally with
pipx install voltix-probeTake 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 SDKSRC_FILES: Your C/C++ source filesINC_DIRS: Paths to your header filesOUTPUT_DIR: Path where project is builtGNU_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 herelateinit(): 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.
- 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
/core: Voltix runtime and peripheral drivers/drivers: Drivers for external devices/examples: Examples using the SDK/external: External dependencies/arduino: Arduino core
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.