3 ms·
There are several runtimes for microcontrollers that feature an elf/hex loader for static binaries, or a bootloader that retrieves a program and executes it in
by okl 8y ago
There are several runtimes for microcontrollers that feature an elf/hex loader for static binaries, or a bootloader that retrieves a program and executes it in RAM. Sometimes you can re-enter the bootloader from your application software. On some embedded systems (satellite OBSW comes to mind) you can actually hot-patch the code function-by-function while running. You compile/link the software with some extra space before and after your functions for future modifications. Then when you patch, you have to make sure that the modified code is locked out and that the variables used by the functions being patched are in an acceptable state as well as the cache.
Whether all of that extra effort makes sense? - it depends. But in most embedded projects you can just flash a new firmware and avoid the overhead of executing from RAM. (Depending on your target, flash might have a separate memory bus and could be one or two clock cycles faster.)
Edit: Hot-patching in flash is totally possible as well.
- ramzyo 8y agoSounds interesting - any runtimes in particular you could point out? Interested to read more about them.