From 11fe0256f17857e346968a4e9d8c0978f86ec9bb Mon Sep 17 00:00:00 2001 From: thomasabishop Date: Sun, 14 Dec 2025 17:13:13 +0000 Subject: [PATCH] Expressif SDK notes --- zk/Expressif_IoT_Development_Framework.md | 61 +++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 zk/Expressif_IoT_Development_Framework.md diff --git a/zk/Expressif_IoT_Development_Framework.md b/zk/Expressif_IoT_Development_Framework.md new file mode 100644 index 0000000..152e9d8 --- /dev/null +++ b/zk/Expressif_IoT_Development_Framework.md @@ -0,0 +1,61 @@ +--- +tags: + - micro-controllers + - C + - ESP32 +--- + +> The ESP-IDF is the SDK, provided by Expressif, for programming the ESP32 with +> C and C++. + +> Ensure you are a member of the `uucp` group so that you have serial access, +> using `usermod -a -G uucp $USER` + +## Installation + +```sh +yay -Sy esp-idf +``` + +## Pre-requisites: + +``` +To use ESP-IDF: + +1. Run /opt/esp-idf/install.sh to install ESP-IDF to ~/.espressif. + You only have to do this once after installing or upgrading + the esp-idf package. + +2. Run `source /opt/esp-idf/export.sh` to add idf.py and idf_tools.py + to your current PATH. You will have to do this in every terminal + where you want to use ESP-IDF. Alternatively, you can add + "source /opt/esp-idf/export.sh" to ~/.bashrc or the equivalent for + your shell to load ESP-IDF automatically in all terminals. +``` + +Must run + +```sh +. /opt/esp-idf/export.sh +``` + +In any terminal where you want to compile to the device. + +![](../img/esp-32-shell-confirmation.png) + +## Compilation process + +To demonstrate compilation, I have copied one of the demo projects provided: + +```sh + cp -r /opt/esp-idf/examples/get-started/hello_world . +``` + +To initialise the project, run: + +```sh +idf.py set-target esp32 +``` + +> Python is used as the client for automated processes/bootstrapping etc, even +> though the code that runs on the device is written in C.