
ESP-IDF Workshop: Advanced
Table of Contents
Welcome to the advanced ESP-IDF workshop!
Introduction#
In this workshop, we’ll explore some of the more advanced aspects of the ESP-IDF framework, including modular development using components, the event loop, core dumps, and security features.
Agenda#
The workshop is divided into four parts.
Part 1: Components
- Lesson 1 – What a component is, how to create one, and how to support multiple hardware versions through BSPs and multiple configurations
- Assignment 1.1 – Refactor the code by creating the
alarmcomponent (Guided) - Assignment 1.2 – Refactor the code by creating the
cloud_managercomponent - Assignment 1.3 – Manage multiple configurations using
sdkconfig(Guided)
Part 2: Event Loop
- Lesson 2 – Basic information about event loops in ESP-IDF, using timer events, and separating responsibilities
- Assignment 2.1 – Refactor the code to use the event loop (Guided)
- Assignment 2.2 – Add a GPIO event to the event loop
Part 3: Performance and Crash Analysis
- Lesson 3 – Size analysis and using core dumps for debugging
- Assignment 3.1 – Analyze the application size and suggest optimizations (Guided)
- Assignment 3.2 – Analyze a crash using core dumps (Guided)
- Assignment 3.3 – Analyze a crash using core dumps (Optional)
Part 4: OTA and Security Features
- Lesson 4 – Fundamentals of OTA, partition table configuration, secure bootloader, and flash encryption
- Assignment 4.1 – Modify the partition table to support OTA (Guided)
- Assignment 4.2 – Use a custom partition table (Guided)
- Assignment 4.3 – Enable flash encryption (Guided)
Prerequisites#
To follow this workshop, make sure you meet the prerequisites listed below.
Required Software#
- VS Code installed on your computer
- ESP-IDF extension for VS Code added to VS Code
- ESP-IDF installed on your machine
It can be installed via VS Code or by using the ESP-IDF Installation Manager
Required Hardware#
- ESP-C3-DevKit-RUST-1 or ESP-C3-DevKit-RUST-2 board (if the activity is in person, the board will be provided during the workshop)
It is also possible to use an ESP32-C3-DevKit-M/C board, but you will need to adjust the GPIO configuration accordingly.
Basic Knowledge#
- Good understanding of:
- C programming and the linker
- Callback functions and function pointers
- MQTT protocol and its use
- Embedded programming
- Flashing / Programming, linking
- Familiarity with MCU peripherals such as GPIO and I2C
- Basic experience with ESP-IDF
- Tool installation (VS Code + ESP-IDF extension)
Next Step#
If you are unable to complete an exercise during the session, you can continue by downloading the appropriate solution according to the following structure:
assignment_1_1_base and assignment_3_2_base: The first assignment is based on the code in assignment_1_1_baseYour next step is Lesson 1.
Conclusion#
Congratulations! You have reached the end of this workshop. We hope it has been a valuable experience and the start of a longer learning journey. Thank you for participating in the advanced ESP-IDF workshop.
