Questions and answers: Where should firmware update functions live live? Papers in systems nice about dynamic conservatism


Here is a question that we answered in the interrupt slack channel afterwards OTA updates panel. We share the answer in our blog to make it available to a wider audience.

Thoughts on implementing the update application outside the boot loader, e.g. B. in a user space process?

Ultimately, the life of the update depends on the overall system architecture.

A big consideration is Where is my code carried out from?. The other article is Where do I write. For modern Mcus, the answer is often “I make code from flash”. If you write on a separate flash partition, an update process can be okay in your application. If you are a resource limited and write an update in the same flash section from which you are currently executing (i.e. you rely on a single application partition and a fixed fallback image), you will crash your system. On the other hand, if you run out of SRAM, it may be perfectly fine to even delete a flash screaming flash with an application partition.

The other consideration is the availability of resources. You may not have enough RAM if your complete application is carried out to obtain the firmware load and carry out the update. You may want a separate application update to easily process because you can guarantee sufficient calculation and memory for the update process.

There is also the complexity factor. The more complex the operations are, the more things may be wrong. If you simplify the system state as much as possible, your work makes your work easier. You would like to enter into restrictions on what happens during the update process, which may undermine other system processes.

The associated question: What is the reason for your update functionality in bootloader? Are your thoughts about this change in a Linux VS Bare Metal environment?

For on McUI do not recommend having the update functionality live in the boot loader, even though it is common (e.g. Mcuboot). Rather, I would create a separate application that is only used for the update process. If your boot loader has the update functions itself, prevent common restrictions (e.g. code from Flash) that the bootloader can update itself.

With Linux you get a lot more scope, and there is often an update client that is executed as a separate application/process.

References



Source link