ESP-IDF Advanced Workshop
Table of Contents
Welcome to Espressif’s Advanced ESP-IDF Workshop!
Introduction#
In this hands-on workshop, you’ll develop a solid understanding of the ESP-IDF framework, included modular development via components, event loops, core dumps, and security features.
Agenda#
The workshop is divided into four parts. Here’s the outline:
Part 1: Components
- Lecture 1 – What is a component, how to create it, and how to support multiple hardware versions via BSPs and multi-config
- Assignment 1.1 – Refactor the code creating the alarm component
- Assignment 1.2 – Refactor the code creating the
cloud_manager
component - Assignment 1.3 – Multiple configuration using
sdkconfig
Part 2: Event Loops
- Lecture 2 – Event loop basics in ESP-IDF, using timer events, and separation of concerns
- Assignment 2.1 – Refactor the code to use the event loop mechanism
- Assignment 2.2 – Add a gpio event to the event loop
Break (15 minutes)
Part 3: Performance and crash analysis
- Lecture 3 – Application size analysis and core dumps
- Assignment 3.1 – Analyze application size and suggest optimizations
- 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
- Lecture 4 – OTA fundamentals, partition table configuration, secure bootloader, flash encryption
- Assignment 4.1 – Modify the partition table to support OTA
- Assignment 4.2 – Use a custom partition table
- Assignment 4.3 – Enable flash encryption
Prerequisites#
To follow this workshop, make sure you meet the prerequisites listed below.
Good knowledge of:
- C programming and its linker
- Call back functions and function pointers
- MQTT protocol and usage
Embedded programming
- Flashing / Programming, linking
- Familiarity with MCU peripherals such as GPIO and I2C
- Basic experience with ESP-IDF
Tools installation (VSCode + ESP-IDF extension)
We strongly recommend installing VSCode and the ESP-IDF plugin before the workshop begins. If you run into any issues, there will be some time during the first assignment to complete the installation.
Reference Table#
Prerequisite | Description | Reference |
---|---|---|
MCU memory types | Difference between Flash, RAM and EEPROM | L. Harvie (Medium) |
PSRAM | What is PSRAM | M. Hawthorne (Technipages) |
MCU serial peripherals | Difference between SPI, I2C, UART | nextpcb.com |
ESP-IDF VSCode Plugin | Espressif official VSCode Extension | vscode-esp-idf-extension installation |
Partition table | What is partition table and why it’s useful | Wikipedia disk partitioning article |
Workshop#
Without further delay, let’s get started! You’ll find links to each part of the workshop below.
The first lecture builds on the code in assignment_1_1_base
.
If you’re unable to complete a particular assignment, please download its prerequisite as shown in the diagram below.
assignment_1_1_base
and assignment_3_2_base
.Your next step is Lecture 1.
- Part 1
- Part 2
- Part 3
- Part 4
Conclusion#
Congratulations! You just arrived at the end of this workshop. We hope it was a fruitful experience and the start of a longer journey. Thank you for following the advanced ESP-IDF workshop.
cloud_manager
component and refactor the code to use it.alarm
component and refactor the code to use it. (Guided)