You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Preparations for IFU development are under way. Please take a look at the executive summary here.
This is currently an ongoing effort. We are looking for sponsors to cover the development cost. Take a look at the executive summary and/or reach out on the Discord channel (https://discord.gg/JnE2BnWj) if you want to contribute or join the conversation.
We have a working OTA implementation for ESP32 in our fork. Since this issue is looking for contributions, it may be useful input — either as an interim path for ESP32 or as reference material for whoever picks up the MVP. Happy to be told it's the wrong direction.
What it is. About 900 lines in targets/ESP32/_common/targetHAL_Ota.c plus a header, behind a Kconfig feature (NF_FEATURE_OTA, default n), with its own OTA partition layout. No dependencies beyond esp_partition, esp_ota_ops and esp_rom_crc. Two update flavours share one state machine:
FULL — a new nanoCLR image goes to the inactive ota_x slot and a new managed deployment image to a stage partition. Commit point is esp_ota_set_boot_partition(). The staged deployment is applied by a boot-hook only when the device is actually running from the target slot, so a bootloader rollback cannot leave a new deployment running on the old nanoCLR; in that case the hook restores the previous deployment from backup.
LIGHT — only the managed deployment changes. Commit point is the state record write, and rollback is driven by a boot-attempt counter when the managed stack fails to confirm.
The state record lives in a dedicated raw partition (two 4 KB sectors, ping-pong writes with CRC, the same shape as otadata) rather than in NVS, so it survives an NVS erase or recovery. FirmwareEnd validates magic and sha256, and on secure-boot builds the RSA app signature, so a foreign image fails before any commit. A Wire Protocol deployment from VS or nanoff cancels pending OTA state, so the boot-hook cannot clobber a freshly deployed application.
Why it may be relevant to the plan in the executive summary. The summary notes that mcumgr's image management covers firmware slots but not the separate managed deployment region, and that nanoFramework-specific extensions are needed there. That deployment lifecycle — staging, applying before the CLR starts, backup and rollback, binding a staged deployment to a specific firmware slot — is exactly the part we had to solve, and it is largely independent of both transport and bootloader. Even if MCUboot takes over the firmware half, that state machine should still be reusable.
Where it diverges from the plan. It is built on the IDF OTA mechanism, which the summary explicitly deprioritises in favour of MCUboot. It is not a step towards the target architecture — it is the pragmatic path we needed on devices already in the field.
What upstreaming it would cost. The honest list:
the managed API currently goes through our own interop assembly, so upstream would need a proper class library plus native stubs — by far the biggest piece;
the partition CSV needs a clean variant, ours carries a product-specific coredump partition;
signature verification is tied to SECURE_SIGNED_ON_UPDATE and should be made optional;
tested only on ESP32-S3 with a 16 MB layout, other series and layouts unverified;
Target_IFUCapable() would flip to true, and the host-side expectations that follow from that are not implemented.
The question: is an ESP32-native OTA path behind a default-off feature flag of interest as an interim step, or would you rather keep the tree clean until MCUboot lands? Either answer works for us — if there is interest we can prepare it as a PR, and if not we are glad to describe the design in more detail for whoever ends up doing the deployment side of IFU.
@dkovyazin thank you for the offer. For consistency we have to keep all platforms in sync otherwise it will become confusing and prone to errors on tools and docs.
Understood on keeping platforms in sync — that makes sense for IFU itself, and I am not proposing a second IFU.
One narrower question before I drop it. Would you see room for this as an ESP32-only vendor API, in the same category as nanoFramework.Hardware.Esp32.Rmt or nanoFramework.Networking.Thread — capabilities that exist only where the silicon offers them — rather than as a platform update mechanism? It could be built so that nothing changes unless someone opts in:
the A/B partition layout stays a separate table, so existing devices and the default nanoff flow are untouched;
the API checks at runtime whether those partitions are present and reports "not supported" when they are not, so a single firmware works on both layouts;
in the docs it would read as an ESP32 capability, not as a second answer to "how do I update a device"; when MCUboot IFU lands, the package can be deprecated or re-pointed at it.
The honest limitation is that two nanoCLR slots plus staging only fit boards with 16 MB of flash, so it would never be a universal answer even on ESP32.
If it is still a no, that is completely fine — I would rather ask once than have it resurface later. Either way, I am happy to describe the deployment staging part in more detail whenever you get to that piece of IFU, since mcumgr does not cover the managed deployment region.
I understand what you're describing. That would plan B if the current design proves to be not doable. In STM32 MCUmgr is already taking care of updating both CLR and deployment regions. That's the plan for ESP32 too.
Understood, thanks for the context. Good to know MCUmgr already covers both the CLR and the deployment regions on STM32 — that answers the gap I was pointing at.
We will keep ours running in our fork, so it stays on the table if plan B is ever needed. Feel free to ping me, and good luck with the ESP32 port.
@torbacz only preparatory work was done on the ESP32. There was only one tentative sponsor interested in the ESP32 and it pulled off in the end. As reported above and on Discord, only ORGPAL stepped forward. Their boards are STM32 so only that platform will have IFU on the initial release.
This is a complex matter and MCUmgr requires a deep level of expertise. Don't get me wrong, I'm not implying that you couldn't do it. Just that considering who is going to maintain all this in the long run, I would rather have this work done "in house"...
Activity
josesimoes commentedon Mar 11, 2026
Apart from Orgpal, no other comercial player showed interest in sponsoring this feature.
I suppose it's not that relevant after all...
alberk8 commentedon Mar 12, 2026
It is completely relevant but the question is where do we find the sponsors with money to do this and how to make it long term viable.
dkovyazin commentedon Sep 7, 2026
We have a working OTA implementation for ESP32 in our fork. Since this issue is looking for contributions, it may be useful input — either as an interim path for ESP32 or as reference material for whoever picks up the MVP. Happy to be told it's the wrong direction.
What it is. About 900 lines in
targets/ESP32/_common/targetHAL_Ota.cplus a header, behind a Kconfig feature (NF_FEATURE_OTA,default n), with its own OTA partition layout. No dependencies beyondesp_partition,esp_ota_opsandesp_rom_crc. Two update flavours share one state machine:ota_xslot and a new managed deployment image to astagepartition. Commit point isesp_ota_set_boot_partition(). The staged deployment is applied by a boot-hook only when the device is actually running from the target slot, so a bootloader rollback cannot leave a new deployment running on the old nanoCLR; in that case the hook restores the previous deployment frombackup.The state record lives in a dedicated raw partition (two 4 KB sectors, ping-pong writes with CRC, the same shape as otadata) rather than in NVS, so it survives an NVS erase or recovery.
FirmwareEndvalidates magic and sha256, and on secure-boot builds the RSA app signature, so a foreign image fails before any commit. A Wire Protocol deployment from VS or nanoff cancels pending OTA state, so the boot-hook cannot clobber a freshly deployed application.Why it may be relevant to the plan in the executive summary. The summary notes that mcumgr's image management covers firmware slots but not the separate managed deployment region, and that nanoFramework-specific extensions are needed there. That deployment lifecycle — staging, applying before the CLR starts, backup and rollback, binding a staged deployment to a specific firmware slot — is exactly the part we had to solve, and it is largely independent of both transport and bootloader. Even if MCUboot takes over the firmware half, that state machine should still be reusable.
Where it diverges from the plan. It is built on the IDF OTA mechanism, which the summary explicitly deprioritises in favour of MCUboot. It is not a step towards the target architecture — it is the pragmatic path we needed on devices already in the field.
What upstreaming it would cost. The honest list:
SECURE_SIGNED_ON_UPDATEand should be made optional;Target_IFUCapable()would flip totrue, and the host-side expectations that follow from that are not implemented.The question: is an ESP32-native OTA path behind a default-off feature flag of interest as an interim step, or would you rather keep the tree clean until MCUboot lands? Either answer works for us — if there is interest we can prepare it as a PR, and if not we are glad to describe the design in more detail for whoever ends up doing the deployment side of IFU.
(For context, we are behind #3523–#3529.)
josesimoes commentedon Sep 7, 2026
@dkovyazin thank you for the offer. For consistency we have to keep all platforms in sync otherwise it will become confusing and prone to errors on tools and docs.
dkovyazin commentedon Sep 7, 2026
Understood on keeping platforms in sync — that makes sense for IFU itself, and I am not proposing a second IFU.
One narrower question before I drop it. Would you see room for this as an ESP32-only vendor API, in the same category as
nanoFramework.Hardware.Esp32.RmtornanoFramework.Networking.Thread— capabilities that exist only where the silicon offers them — rather than as a platform update mechanism? It could be built so that nothing changes unless someone opts in:The honest limitation is that two nanoCLR slots plus staging only fit boards with 16 MB of flash, so it would never be a universal answer even on ESP32.
If it is still a no, that is completely fine — I would rather ask once than have it resurface later. Either way, I am happy to describe the deployment staging part in more detail whenever you get to that piece of IFU, since mcumgr does not cover the managed deployment region.
josesimoes commentedon Sep 8, 2026
I understand what you're describing. That would plan B if the current design proves to be not doable. In STM32 MCUmgr is already taking care of updating both CLR and deployment regions. That's the plan for ESP32 too.
dkovyazin commentedon Sep 8, 2026
Understood, thanks for the context. Good to know MCUmgr already covers both the CLR and the deployment regions on STM32 — that answers the gap I was pointing at.
We will keep ours running in our fork, so it stays on the table if plan B is ever needed. Feel free to ping me, and good luck with the ESP32 port.
torbacz commentedon Sep 8, 2026
@josesimoes is there any work done in terms of ESP32? I could try to pick it and implement.
josesimoes commentedon Sep 8, 2026
@torbacz only preparatory work was done on the ESP32. There was only one tentative sponsor interested in the ESP32 and it pulled off in the end. As reported above and on Discord, only ORGPAL stepped forward. Their boards are STM32 so only that platform will have IFU on the initial release.
This is a complex matter and MCUmgr requires a deep level of expertise. Don't get me wrong, I'm not implying that you couldn't do it. Just that considering who is going to maintain all this in the long run, I would rather have this work done "in house"...