Mynewt FAQ - Bootloader and Firmware Upgrade¶
Q: I wanted to check if the stack provides firmware upgrade capability and if so, is there an example you can provide on how it is being done?
newtmgr tool is used to upgrade Mynewt devices.
newtmgr is a command line tool, but there are
other client libraries available. There is some information listed under the “Image Upgrade” header in the
Split Image documentation.
Q: Is there any documentation on using the bootloader? It sounds like it has baked-in support for serial loading,
but I can’t find any details on serial protocol, or how to do a serial boot load. I assume we set a
flag that tells the bootloader to expect to be flashed by serial, then it handles the rest. Is that true?
A: The serial bootloader would inspect a GPIO to see whether to wait for image upload commands or not. The protocol is the same newtmgr protocol we use for usual image uploads. For some the state reporting is simplified (omitted), and image upload goes to slot 0 instead of slot 1. The serial bootloading is built into newtmgr. For more information, refer to the documentation on the Mynewt bootloader.
Q: Is there any major difference between MCUboot and the Mynewt bootloader?
A: They use different formats. The header is different as well, since you need to pass an extra flag
(e.g. -2 to newt for
create-image for MCUboot). Visit the MCUboot page for more documentation.