Setting up a machine¶
Install the toolchain on a development machine, or start a new project with the scripts already in place.
setup_repo.sh: a development machine¶
Run once per machine, from a project that contains the scripts, as a normal user with sudo:
After a confirmation prompt it installs, in order:
- System packages for Ubuntu, Fedora, CentOS or macOS (build tools, libraries).
- The Clang 20 tools (compiler,
clang-format,clang-tidy). yq.- Every ESP-IDF version in the project's
metadata.idf_versions(release/v5.5when there is noapp_config.yml) into~/esp/esp-idf-<version>. - The Python packages.
- Aliases in
~/.bashrc:get_idf,build_app,flash_app,list_apps.
It then checks the installation. Plan for about 2 GB per ESP-IDF version.
setup_basic.sh: a new project¶
Creates project_name/, runs git init, adds this repository as the scripts submodule, installs the ESP-IDF
version (v5.5 is read as release/v5.5), and writes main/main.cpp, the two CMakeLists.txt files that
follow the CMake contract, an app_config.yml with one app
(main_app), a sdkconfig.defaults that sets the HardFOC FreeRTOS tick of 1000 Hz
(why), a .gitignore and a README.md. Then:
setup_common.sh¶
The functions both scripts use (OS detection, package installation, ESP-IDF install and export, environment
setup). build_app.sh sources it to install a missing ESP-IDF version. It is not run directly.
Python packages¶
requirements.txt lists what the Python scripts and the CI need: pyyaml, esptool, pyserial,
esp-idf-kconfig, esp-idf-size.