apache / mynewt-mcumgr

Apache mynewt
https://mynewt.apache.org/
99 stars 76 forks source link

zephyr: Allow to select slot for DFU as image #128

Closed de-nordic closed 3 years ago

de-nordic commented 3 years ago

The change alters Zephyr port of mcumgr to use "image" parameter, from update packet, to identify slot the update should be written to. The number of available images/slots have also been extended with image_2 and image_3. WARNING: Due to mcumgr always sending "erase" command, which is hardcoded to erase slot number 1, to upload to slot > 2, the -e switch to mcumgr, which means no erase, image upload is required; otherwise innocent slot 1 will be erased while other slot is uploaded.

Signed-off-by: Dominik Ermel dominik.ermel@nordicsemi.no

de-nordic commented 3 years ago

Hello @nvlsianpu @utzig @mlaz, can you take a look?

de-nordic commented 3 years ago

Found bug, investigating.

de-nordic commented 3 years ago

Found bug, investigating.

OK, Bug was in the keyboard operator: different DTS selected for mcuboot and smp_svr caused mcuboot to not be able to properly figure out image boundaries.

de-nordic commented 3 years ago

Thanks @mlaz. @nvlsianpu , @utzig Can you find some time and look at this?

de-nordic commented 3 years ago

marked as DNM to change how Zephyr processes image numbers. Removed DNM

nvlsianpu commented 3 years ago

@utzig Can you take a look?