<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>blog.tedder.dev (Posts about c)</title><link>https://blog.tedder.dev/</link><description></description><atom:link href="https://blog.tedder.dev/categories/c.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2026 &lt;a href="mailto:ted@tedder.me"&gt;tedder&lt;/a&gt; </copyright><lastBuildDate>Sun, 12 Jul 2026 22:51:24 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>ESP-IDF 6.0: what changed, and whether to upgrade from 5.5</title><link>https://blog.tedder.dev/posts/esp-idf-6-migration-v5-to-v6/?utm_source=/categories/c.xml&amp;utm_medium=nikola_feed&amp;utm_campaign=rss_feed</link><dc:creator>tedder</dc:creator><description>&lt;p&gt;After running a uniform fleet of ESP32 devices on &lt;strong&gt;ESP-IDF v5.5.4&lt;/strong&gt; for months, I evaluated the jump to &lt;strong&gt;v6.0.2&lt;/strong&gt;. The short answer: no urgency for existing projects, but the upgrade is clean and v6 is worth choosing for new work.&lt;/p&gt;
&lt;h3&gt;What got better in v6&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/picolibc/picolibc"&gt;Picolibc&lt;/a&gt; replaces Newlib&lt;/strong&gt; — This is the headline win. Picolibc is smaller (flash), faster, and uses less RAM. Free win on all chips, especially memory-constrained S2 and original ESP32. &lt;a href="https://github.com/picolibc/picolibc#why-picolibc"&gt;See the Picolibc vs Newlib comparison.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;New chips and matured C6 support&lt;/strong&gt; — C5, C61 (preview), and full ESP32-C6 support. The C6 in particular is where v6 shines: &lt;a href="https://en.wikipedia.org/wiki/IEEE_802.11ax"&gt;Wi-Fi 6 (802.11ax)&lt;/a&gt; with &lt;a href="https://www.espressif.com/en/news/ESP32-C6-TWT"&gt;TWT (Target Wake Time)&lt;/a&gt; for connected low-power operation, native &lt;a href="https://en.wikipedia.org/wiki/IEEE_802.15.4"&gt;802.15.4&lt;/a&gt; (&lt;a href="https://www.threadgroup.org/"&gt;Thread&lt;/a&gt;/&lt;a href="https://www.zigbeealliance.org/"&gt;Zigbee&lt;/a&gt;/&lt;a href="https://csa-iot.org/"&gt;Matter&lt;/a&gt;), and a genuine &lt;strong&gt;low-power core&lt;/strong&gt; (not a tiny ULP helper like S2/S3 have).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Recovery bootloader (C5/C61 only)&lt;/strong&gt; — Safe OTA of the bootloader itself, not just the app. If the bootloader write fails or loses power mid-flash, the chip boots a recovery copy from a dedicated partition instead of bricking. See &lt;a href="https://docs.espressif.com/projects/esp-idf/en/stable/esp32c61/api-reference/system/misc_system_api.html#bootloader-ota"&gt;ESP-IDF bootloader OTA docs&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Wi-Fi driver robustness&lt;/strong&gt; — &lt;a href="https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-guides/wifi.html#wpa3-support"&gt;WPA3 mixed-mode AP&lt;/a&gt; (SoftAP serves WPA3 but still accepts WPA2-PSK clients), &lt;a href="https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/network/esp_wifi.html"&gt;USD (peer discovery)&lt;/a&gt;, general reconnect/roaming improvements.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Tooling&lt;/strong&gt; — Installation Manager (EIM) for managing versions side-by-side, MCP server support, &lt;code&gt;idf.py&lt;/code&gt; CLI extensions.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Active development&lt;/strong&gt; — v5.5.x is trending maintenance-only. v6 is where new features land.&lt;/p&gt;
&lt;h3&gt;What breaks (or requires attention)&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Warnings are now errors by default.&lt;/strong&gt; This is the most likely migration friction. Each of your 13 projects may need warning cleanup on the first v6 build—either fix them or re-disable the flag. &lt;a href="https://docs.espressif.com/projects/esp-idf/en/stable/esp32/migration-guides/release-6.x/6.0/index.html"&gt;See the official migration guide.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Toolchain bumps&lt;/strong&gt; — CMake 3.22.1 minimum, esp-idf-kconfig v3 (Kconfig syntax changes, only matters if you have custom Kconfig).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;idf.py&lt;/code&gt; requires &lt;code&gt;-p&lt;/code&gt; flag for eFuse commands.&lt;/strong&gt; If you have automation that does &lt;code&gt;idf.py burn_efuse&lt;/code&gt; or similar without specifying the port, it breaks.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Legacy drivers removed&lt;/strong&gt; — ADC, DAC, I2S, Timer, PCNT, MCPWM, RMT, temp-sensor drivers are gone. I scanned my fleet; none use them (though RMT's &lt;code&gt;esp_led_strip&lt;/code&gt; component is NOT removed, and &lt;code&gt;driver/ledc.h&lt;/code&gt; for PWM is fine). Check your projects for raw &lt;code&gt;driver/adc.h&lt;/code&gt;, &lt;code&gt;driver/dac.h&lt;/code&gt;, etc.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Picolibc differences&lt;/strong&gt; — The libc swap can surface subtle printf, locale, float-formatting, or stdio differences. Low-risk, but test rather than assume.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Effort&lt;/strong&gt; — Multiplied by the number of projects. Re-running &lt;code&gt;idf.py set-target&lt;/code&gt;, rebuilding, re-OTA'ing 13 devices takes time. Not a blocker, just real.&lt;/p&gt;
&lt;h3&gt;My migration strategy&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Staged trial: install v6.0.2 side-by-side with v5.5.4.&lt;/strong&gt; Start with one low-stakes project (e.g., a development board or a device you can easily recover), clear warnings-as-errors fallout, confirm OTA works, then roll the rest opportunistically.&lt;/p&gt;
&lt;p&gt;Keep v5.5.4 until all projects are confirmed running on v6.0.2. That gives a fallback if something unexpected surfaces.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;For new projects, start directly on v6.0.2.&lt;/strong&gt; No point dragging v5.5.4 into new work.&lt;/p&gt;
&lt;h3&gt;Bootloader OTA: the chip-specific caveat&lt;/h3&gt;
&lt;p&gt;If you're planning &lt;strong&gt;safe OTA of the bootloader itself&lt;/strong&gt; (not just the app), watch chip support:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;C5 / C61:&lt;/strong&gt; Full recovery bootloader with eFuse fallback. Safe. Use it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;C6, S2, S3:&lt;/strong&gt; No recovery bootloader. Only app OTA is safe. Bootloader must be flashed once over USB and left alone—OTA-ing the bootloader on these chips is risky (no fallback if the write fails).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;C6 practical rule:&lt;/strong&gt; App OTA + rollback = safe/supported. Bootloader OTA = still risky. If bullet-proof bootloader OTA is a hard requirement, prefer &lt;strong&gt;C5 or C61&lt;/strong&gt;, not C6.&lt;/p&gt;
&lt;h3&gt;C6 vs S2 vs S3 at a glance&lt;/h3&gt;
&lt;p&gt;For battery devices that need to &lt;strong&gt;stay Wi-Fi-connected&lt;/strong&gt; on battery, the C6 is a different animal from S2/S3.&lt;/p&gt;
&lt;h4&gt;ESP32-S2&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Cores:&lt;/strong&gt; 1× Xtensa LX7 @ 240 MHz&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Low-power:&lt;/strong&gt; ULP-RISC-V (tiny helper, limited fixed functions)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;WiFi:&lt;/strong&gt; Wi-Fi 4 (802.11n)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;BLE:&lt;/strong&gt; None&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Connected power:&lt;/strong&gt; ~mA (frequent DTIM wakeups)&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;ESP32-S3&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Cores:&lt;/strong&gt; 2× Xtensa LX7 @ 240 MHz&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Low-power:&lt;/strong&gt; ULP-RISC-V (same as S2)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;WiFi:&lt;/strong&gt; Wi-Fi 4 (802.11n)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;BLE:&lt;/strong&gt; BLE 5&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Connected power:&lt;/strong&gt; ~mA (frequent DTIM wakeups)&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;ESP32-C6&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Cores:&lt;/strong&gt; 1× RISC-V HP @ 160 MHz&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Low-power:&lt;/strong&gt; &lt;strong&gt;Real LP core&lt;/strong&gt; (full RISC-V with LP UART/I2C/ADC/GPIO)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;WiFi:&lt;/strong&gt; &lt;a href="https://www.espressif.com/en/news/ESP32-C6-802.11ax"&gt;&lt;strong&gt;Wi-Fi 6&lt;/strong&gt;&lt;/a&gt; (802.11ax)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;BLE:&lt;/strong&gt; BLE 5&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;802.15.4:&lt;/strong&gt; Yes (Thread/Zigbee/Matter)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Connected power:&lt;/strong&gt; &lt;strong&gt;~µA with &lt;a href="https://www.espressif.com/en/news/ESP32-C6-TWT"&gt;TWT&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Key differences:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/IEEE_802.11ax#Target_Wake_Time"&gt;&lt;strong&gt;TWT (Target Wake Time)&lt;/strong&gt;&lt;/a&gt; is a Wi-Fi 6 feature (C6-only). The chip negotiates sleep windows with the AP while staying associated — can cut average current ~10× vs S2/S3 which need frequent DTIM wakeups.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;LP core&lt;/strong&gt; means real sensor/comms loops can run on the low-power core while the HP core sleeps — not a "tiny helper" like S2/S3 ULP, but an actual programmable MCU with peripherals.&lt;/p&gt;
&lt;h3&gt;What I'm doing&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Existing fleet (13 projects on v5.5.4):&lt;/strong&gt; Staying put unless a specific reason to upgrade surfaces (bug fix, new feature, hardware issue). Low urgency.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;New work:&lt;/strong&gt; C6 on v6.0.2 from the start, taking advantage of TWT, LP core, and the full v6 tooling.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Test upgrade (Q3 2026):&lt;/strong&gt; Pick one S3 project (attic-temperature-sensor or rain-sensor), do the staged trial, confirm OTA, then roll out to the rest if no surprises.&lt;/p&gt;
&lt;p&gt;The migration is not risky — it's just not urgent for devices already working on v5.5.4.&lt;/p&gt;</description><category>c</category><category>embedded</category><category>esp32</category><category>esp-idf</category><category>firmware</category><guid>https://blog.tedder.dev/posts/esp-idf-6-migration-v5-to-v6/</guid><pubDate>Sun, 12 Jul 2026 21:41:00 GMT</pubDate></item></channel></rss>