Erasing the old image

nRF Util

tags
nRF Util

After the confirmation of the swap, use the ble image-erase with to remove the old image.

Note

You can use the --slot-number option with the ble image-erase subcommand. This option takes the unique slot number for the image and slot you want to erase. If not provided, it defaults to slot number 1. See Image and slot numbering for more information.

Complete the following steps to erase the old image from a device that advertises with the Nordic_LBS name:

  1. Run the ble image-erase subcommand with the correct option values and the slot number of the old image you want to remove:

    nrfutil mcu-manager ble --hci-serial-port COM35 image-erase --device-name Nordic_LBS --slot-number 0
    

    The output will look similar to the following one:

    v Device found: F9:9F:F3:7E:B3:D6, Nordic_LBS
    v Connected to device: F9:9F:F3:7E:B3:D6
    v Erase was successful for Nordic_LBS
    
  2. Run the ble image-list subcommand with correct option values to confirm the operation:

    nrfutil mcu-manager ble --hci-serial-port COM35 image-list --device-name Nordic_LBS
    

    The output will look similar to the one shown above, with the old image in slot 0 gone:

    v Device found: F9:9F:F3:7E:B3:D6, Nordic_LBS
    v Connected to device: F9:9F:F3:7E:B3:D6
    Image
            slot: 1
            version: 2.0.0
            hash: 74e62f0ce9c2045f8f56f650e2667c531be55b1289dc8109ba6445409a8a072f
            bootable: true
            pending: false
            confirmed: true
            active: true
            permanent: false