From ada80a1e3367922f6e80d92a6b692a4de2e68382 Mon Sep 17 00:00:00 2001 From: "kirill.chalov" Date: Mon, 4 Aug 2025 07:11:56 -0300 Subject: [PATCH 1/2] chore: proofread basic esp-idf workshop --- content/workshops/esp-idf-basic/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/workshops/esp-idf-basic/_index.md b/content/workshops/esp-idf-basic/_index.md index 2d0328f0d..72433f768 100644 --- a/content/workshops/esp-idf-basic/_index.md +++ b/content/workshops/esp-idf-basic/_index.md @@ -128,7 +128,7 @@ Without further ado, let's start! You can find a link to each workshop part belo ## Conclusion -You just arrived at the end of this workshop, congratulation! We hope it was a fruitful experience and the start of a longer journey. Thank you for participating in Espressif's workshop! +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 participating in Espressif's 2025 Brazilian Summit workshop! You are now able to create, build and flash new projects, use external libraries and components, create your own components, and control everything via an HTTP interface. You have now the basic foundation for an IoT application. From a30f71e0ec11dddf71169a5f442dbfe4c4bbfcac Mon Sep 17 00:00:00 2001 From: "kirill.chalov" Date: Wed, 6 Aug 2025 06:21:41 -0300 Subject: [PATCH 2/2] chore: proofread advanced esp-idf workshop --- content/workshops/esp-idf-advanced/_index.md | 4 +- .../esp-idf-advanced/assignment-1-1/index.md | 4 +- .../esp-idf-advanced/assignment-1-2/index.md | 16 +++--- .../esp-idf-advanced/assignment-1-3/index.md | 17 +++--- .../esp-idf-advanced/assignment-2-1/index.md | 5 +- .../esp-idf-advanced/assignment-2-2/index.md | 8 +-- .../esp-idf-advanced/assignment-3-1/index.md | 13 +++-- .../esp-idf-advanced/assignment-3-2/index.md | 23 ++++---- .../esp-idf-advanced/assignment-3-3/index.md | 4 +- .../esp-idf-advanced/assignment-4-1/index.md | 8 +-- .../esp-idf-advanced/assignment-4-2/index.md | 2 +- .../esp-idf-advanced/assignment-4-3/index.md | 21 +++---- .../esp-idf-advanced/lecture-1/index.md | 56 +++++++++++-------- .../esp-idf-advanced/lecture-2/index.md | 2 +- .../esp-idf-advanced/lecture-3/index.md | 4 +- .../esp-idf-advanced/lecture-4/index.md | 4 +- 16 files changed, 104 insertions(+), 87 deletions(-) diff --git a/content/workshops/esp-idf-advanced/_index.md b/content/workshops/esp-idf-advanced/_index.md index ac7816aa5..209d3ef1f 100644 --- a/content/workshops/esp-idf-advanced/_index.md +++ b/content/workshops/esp-idf-advanced/_index.md @@ -20,7 +20,7 @@ Estimated time: 3 hours. ## Agenda -The workshop is structured into four parts. Here's the outline: +The workshop is divided into four parts. Here's the outline: * Part 1: **Components** @@ -134,4 +134,4 @@ Even if you complete all assignments successfully, you’ll still need to downlo ## Conclusion -You just arrived at the end of this workshop, congratulation! We hope it was a fruitful experience and the start of a longer journey. Thank you for following the advanced ESP-IDF workshop. +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. diff --git a/content/workshops/esp-idf-advanced/assignment-1-1/index.md b/content/workshops/esp-idf-advanced/assignment-1-1/index.md index c3fd2773f..ade9e82f5 100644 --- a/content/workshops/esp-idf-advanced/assignment-1-1/index.md +++ b/content/workshops/esp-idf-advanced/assignment-1-1/index.md @@ -13,8 +13,8 @@ summary: "Create the `alarm` component and refactor the code to use it. (Guided) You will: -1. Run the example to check everything is working -2. Create a the `alarm` component +1. Run the example (to make sure that everything is working) +2. Create an `alarm` component 2. Add the component configuration ### Run the example diff --git a/content/workshops/esp-idf-advanced/assignment-1-2/index.md b/content/workshops/esp-idf-advanced/assignment-1-2/index.md index fddb13d11..aa148afef 100644 --- a/content/workshops/esp-idf-advanced/assignment-1-2/index.md +++ b/content/workshops/esp-idf-advanced/assignment-1-2/index.md @@ -7,11 +7,11 @@ showAuthor: false summary: "Create a `cloud_manager` component and refactor the code to use it." --- -In this second part, you will separate the connection logic from the main function. The main advantage of this approach is that you could transparently change the connection type (e.g. to MQTTS or HTTP). +In this second part, we will separate the connection logic from the main function. The main advantage of this approach is that you could transparently change the connection type (e.g. to MQTTS or HTTP). -In this assignment, you will refactor the connection to Wi-Fi and MQTT code to fit into a new component. +In this assignment, we will refactor the connection to Wi-Fi and MQTT code to fit into a new component. -#### Assignment detail +#### Assignment details You should create a `cloud_manager` component with the following methods @@ -31,18 +31,18 @@ The following parameters should be set through `menuconfig`: ## Assignment steps outline 1. Create a new component and fill `cloud_manager.h` - * Add the suggested methods.
+ * Add the suggested methods
* Add an opaque declaration `typedef struct cloud_manager_t cloud_manager_t;`
_Note: In `cloud_manager.h` you need to import just `esp_err.h`_ -2. Fill `cloud_manager.c`
- * Implement `cloud_manager_t` as
+2. Fill `cloud_manager.c`
+ * Implement `cloud_manager_t` as:
```c struct cloud_manager_t { esp_mqtt_client_handle_t client; esp_mqtt_client_config_t mqtt_cfg; }; ``` - * In `cloud_manager_create` just return the initialized object + * In `cloud_manager_create` just return the initialized object. * In `cloud_manager_connect` initialize everything. You can use the function `example_connect`. 3. Add the following to the `cloud_manager` component `CMakeList.txt`
```bash @@ -240,4 +240,4 @@ endmenu You can find the whole solution project on the [assignment_1_2](https://github.com/FBEZ-docs-and-templates/devrel-advanced-workshop-code/tree/main/assignment_1_2) folder on the github repo. -> Next step: [assignment_1_3](../assignment-1-3/) +> Next step: [assignment 1.3](../assignment-1-3/) diff --git a/content/workshops/esp-idf-advanced/assignment-1-3/index.md b/content/workshops/esp-idf-advanced/assignment-1-3/index.md index 06460d70f..ba96b932c 100644 --- a/content/workshops/esp-idf-advanced/assignment-1-3/index.md +++ b/content/workshops/esp-idf-advanced/assignment-1-3/index.md @@ -4,15 +4,15 @@ date: "2025-08-05" series: ["WS00B"] series_order: 5 showAuthor: false -summary: "Support multiple configuration via sdkconfigs" +summary: "Support multiple configurations via sdkconfigs" --- -In this assignment you will create two versions of `sdkconfig` (production and debug). +In this assignment, you will create two versions of `sdkconfig` (production and debug). The only difference between the two is the logging: Debug will display all logs, while production has all the logs suppressed. ### Assignment Detail -You project must have the following configuration files +You project must have the following configuration files: 1. `sdkconfig.defaults`: containing the `esp32-c3` target 2. `sdkconfig.prod`: containing the logging suppression configuration (both app log and bootloader log) @@ -39,7 +39,8 @@ The final project folder tree is ## Assignment steps -You will +We will: + 1. Create the production sdkconfig version (guided) 2. Create a profile file (guided) 3. Create the debug sdkconfig version @@ -58,11 +59,11 @@ To create the debug configuration, we first need to find the log configuration. #### Create `sdkconfig.prod` file -The easiest way to find the configuration names we changed is to run the `save-defconfig` tool, which will generate a `sdkconfig.defaults` file with just all the changed parameter. +The easiest way to find the configuration names that we changed is to run the `save-defconfig` tool, which will generate a `sdkconfig.defaults` file with only the changed parameters. * `ESP-IDF: Save Default Config File (save-defconfig)` -Looking at the new `sdkconfig.defaults` you see two new configurations appearing +Looking at the new `sdkconfig.defaults`, we can see two new configurations: ```bash CONFIG_LOG_DEFAULT_LEVEL_NONE=y @@ -98,7 +99,7 @@ To simplify the process we will create a _profile_ file. -B build-production -DSDKCONFIG=build-production/sdkconfig -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.prod" ``` -You can now build the production version using +We can now build the production version using ```bash idf.py @profiles/prod build @@ -140,6 +141,6 @@ CONFIG_LOG_DEFAULT_LEVEL_INFO=y -You can find the whole solution project on the [assignment_1_3](https://github.com/FBEZ-docs-and-templates/devrel-advanced-workshop-code/tree/main/assignment_1_3) folder on the github repo. +You can find the whole solution project in the [assignment_1_3](https://github.com/FBEZ-docs-and-templates/devrel-advanced-workshop-code/tree/main/assignment_1_3) folder in the GitHub repo. > Next step: [Lecture 2](../lecture-2/) diff --git a/content/workshops/esp-idf-advanced/assignment-2-1/index.md b/content/workshops/esp-idf-advanced/assignment-2-1/index.md index 0d86c015f..649956a6d 100644 --- a/content/workshops/esp-idf-advanced/assignment-2-1/index.md +++ b/content/workshops/esp-idf-advanced/assignment-2-1/index.md @@ -11,7 +11,8 @@ In this assigment, we will decouple the alarm and temperature code by using the ## Assignment steps -You will: +We will: + 1. Create the events
* `TEMP_EVENT_BASE` with `temp_event_id` * `ALARM_EVENT_BASE` with `alarm_event_id_t` @@ -249,7 +250,7 @@ void app_main(void) -You can find the whole solution project on the [assignment_2_1](https://github.com/FBEZ-docs-and-templates/devrel-advanced-workshop-code/tree/main/assignment_2_1) folder on the github repo. +You can find the whole solution project in the [assignment_2_1](https://github.com/FBEZ-docs-and-templates/devrel-advanced-workshop-code/tree/main/assignment_2_1) folder in the GitHub repo. ## Conclusion diff --git a/content/workshops/esp-idf-advanced/assignment-2-2/index.md b/content/workshops/esp-idf-advanced/assignment-2-2/index.md index 4ad1a4861..dd3dfced7 100644 --- a/content/workshops/esp-idf-advanced/assignment-2-2/index.md +++ b/content/workshops/esp-idf-advanced/assignment-2-2/index.md @@ -12,12 +12,12 @@ In this assignment you'll extend the functionality from Assignment 2.1 by introd ### Assignment detail * The code for detecting a GPIO press is provided below. -* You need to integrate the logic into the existing event loop -* Use the same `ALARM_EVENT_BASE` as the alarm trigger as before -* Create a `ALARM_EVENT_BUTTON` to differenciate it from the `ALARM_EVENT_CHECK` +* You need to integrate the logic into the existing event loop. +* Use the same `ALARM_EVENT_BASE` as the alarm trigger used before. +* Create a `ALARM_EVENT_BUTTON` to differenciate it from the `ALARM_EVENT_CHECK`. {{< alert icon="lightbulb" iconColor="#179299" cardColor="#9cccce">}} -An alternative version for `esp_event_post` called `esp_event_isr_post` exists. +There is an alternative version for `esp_event_post` called `esp_event_isr_post`. {{< /alert >}} ### Reading GPIO code diff --git a/content/workshops/esp-idf-advanced/assignment-3-1/index.md b/content/workshops/esp-idf-advanced/assignment-3-1/index.md index d78039660..86042b22d 100644 --- a/content/workshops/esp-idf-advanced/assignment-3-1/index.md +++ b/content/workshops/esp-idf-advanced/assignment-3-1/index.md @@ -4,17 +4,18 @@ date: "2025-08-05" series: ["WS00B"] series_order: 10 showAuthor: false -summary: "Reduce binary size by working on configuration" +summary: "Reduce binary size by working on configuration." --- In this assignment, you will analyze the binary image size and optimize the memory footprint of your application. ## Assignment steps -You will: +We will: + 1. Build the original project to spot any oversized or suspicious sections (e.g., .text, .data, .rodata) that may hide unoptimized code. -2. Change configuration to reduce it -3. Rebuild the project to check the improvement +2. Change configuration to reduce it. +3. Rebuild the project to check the improvement. ### Build the original project @@ -83,6 +84,6 @@ We gained another 6.7kb. ## Conclusion -In this assignment we saw how to check the size of our binary and how to use the menuconfig to removed unused option to improve the memory footprint of our application. +In this assignment, we saw how to check the size of our binary and how to use the menuconfig to removed unused options to improve the memory footprint of our application. -> Next step: [assignment_3_2](../assignment-3-2/) +> Next step: [assignment 3.2](../assignment-3-2/) diff --git a/content/workshops/esp-idf-advanced/assignment-3-2/index.md b/content/workshops/esp-idf-advanced/assignment-3-2/index.md index e0894d13d..71c882ce2 100644 --- a/content/workshops/esp-idf-advanced/assignment-3-2/index.md +++ b/content/workshops/esp-idf-advanced/assignment-3-2/index.md @@ -13,11 +13,12 @@ For this assignment, you need to get the [assignment_3_2_base](https://github.co ## Assignment steps -You will +We will: + 1. Enable the core dump in the menuconfig 2. Build and run the application 3. Analyze the core dump -4. Fix the bugs in the project. +4. Fix the bugs in the project 5. Build and run the application again @@ -230,9 +231,10 @@ The core dump starts with: Crashed task handle: 0x3fc9ff18, name: 'sys_evt' Crashed task is not in the interrupt context ``` -From which, we can conclude that the crash -1. Happened in the FreeRTOS task called **`sys_evt`**. -2. Did **not** happen during an interrupt, so it's a normal task context crash. +From which, we can conclude the following: + +1. The crash happened in the FreeRTOS task called **`sys_evt`**. +2. The crash did **not** happen during an interrupt, so it's a normal task context crash. #### Look at the program counter (PC) and stack trace @@ -244,7 +246,8 @@ ra 0x4200d822 0x4200d822 sp 0x3fc9fe50 ``` -Which mean +It means that: + 1. The program counter (PC) is at address `0x4200d840`, inside the function `is_alarm_set`, specifically at offset +50 bytes. 2. The return address (`ra`) is also inside `is_alarm_set`, which means the crash happened __inside that function__. @@ -327,17 +330,17 @@ Rebuild and run the application Another crash! -If you still have time, try to solve it by moving to [assignment 3-3](../assignment-3-2/). +If you still have time, try to solve it by moving to [assignment 3.3](../assignment-3-3/). -If you don't, don't worry: all the next assignments will be based on the [assignment 2-1](../assignment-2-1/) code. +If you don't, don't worry: all the following assignments will be based on the [assignment 2.1](../assignment-2-1/) code. ## Conclusion -In this assignment you learnt how to create a core dump and how to analyze it to understand the reason of a core crash. +In this assignment, we learnt how to create a core dump and how to analyze it to understand the reason of a core crash. Core dump analysis is a very strong tool to debug your application. -If you still have time, try [assignment_3_3](../assignment-3-3/) +If you still have time, try [assignment 3.3](../assignment-3-3/) Otherwise > Next step: [Lecture 4](../lecture-4/) diff --git a/content/workshops/esp-idf-advanced/assignment-3-3/index.md b/content/workshops/esp-idf-advanced/assignment-3-3/index.md index 966220a5f..66d9200ec 100644 --- a/content/workshops/esp-idf-advanced/assignment-3-3/index.md +++ b/content/workshops/esp-idf-advanced/assignment-3-3/index.md @@ -1,5 +1,5 @@ --- -title: "ESP-IDF Adv. - Assign. 3.2" +title: "ESP-IDF Adv. - Assign. 3.3" date: "2025-08-05" series: ["WS00B"] series_order: 12 @@ -19,7 +19,7 @@ Create the core dump file as you did in the previous assignment.
-Expand second core dump +Expand the second core dump ```bash Executing action: coredump-info diff --git a/content/workshops/esp-idf-advanced/assignment-4-1/index.md b/content/workshops/esp-idf-advanced/assignment-4-1/index.md index e561f3a4c..eb4772cb0 100644 --- a/content/workshops/esp-idf-advanced/assignment-4-1/index.md +++ b/content/workshops/esp-idf-advanced/assignment-4-1/index.md @@ -11,7 +11,7 @@ To perform OTA, we need a partition table with at least two partitions. ## Assignment steps -In this first assignment, you will +In this first assignment, we will: 1. Check the current partition table loaded in your module 2. Change it to a different default partition table @@ -22,10 +22,10 @@ In this first assignment, you will To check the current partition table you need to 1. Read the flash and dump the partition table in a `.bin` file -2. Convert the `.bin` file to a readable format. +2. Convert the `.bin` file to a readable format #### Read the flash -To read the flash we can use `esptool.py` +To read the flash we can use `esptool.py`: ```bash esptool.py -p read_flash 0x8000 0x1000 partition_table.bin @@ -98,4 +98,4 @@ Both of these partition table scheme are provided as default values from ESP-IDF In the [next assignment](../assignment-4-2) you will create a custom partition table. -> Next step: [assignment_4_2](../assignment-4-2/) +> Next step: [assignment 4.2](../assignment-4-2/) diff --git a/content/workshops/esp-idf-advanced/assignment-4-2/index.md b/content/workshops/esp-idf-advanced/assignment-4-2/index.md index 2b49a4603..5d271d9f7 100644 --- a/content/workshops/esp-idf-advanced/assignment-4-2/index.md +++ b/content/workshops/esp-idf-advanced/assignment-4-2/index.md @@ -47,4 +47,4 @@ fs,data,spiffs,0x310000,64K, ``` -> Next step: [assignment_4_3](../assignment-4-3) +> Next step: [assignment 4.3](../assignment-4-3) diff --git a/content/workshops/esp-idf-advanced/assignment-4-3/index.md b/content/workshops/esp-idf-advanced/assignment-4-3/index.md index 16d44e199..dc18b02d3 100644 --- a/content/workshops/esp-idf-advanced/assignment-4-3/index.md +++ b/content/workshops/esp-idf-advanced/assignment-4-3/index.md @@ -6,7 +6,7 @@ series_order: 16 showAuthor: false --- -In this assignment we will enable the flash encryption. +In this assignment, we will enable flash encryption. {{< alert iconColor="#df8e1d" cardColor="#edcea3">}} Enabling flash encryption (and secure bootloader) is an irreversible operation. Double check before doing any step. @@ -15,7 +15,7 @@ Enabling flash encryption (and secure bootloader) is an irreversible operation. ## Assignment steps -In this assignment you will +In this assignment, we will: 1. Check your device encryption status 2. Enable flash encryption (development mode) @@ -27,7 +27,7 @@ In this assignment you will * Open an ESP-IDF terminal : `> ESP-IDF: Open ESP-IDF Terminal` * Inside the terminal, run `idf.py efuse-summary` -Now check the relevant EFUSES listed in the table below. They must all be at their default zero state. +Now check the relevant eFuses listed in the table below. They must all be at their default zero state. | **eFuse** | **Description** | |-----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------| @@ -38,7 +38,7 @@ Now check the relevant EFUSES listed in the table below. They must all be at the
-Show the e-fuse blocks +Show the eFuse blocks ```bash EFUSE_NAME (Block) Description = [Meaningful Value] [Readable/Writeable] (Hex Value) @@ -776,7 +776,7 @@ You need to do the last two steps.
-Show efuses summary +Show eFuses summary ```bash espefuse.py v4.9.0 @@ -962,15 +962,16 @@ BLOCK_KEY0 (BLOCK4) DIS_USB_JTAG (BLOCK0) Set this bit to disable function of usb switch to = True R/W (0b1) ``` -We can see that -* The flash encryption is set (`SPI_BOOT_CRYPT_CNT`) -* One of the e-fuse blocks has been reserved to store the encryption key. +We can see that: -Now you're device has flash encryption. Since we selected the development, you can still reflash it using the serial port. +* The flash encryption is set (`SPI_BOOT_CRYPT_CNT`). +* One of the eFuse blocks has been reserved to store the encryption key. + +Now your device has flash encryption. Since we selected the development, you can still reflash it using the serial port. ## Conclusion -In this assignment you added flash encryption to your project, by enabling the appropriate options in the menuconfig and by accomodating the partition table offset as required. +In this assignment, we added flash encryption to the project by enabling the appropriate options in the menuconfig and by accommodating the partition table offset as required. > Next step: [Conclusion](../#conclusion) diff --git a/content/workshops/esp-idf-advanced/lecture-1/index.md b/content/workshops/esp-idf-advanced/lecture-1/index.md index a030c41a9..4f9d2d4e2 100644 --- a/content/workshops/esp-idf-advanced/lecture-1/index.md +++ b/content/workshops/esp-idf-advanced/lecture-1/index.md @@ -9,8 +9,7 @@ summary: "In this lecture, we explore the ESP-IDF build system, built on CMake a ## Introduction -In this lecture we will explore ESP-IDF build system. - +In this lecture, we will explore ESP-IDF build system. The ESP-IDF build system is built on top of __CMake__ and __Ninja__, two powerful tools that make project configuration and compilation fast and efficient. CMake is responsible for setting up your project and generating the necessary build files, while Ninja handles the actual building process with speed and minimal overhead. @@ -20,39 +19,46 @@ In this workshop we will use the VSCode plugin. ## Modular development -To streamline the development of layered code, the ESP-IDF offers a components system, paired with a powerful component manager. +To streamline the development of layered code, ESP-IDF offers a components system, paired with a powerful component manager. ### ESP-IDF Components -In ESP-IDF, projects are organized into __components__, self-contained, modular blocks of code that provide specific functionality such as drivers, libraries, protocols, utilities, or application logic. This structure simplifies code reuse, organization, and maintenance across complex applications. +In ESP-IDF, projects are organized into __components__ --- self-contained, modular blocks of code that provide specific functionality such as drivers, libraries, protocols, utilities, or application logic. This structure simplifies code reuse, organization, and maintenance across complex applications. For example, interfacing with a sensor can be handled by a dedicated component that encapsulates all communication and data processing logic, eliminating the need to rewrite code in every project. The ESP-IDF framework itself is kept separate from your project and is referenced using the `IDF_PATH` environment variable. To build and flash your code, you’ll need the appropriate toolchain installed and accessible via your system’s `PATH`. -A typical component includes source code, header files, a `CMakeLists.txt` file for build configuration, and an `idf_component.yml` file that describes dependencies and version information. This structure allows components to be easily integrated and managed within ESP-IDF projects, supporting modular development and code sharing [Component Management and Usage](https://docs.espressif.com/projects/esp-techpedia/en/latest/esp-friends/advanced-development/component-management.html). +A typical component includes: + +- Source code +- Header files +- `CMakeLists.txt` file for build configuration +- `idf_component.yml` file that describes dependencies and version information + +This structure allows components to be easily integrated and managed within ESP-IDF projects, supporting modular development and code sharing [Component Management and Usage](https://docs.espressif.com/projects/esp-techpedia/en/latest/esp-friends/advanced-development/component-management.html). ### Component manager The __IDF Component Manager__ is a tool designed to simplify the management of components in ESP-IDF projects. It allows developers to: -- Add components as dependencies to their projects. +- Add components as dependencies to projects. - Automatically download and update components from the [ESP Component Registry](https://components.espressif.com) or from git repositories. - Manage component versions and dependencies reliably. When you build your project, the Component Manager fetches all required components and places them in a `managed_components` folder, ensuring your project has everything it needs to compile and run. This streamlines the process of extending project functionality and encourages code reuse within the Espressif developer community. -### Board Support Packages BSP in ESP-IDF +### Board Support Packages (BSP) in ESP-IDF One kind of ESP-IDF component is the __Board Support Package (BSP)__, a versioned component that encapsulates hardware initialization for a specific development board. BSPs provide pre-configured drivers and a consistent API for accessing onboard peripherals such as LEDs, buttons, displays, touch panels, audio codecs, and SD cards. Like any ESP-IDF component, a BSP can be integrated into a project via the component manager using `idf_component.yml`. On a basic board like the ESP32-C6-DevKit, the BSP abstracts setup for components like the onboard button and addressable LED. On more complex platforms (e.g., ESP32-S3-BOX-3), it includes initialization for multiple peripherals such as displays and audio devices—packaged as a single, reusable component. -The main reason for using a BSP are: +The main reasons for using a BSP are: -* Peripheral Initialization: BSPs handle low-level setup (GPIOs, I2C, SPI, etc.) for supported hardware. -* Reusable Abstraction: They expose a common API, enabling code reuse across different projects or board variants. -* Faster Bring-up: With peripherals already configured, application logic can be developed and tested more quickly. +* **Peripheral initialization**: BSPs handle low-level setup (GPIOs, I2C, SPI, etc.) for supported hardware. +* **Reusable abstraction**: They expose a common API, enabling code reuse across different projects or board variants. +* **Faster bring-up**: With peripherals already configured, application logic can be developed and tested faster and more efficiently. #### Custom and Generic BSPs @@ -62,7 +68,7 @@ For unsupported or custom boards, developers can use generic BSPs (e.g., `esp_bs Let's see how to create a component `led_toggle` starting from the `hello_world` example. -After you craete a project from the example `hello_world`, your project folder will be as follows: +After you create a project from the example `hello_world`, your project folder will be as follows: ```bash . @@ -77,7 +83,7 @@ After you craete a project from the example `hello_world`, your project folder w └── sdkconfig.old ``` -To create a component, press F1 to enter the Command palett and type: +To create a component, press F1 to enter the Command palette and type: * `> ESP-IDF: Create a new ESP-IDF Component`
→ `led_toggle` @@ -87,7 +93,7 @@ Now the folder tree changed to ```bash . ├── CMakeLists.txt -├── components +├── components # <--- new folder │   └── led_toggle │   ├── CMakeLists.txt │   ├── include @@ -103,8 +109,10 @@ Now the folder tree changed to └── sdkconfig.old ``` -As you can see, a new components folder has been created and inside of it you can find the `led_toggle` component folder. -Component folders have: +As you can see, a new `components` folder has been created and inside of it you can find the `led_toggle` component folder. + +A component folder contains: + 1. `CMakeLists.txt`: configuration used by the build system 2. `include` folder: which contains the headers (automatically passed to the linker) 3. `.c` file: the actual component code @@ -112,10 +120,12 @@ Component folders have: {{< alert iconColor="#df8e1d" cardColor="#edcea3">}} -You need to perform a full clean to see newly added components. In VSCode `> ESP-IDF: Full Clean Project`. +You need to perform a full clean to see newly added components. In VSCode, run:
+`> ESP-IDF: Full Clean Project`. {{< /alert >}} -So let's suppose you have the following component header file. +Let's assume you have the following component header file: + ```c // led_toggle.h #include "driver/gpio.h" @@ -130,7 +140,7 @@ esp_err_t drive_led(led_gpio_t * led_gpio); esp_err_t toggle_led(led_gpio_t * led_gpio); ``` -__After a full clean__, you can simply include it in your main file and call its functions. +__After a full clean__, you can simply include it in your main file and call its functions: ```c #include "led_toggle.h" @@ -179,10 +189,10 @@ To assist with this, the official documentation provides a helpful [Performance ### Using Multiple Default Files and Target-Specific Defaults -ESP-IDF supports multiple defaults files (skconfig.xxx), which can be specified via the `SDKCONFIG_DEFAULTS` environment variable or within your project's `CMakeLists.txt`. These files are listed using semicolons as separators and are applied in order. Later files override earlier ones if there are overlapping configuration keys. This layered approach allows you to: +ESP-IDF supports multiple defaults files (`skconfig.xxx`), which can be specified via the `SDKCONFIG_DEFAULTS` environment variable or within your project's `CMakeLists.txt`. These files are listed using semicolons as separators and are applied in order. If there are overlapping configuration keys, the values in earlier files are overridden by those in the following ones. This layered approach allows you to: * Maintain shared settings in one file -* Override them with environment- or product-specific defaults in others +* Override them with environment-specific or product-specific defaults in others You can also define _target-specific defaults_ using files named `sdkconfig.defaults.`, such as `sdkconfig.defaults.esp32s3`. These are only considered if a generic `sdkconfig.defaults` file exists (even if it’s empty). This mechanism supports fine-grained control over configurations for different Espressif chip variants within the same project. @@ -207,7 +217,7 @@ For more details, see the [ESP-IDF multi-config example](https://github.com/espr {{< alert icon="circle-info" cardColor="#b3e0f2" iconColor="#04a5e5">}} -The VSCode ESP-IDF extension lets you define multiple configurations via JSON file. It's planned to unify this approach with the CLI one in the next future. You can check the detail [on the documentation](https://docs.espressif.com/projects/vscode-esp-idf-extension/en/latest/additionalfeatures/multiple-projects.html#use-multiple-build-configurations-in-the-same-workspace-folder). +The VSCode ESP-IDF extension lets you define multiple configurations via JSON file. It's planned to unify this approach with the CLI one in the near future. You can check the detail [in the documentation](https://docs.espressif.com/projects/vscode-esp-idf-extension/en/latest/additionalfeatures/multiple-projects.html#use-multiple-build-configurations-in-the-same-workspace-folder). {{< /alert >}} ### Practical Example: Isolating Development and Production Builds @@ -227,7 +237,7 @@ This creates an isolated build directory (`build_prod1`) and applies the specifi By effectively leveraging `sdkconfig.defaults`, multiple defaults files, and profile-based builds, ESP-IDF projects can achieve greater configurability, repeatability, and clarity across various development scenarios. -We will explore this topic in more depth in the [assignment_1_3](../assignment-1-3/). +We will explore this topic more in-depth in the [assignment 1.3](../assignment-1-3/). ## Conclusion diff --git a/content/workshops/esp-idf-advanced/lecture-2/index.md b/content/workshops/esp-idf-advanced/lecture-2/index.md index 9febe01ce..28962675e 100644 --- a/content/workshops/esp-idf-advanced/lecture-2/index.md +++ b/content/workshops/esp-idf-advanced/lecture-2/index.md @@ -139,7 +139,7 @@ esp_event_post_to(user_loop, MY_EVENT_BASE, MY_EVENT_ID, &event_data, sizeof(eve The event loop mechanism in Espressif's ESP-IDF framework offers a powerful way to handle asynchronous events cleanly and efficiently. Used by default for system-level notifications like Wi-Fi connectivity, the event loop can also be extended for custom application needs through user-defined loops. By facilitating decoupled, ordered, and modular event processing, this architecture helps developers build more maintainable and scalable embedded systems—especially in complex IoT applications. -> Next step: [assignment_2_1](../assignment-2-1/) +> Next step: [assignment 2.1](../assignment-2-1/) ## Further reading diff --git a/content/workshops/esp-idf-advanced/lecture-3/index.md b/content/workshops/esp-idf-advanced/lecture-3/index.md index 69e9e8be8..4c073da46 100644 --- a/content/workshops/esp-idf-advanced/lecture-3/index.md +++ b/content/workshops/esp-idf-advanced/lecture-3/index.md @@ -10,7 +10,7 @@ summary: "In this article, we cover two key tools for embedded development on Es ## Introduction -In this article, we’ll focus on two useful tools: +We’ll focus on two useful tools: * __Size Analysis__: Understand and manage your application’s memory footprint. * __Core Dump__: Capture the system state after a crash for detailed post-mortem debugging. @@ -85,7 +85,7 @@ Mastering __size analysis__ and __core dumps__ is extremely useful for embedded By integrating these tools into your development workflow, you'll be better prepared to build robust, high-performance applications. -> Next step: [assignment_3_1](../assignment-3-1/) +> Next step: [assignment 3.1](../assignment-3-1/) ## Further Reading diff --git a/content/workshops/esp-idf-advanced/lecture-4/index.md b/content/workshops/esp-idf-advanced/lecture-4/index.md index b2a18908f..f132cda93 100644 --- a/content/workshops/esp-idf-advanced/lecture-4/index.md +++ b/content/workshops/esp-idf-advanced/lecture-4/index.md @@ -4,7 +4,7 @@ date: "2025-08-05" series: ["WS00B"] series_order: 13 showAuthor: false -summary: "In this article, we explore the advanced features required for security: OTA update, flash encryption and secure bootloader" +summary: "In this article, we explore the advanced features required for security: OTA update, flash encryption, and secure bootloader" --- ## Introduction @@ -261,4 +261,4 @@ Once secure boot is enabled, the bootloader cannot be reflashed (unless using a In this article, we explored three foundational pillars of modern IoT security: OTA updates, flash encryption, and secure bootloaders. Together, these features ensure that devices can be updated securely, protect sensitive data at rest, and verify firmware integrity from the moment they power on. As IoT security requirements continue to evolve, mastering these tools is essential for building resilient and regulation-compliant embedded systems. In the next assignments, you will test these features first-hand. -> Next step: [assignment_4_1](../assignment-4-1/) +> Next step: [assignment 4.1](../assignment-4-1/)