smp_svr sample: Building MCUboot

I've got a project that I'm going to want to do DFU through the UART, and in order to transfer files in a follow-on activity, I want SMP running in the application. Therefore the smp_srv sample.

In my development and test activities, I'm using a nRF52840 DK.

Following instructions at SMP server (docs.nordicsemi.com/.../README.html). The build of MCUboot works, after I specify the complete path to the code:
"west build -b nrf52840dk_nrf52840 -d build_mcuboot /c/ncs/v2.6.0/bootloader/mcuboot/boot/zephyr", and flash it. (I use "west flash -d build_mcuboot --erase", because otherwise, it finds and runs the image from a previous effort!)

However, when I build the application, it includes CONFIG_BOOTLOADER_MCUBOOT=y which apparently builds MCUboot as a child image. So building separately isn't necessary.  Makes me think the sample instructions are out-of-date.

Toward the end of the build process, I try to follow the instructions for signing the image, but they don't work. However, I can flash any of the bin files of the application and they will load and run.

It's like MCUboot isn't really looking for a signature, and I didn't see anything in the instructions to tell MCUboot to do so when it was being built.

Parents
  • Hello,

    Sorry for the delay that occurred here. I was on vacation, which created the delay in responding. Could you tell me the latest update on this issue? Were you able to tackle the issue with the help of the devzone community? 

    Kind Regards,

    Abhijith

  • No, this isn't holding me back, so I've gone on to other things, but eventually I _will_ want to sign DFU images so that MCUboot will only accept uploads from a controlled source.

    There's probably how-to info in the docs and on DevZone that will help me, and I'll be pleased to have you respond with hints.

    What throws me about this particular situation is that the sample purports to do signing but I don't see any evidence that it actually is doing that, other than this little message thrown up by west.  It's like the sample is broken.

Reply
  • No, this isn't holding me back, so I've gone on to other things, but eventually I _will_ want to sign DFU images so that MCUboot will only accept uploads from a controlled source.

    There's probably how-to info in the docs and on DevZone that will help me, and I'll be pleased to have you respond with hints.

    What throws me about this particular situation is that the sample purports to do signing but I don't see any evidence that it actually is doing that, other than this little message thrown up by west.  It's like the sample is broken.

Children
  • Hello,

    Take a look at the output build file section, which will give you an idea of the generated output files. This github repository from my colleagues shows adding a custom key to your application. You can keep this as a reference.

    David Ormand said:
    What throws me about this particular situation is that the sample purports to do signing but I don't see any evidence that it actually is doing that, other than this little message thrown up by west.  It's like the sample is broken.

    Okay, so what happens when you try with the wrong key? Try updating the device using the wrong pair of keys and see if this is working.

    Kind Regards,

    Abhijith

Related