Embedded firmware and frameworks
How the main IoT firmware frameworks fit together, how long each release line is supported, how to structure device code, and which debug port to reach for on common boards.
Overview
Firmware is the code that runs on the device’s microcontroller. It reads sensors, drives the radio, sleeps, recovers from faults and accepts updates. This hub is for makers choosing their first framework and for product teams deciding what they can maintain for the life of a product. It explains how the frameworks stack on top of each other, how long each project supports a release, how to structure device code so it survives real networks, and how to debug it.
Exact release tags, licences and per-chip support levels for twelve SDKs live in our SDK and RTOS matrix, checked on 28 November 2026. This page links there rather than repeating it.
Key ideas
Frameworks are layers, not rivals
Most IoT frameworks sit on top of each other. A chip vendor’s SDK (ESP-IDF, the Pico SDK, nRF Connect SDK) provides drivers, the radio stack and the build system, often over an RTOS (real-time operating system) kernel. Arduino and MicroPython sit above that and hide most of it.
The layering explains some version rules. The arduino-esp32 4.0.0 release, published on 19 November 2026, declares in its component manifest that it needs ESP-IDF 5.3 or later and earlier than 6.2 when used as an ESP-IDF component. Its README lists the ESP32-C5, ESP32-C6, ESP32-H2 and ESP32-P4 among the chips with stable support. If you mix layers, the lower layer’s version is the one to pin.
Support windows decide how often you upgrade
Each project states how long a release gets fixes, and the windows differ widely:
| Project | Policy in the project’s words | Source |
|---|---|---|
| ESP-IDF | Each release supported for 30 months: 12 months service, then 18 months maintenance with serious bug and security fixes only | ESP-IDF Versions |
| Zephyr (regular) | Supported for two release cycles, about one year. Zephyr 4.5.0 (28 October 2026) reaches end of life on 28 October 2027 | Zephyr releases |
| Zephyr (LTS) | About five years. The current LTS, 3.7, reaches end of life on 27 July 2029 | Zephyr releases |
A product that ships on Zephyr 4.5 and never upgrades loses upstream fixes in under a year. A product on the LTS line keeps them until mid-2029 but gives up newer drivers. For ESP-IDF, the 12-month service period is the one Espressif recommends for new projects. Plan the upgrade path when you pick the framework, not when the first security advisory arrives. OTA mechanics are covered in /topics/ota-and-fleet-management/.
Two release lines can be live at once
Vendors often maintain an older line while a new major version ships. arduino-esp32 3.3.13 appeared on 17 November 2026, two days before 4.0.0. nRF Connect SDK v3.4.2 (4 November 2026) and v3.3.5 (6 November 2026) also overlap. “Latest” is ambiguous in that situation. Pin the exact tag in your build files and record it with each firmware image.
Structure code around events, not delays
A superloop that calls a blocking delay() cannot react to a button, a dropped Wi-Fi link or a sleep deadline while it waits. Two structures work better. One is an event loop: the code waits for any of several events (timer, interrupt, network) and handles each in turn. The other is a small set of RTOS tasks, each blocking on its own queue. Either way, keep three things outside the happy path from the start: a reconnect state machine for the network, a watchdog that resets a stuck device, and a record of why the last reset happened. /learn/beginner/04-gpio-timers-and-interrupts/ shows the first step away from delay().
Rust is now a stable option on Espressif chips
The esp-hal crate for Espressif chips reached version 1.0.0 on 30 October 2025, and esp-hal v1.2.0 followed on 3 September 2026. The radio driver crate, esp-radio, was at 1.0.0-beta.1 (22 September 2026) as of November 2026, so a radio product in Rust carries more upgrade risk than one on ESP-IDF.
Debug with the port the board already has
Start with a serial log that prints the firmware version, the reset reason and each state change. When that is not enough, use a hardware debugger. The ESP32-C5 has a built-in USB Serial/JTAG controller, and on the ESP32-C5-DevKitC-1 v1.2 the ESP32-C5’s own USB-C port also handles JTAG debugging, so no separate probe is needed. The RP2350 exposes SWD (Serial Wire Debug), which lets a host load, run, halt and inspect code.
Where to start
/learn/beginner/03-toolchains-and-first-flash/ sets up Arduino, ESP-IDF and MicroPython side by side and flashes the same board three ways. /learn/beginner/04-gpio-timers-and-interrupts/ introduces interrupts and timers. /learn/beginner/06-wifi-and-your-first-request/ adds the reconnect logic that most first projects lack. Keep the ESP-IDF cheat sheet open while you work.
Tools and platforms
| Job | Option | Why | Source |
|---|---|---|---|
| Quickest first sketch on an ESP32-C5 | arduino-esp32 4.0.0 (or the 3.3 line, 3.3.13) | Lists ESP32-C5 as stable | arduino-esp32 README at 4.0.0 |
| Full access to Espressif features | ESP-IDF v6.1.1 | 30-month support per release | ESP-IDF v6.1.1, Versions |
| Python on the device | MicroPython v1.29.0, CircuitPython 10.3.2 | Python running on the microcontroller | MicroPython, CircuitPython |
| One RTOS across several chip makers | Zephyr 4.5.0, or LTS 3.7 for long support | LTS to 27 July 2029 | Zephyr releases |
| Nordic radios | nRF Connect SDK v3.4.2 | Nordic’s own SDK for its chips | sdk-nrf v3.4.2 |
| C on RP2350 | Pico SDK 2.3.1 | Raspberry Pi’s own SDK | pico-sdk 2.3.1 |
| A bare RTOS kernel | FreeRTOS-Kernel V11.3.3 | Kernel release on its own | FreeRTOS-Kernel |
| Rust on Espressif chips | esp-hal v1.2.0 | Stable HAL since 1.0.0 | esp-hal |
| JTAG without a probe | ESP32-C5 USB Serial/JTAG | Built into the chip, on the DevKitC-1 USB-C port | DevKitC-1 user guide |
| Debug an RP2350 | SWD | Load, run, halt, inspect | RP2350 datasheet |
For makers
Pick the framework your board’s examples use, and stay with it until the project works end to end. Pin the version in your project files so a later update cannot break a working build. Print the reset reason at boot. It answers half of all “it stopped working” questions.
For product teams
Choose the framework by its support window as much as its features, and write the upgrade cadence into the product plan: an ESP-IDF line gives 30 months, Zephyr LTS runs to July 2029, a regular Zephyr release about a year. Build every firmware image from a pinned toolchain in CI, store the exact tags with the binary, and keep a hardware debug path (JTAG or SWD test points) on production boards.
Common mistakes
- Upgrading the Arduino core and the underlying SDK separately and getting a combination nobody tested.
- Calling a version “latest” when two lines are maintained. Use the exact tag.
- Blocking the main loop with
delay()and then adding a radio. - Shipping without a watchdog or a stored reset reason.
- Leaving no debug access on the production board, then debugging field returns by serial print only.
- Staying on a release after its support period ends without noticing.
Going deeper
- ESP-IDF Versions, the support-period policy.
- Zephyr releases, with end-of-life dates per release.
- RP2350 Datasheet, the debug chapter.
- Our SDK and RTOS matrix for every current tag, licence and support level.