Skip to content

summivox/esp32-cpp-boilerplate

Repository files navigation

summivox's Opinionated ESP32 C++ Boilerplate

This repo provides a clean yet convenient starting point for an ESP32 firmware project using C++20 with ESP-IDF.

A set of minimal examples are included to guide code organization, both for user code and for dependencies, as well as showcasing some C++ tricks that simplify firmware writing. These can be removed easily to make room for your code.

Usage

When you are ready to write your own code:

  • Rename the project in the root CMakeLists.txt .
  • Remove the example module. Places you need to touch (note that the reverse is how you add new source/header pairs):
  • Remove unused components (you may need to properly remove git submodules using git submodule deinit and git rm).
  • Choose your own licensing terms and replace the LICENSE file.
  • Replace this README.md file with your own ;)

Features

  • C++20 support (up to the GCC version supported by ESP-IDF).
  • Examples for external libraries / dependencies (see components).
  • Convenient utilities to reduce boilerplate (e.g. FreeRTOS task wrapper).

Contribution

This repo adopts the Google C++ Style Guide. Formatting should be enforced by clang-format; its config file .clang-format is included.

Issues, pull requests, forking are all welcome.

License

Everything in this repo is public domain / CC0, unless specified in a nested LICENSE file (e.g. in components). See LICENSE. You may replace this license file with your own.

About

summivox's Opinionated ESP32 C++ Template

Topics

Resources

License

Stars

Watchers

Forks