This repo contains a boilerplate that demonstrates how to do TDD and CI with the ESP32.
- Install ESP32 toolchain
- Install ESP-IDF 3.1
- Clone the repo (
git clone git@github.com:espressif/esp-idf.git
) - Checkout to version v3.1 (
git checkout v3.1
) - Update submodules (
git submodule update --init --recursive
)
- Clone the repo (
- Create a file called
Makefile.local
in the project root with the following content:
IDF_PATH := /absolute/path/to/your/esp-idf
- To compile the project run
make all
- To flash the target run
make flash
Note: instructions are for Linux. It should be compatible with other OS, but it has not been tested
- Setup the environment with
mkdir -p build/test
andcmake ..
- Run the tests with
make all test
. If a test fails, more details can be get by running./tdd
The most simple option relies on cppcheck. To perform the analysis run cppcheck --template=gcc --enable=style main/
.
To keep a common coding style, the files that have been modified shall be formatted before committing them using clang-format
. To use it follow these steps:
- Install
clang-format
- Run
clang-format -i -style=file [file.X]
Note. Many IDEs allow to do this automatically, check in the Preferences or in the avaiable Plugins.
There is also available a config file for EditorConfig. Make sure you install that in your IDE.
This repository is released under the MIT license. Please refer to the LICENSE file.