-
Notifications
You must be signed in to change notification settings - Fork 45
article: MCUboot Getting Start Guide for ESP32 #618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
fe53127 to
246809d
Compare
FBEZ
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @almir-okato for this article!
I’ve left a few comments for you to review. I also noticed that MCUBoot is in bold every time. I suggest keeping it plain or using a monospaced/verbatim style if needed.
content/blog/2025/12/mcuboot-getting-started/assets/mcuboot-process-overview1.webp
Outdated
Show resolved
Hide resolved
60c251f to
58884b5
Compare
Thanks @FBEZ Regarding the bold style for MCUboot and some other names, I've tried to keep the directions suggested on the review of my previous article in the Developer Portal. |
FBEZ
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@almir-okato thank you@ I’ve just added a final comment regarding the annotation block.
I still see MCUBoot in bold throughout. Would you like to keep it that way? I find it a bit eye straining.
Article translated and updated from my original from Embarcados portal. Signed-off-by: Almir Okato <[email protected]>
58884b5 to
f1b3cc5
Compare
|
🎉 A preview for this PR is available at: https://preview-developer.espressif.com/pr618/ |
I think you are right, I reduced the amount of names in bold, tried to keep only for first occurrences or some highlight notes. Thanks! |
@almir-okato Francesco is right about the formatting of MCUboot and other software names. To be honest, I am not sure why we ended up with all terms in bold in your previous article. I checked all my comments and only found this edit related: #363 (comment) However, I only proposed to make these words bold, because these are the summary words in bullet points, not because all software titles should be in bold. Sorry if I didn't make it clear! |
f-hollow
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@almir-okato Thank you for contributing this article!
I pointed a out a few nitpicks and shared some ideas on further content polishing.
| authors: | ||
| - "almir-okato" | ||
| tags: ["Bootloader", "MCUboot", "NuttX", "Zephyr"] | ||
| summary: "This guide provides a practical getting‑started walkthrough for using MCUboot on ESP32. It covers step-by-step environment setup, bootloader building, application configuration, flashing, and gives an overview of the MCUboot's execution flow" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comma separated list is already quite long. I suggest breaking it into two sentences to improve readability:
| summary: "This guide provides a practical getting‑started walkthrough for using MCUboot on ESP32. It covers step-by-step environment setup, bootloader building, application configuration, flashing, and gives an overview of the MCUboot's execution flow" | |
| summary: "This guide provides a practical getting‑started walkthrough for using MCUboot on ESP32. It covers step-by-step environment setup, bootloader building, application configuration, and flashing. It also gives an overview of MCUboot's execution flow." |
| In the embedded world, firmware updates are essential and increasingly important. As IoT solutions grow exponentially in numbers and complexity, so does the concern to make devices secure and updatable in the field efficiently. | ||
|
|
||
| Some years ago, **MCUboot** emerged as an open source bootloader project for small and low-cost systems, designed to simplify and provide a standard in this field. It started as an Apache Mynewt subproject when developers decided to separate the bootloader from OS development. Later, it was ported to **Zephyr RTOS** and became its default bootloader. | ||
|
|
||
| **Espressif Systems** has been broadening support for additional **third-party RTOSes** such as **Zephyr** and **NuttX**, offering developers more choices for its SoCs. For this reason, a port for Espressif SoCs has been created within the MCUboot project. | ||
|
|
||
| This guide shows how to get started with MCUboot on your ESP32-based project. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The intro is short, but it answered all my questions about what MCUboot is and what it isn't.
It is a masterclass in economy of words. Nicely done!
| This guide shows how to get started with MCUboot on your ESP32-based project. | ||
|
|
||
| {{< alert icon="circle-info" cardColor="#b3e0f2" iconColor="#04a5e5">}} | ||
| This is a translated and updated version of my original article in [Embarcados website](https://embarcados.com.br/primeiros-passos-com-esp32-utilizando-mcuboot-como-bootloader/). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not move this information immediately under Introduction? I believe it fits there better.
| This is a translated and updated version of my original article in [Embarcados website](https://embarcados.com.br/primeiros-passos-com-esp32-utilizando-mcuboot-como-bootloader/). | |
| This is a translated and updated version of my original article on the [Embarcados website](https://embarcados.com.br/primeiros-passos-com-esp32-utilizando-mcuboot-como-bootloader/). |
| This is a translated and updated version of my original article in [Embarcados website](https://embarcados.com.br/primeiros-passos-com-esp32-utilizando-mcuboot-como-bootloader/). | ||
| {{< /alert >}} | ||
|
|
||
| This articles covers environment setup, required configuration in the application side, how to build the **MCUboot Espressif Port** bootloader and how to flash it into the device. The [ESP32 DevKitC](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/hw-reference/esp32/get-started-devkitc.html) board was used to prepare this guide. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The summary mentions this for the hands-on part:
It covers step-by-step environment setup, bootloader building, application configuration, flashing.
This paragraph lists slightly different components. The table of contents has its own wording.
I suggest that you make all the three more consistent. Maybe you need to stay closer to what you have in your table of contents.
For example:
| This articles covers environment setup, required configuration in the application side, how to build the **MCUboot Espressif Port** bootloader and how to flash it into the device. The [ESP32 DevKitC](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/hw-reference/esp32/get-started-devkitc.html) board was used to prepare this guide. | |
| This articles covers what MCUboot is, how to set the environment and configure the application side, then how to build the MCUboot Espressif Port bootloader and flash it onto the device. We will use the [ESP32 DevKitC](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/hw-reference/esp32/get-started-devkitc.html) board in this guide. |
| This articles covers environment setup, required configuration in the application side, how to build the **MCUboot Espressif Port** bootloader and how to flash it into the device. The [ESP32 DevKitC](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/hw-reference/esp32/get-started-devkitc.html) board was used to prepare this guide. | ||
|
|
||
| {{< alert icon="eye" >}} | ||
| The MCUboot-compatible application mentioned in this guide can be either a NuttX RTOS application or a Zephyr RTOS application built for Espressif SoCs with MCUboot compatibility configuration enable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can make it slightly shorter.
| The MCUboot-compatible application mentioned in this guide can be either a NuttX RTOS application or a Zephyr RTOS application built for Espressif SoCs with MCUboot compatibility configuration enable. | |
| The MCUboot-compatible application in this guide can be either a NuttX or Zephyr RTOS application built for Espressif SoCs with MCUboot compatibility configuration enabled. |
|
|
||
| ### **MCUboot Espressif Port** HAL | ||
|
|
||
| The MCUboot Espressif Port relies on HAL (Hardware Abstraction Layer) sources provided by **ESP-IDF**. You must either have ESP-IDF installed, which allows building the project standalone, or use one of Espressif’s HAL sources available for Zephyr (`zephyrproject-rtos/hal_espressif/`) or NuttX (`espressif/esp-hal-3rdparty`). For the latter options, it is recommended to use them only within their respective RTOS build systems, as the source revisions may not match the expected versions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The information is packed quite densely in this paragraph. Why not makeing it less dense and easier to scan/follow?
Would it be clear to the reader what zephyrproject-rtos/hal_espressif/ and espressif/esp-hal-3rdparty refer to?
| The MCUboot Espressif Port relies on HAL (Hardware Abstraction Layer) sources provided by **ESP-IDF**. You must either have ESP-IDF installed, which allows building the project standalone, or use one of Espressif’s HAL sources available for Zephyr (`zephyrproject-rtos/hal_espressif/`) or NuttX (`espressif/esp-hal-3rdparty`). For the latter options, it is recommended to use them only within their respective RTOS build systems, as the source revisions may not match the expected versions. | |
| The MCUboot Espressif Port relies on HAL (Hardware Abstraction Layer) sources provided by **ESP-IDF**. To build the project, you should have **one of the following**: | |
| - Install ESP-IDF, which allows building the project standalone | |
| - Use Zephyr (`zephyrproject-rtos/hal_espressif/`) HAL source from Espressif | |
| - Use NuttX (`espressif/esp-hal-3rdparty`) HAL source from Espressif | |
| For Zephyr and NuttX, it is recommended to use their respective RTOS build systems, as the source revisions may not match the expected versions. |
| ``` | ||
|
|
||
| {{< alert icon="eye" >}} | ||
| MCUboot repository includes some sample cryptographic keys for signing and testing the secure boot verification. It is crucial that you never use these keys in production since the private key is available in the MCUboot repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| MCUboot repository includes some sample cryptographic keys for signing and testing the secure boot verification. It is crucial that you never use these keys in production since the private key is available in the MCUboot repository. | |
| MCUboot repository includes some sample cryptographic keys for signing and testing the secure boot verification. It is crucial that you **never use these sample keys in production** since the private key is available in the MCUboot repository. |
| A **Zephyr** image with MCUboot compatibility doesn't need the `--pad-header` parameter. | ||
| {{< /alert >}} | ||
|
|
||
| Here is a quick look on what these `imgtool sign` parameters do: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Here is a quick look on what these `imgtool sign` parameters do: | |
| Here is a quick look into what these `imgtool sign` parameters do: |
| - `-S 0x00150000`: Indicates the slot size so the tool can add the MCUboot trailer properly. | ||
|
|
||
| {{< alert icon="circle-info" cardColor="#b3e0f2" iconColor="#04a5e5">}} | ||
| This step just adds the basic required header, however notice that we didn't add any cryptographic key for security verification yet. It will be covered in the next parts of this MCUboot guide series. Refer to the [imgtool documentation](https://docs.mcuboot.com/imgtool.html) for more information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| This step just adds the basic required header, however notice that we didn't add any cryptographic key for security verification yet. It will be covered in the next parts of this MCUboot guide series. Refer to the [imgtool documentation](https://docs.mcuboot.com/imgtool.html) for more information. | |
| This step just adds the basic required header, however notice that we didn't add any cryptographic key for security verification yet. It will be covered in the following parts of this MCUboot guide series. Refer to the [imgtool documentation](https://docs.mcuboot.com/imgtool.html) for more information. |
|
|
||
| The next step for this series is to understand how updates work in the MCUboot and use this feature appropriately. | ||
|
|
||
| ## References |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about using the standard name Resources here?
I recommend that you provide link text for each link with a brief explanation of what the reader will find if they click the link.
For example:
- Building and using MCUboot with Espressif’s chips (MCUboot official docs)
Description
Article translated and updated from my original from Embarcados portal.
Related
Testing
Built and visualized using local hugo server.
Checklist
Before submitting a Pull Request, please ensure the following: