Spinner is a motor control firmware based on the Field Oriented Control (FOC) principles. The firmware is built on top of the Zephyr RTOS, a modern multi-platform RTOS. Spinner is still a proof of concept, so do not expect production grade stability or features.
Before getting started, make sure you have a proper Zephyr development environment. You can follow the official Zephyr Getting Started Guide.
The first step is to initialize the spinner
workspace folder where the
source and all Zephyr modules will be cloned. You can do that by running:
# initialize spinner workspace
west init -m https://github.com/teslabs/spinner --mr main spinner
# update modules
cd spinner
west update
The application can be built by running:
west build -b $BOARD spinner [-- -DSHIELD=$SHIELD]
where $BOARD
is the target board (see boards
) and $SHIELD
an optional
shield (see boards/shields
). Some other build configurations are also provided:
debug.conf
: Enable debug-friendly buildshell.conf
: Enable shell facilities
They can be enabled by setting OVERLAY_CONFIG
, e.g.
west build -b $BOARD spinner -- -DOVERLAY_CONFIG=debug.conf
Once you have built the application you can flash it by running:
west flash
The documentation is based on Sphinx. Doxygen is used to extract the API docstrings, but its HTML output can also be used if preferred. A simple CMake script is provided in order to facilitate the documentation build process. In order to configure CMake you need to run:
cmake -Sdocs -Bbuild_docs
In order to build the Doxygen documentation you need to run:
cmake --build build_docs -t doxygen
Note that Doxygen output is required by Sphinx, so every time you change your
API docstrings, remember to run the doxygen
target. In order to build the
Sphinx HTML documentation you need to run:
cmake --build build_docs -t html