This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

DOUBT IN ZIP FILE GENERATION FOR OTA -DFU.

HI ,

  I need the nrfutil commands used to generate the following zip file

  1. softdevice only
  2. bootloader only
  3. softdevice + bootloader  
  4. softdevice +bootloader+application 

If you can please attach the  command used for generating each zip file in the reply ,please don't provide any link because it  time consuming. 

please answer to 1,2,3 and 4 only.

Parents
  • As Hadi says, you need to add the arguments that are required to generate the DFU image.

    These are common:

    nrfutil pkg generate --sd-req 0xXX --hw-version 52 --key-file private.key "DFU_image_name".zip

    Then if your image contains an application, you need to add:

    --application application.hex --application-version N

    If your image contains a bootloader, you need to add:

    --bootloader bootloader.hex --bootloader-version N

    if your image conatins a softdevice, you need to add: 

    --softdevice softdevice.hex --sd-id 0xYY

    The links that Hadi linked to describes it quite well. Also, if you type "nrfutil pkg generate --help" you will see a description of all possible input parameters.

  • hi edvin ,

     Conisder the below condition .

    • We have a development kit of NRF52832(512 KB FLASH).
    • we flashed the softdevice(s132_nrf52_5.0.0_softdevice.hex ) and bootloader (secure_dfu_ble_s132_pca10040_debug.hex) into it .
    • i.e both softdevice and bootloader is from sdk 14.2.
    • After flashing SD+BL to DK the DK is advertising as "DfuTrag".
    • Now we need to to update a zip file through OTA containing softdevice and bootloder  from sdk 15.3 into it . 

    Doubts

    1. What is nrfutil command for generating a zip file containing SD and BL(sdk 15.3) at these condition. Mainly i need to known what is value of "--sd-req and --sd-id"
    2. These is the Softdevice hex "s132_nrf52_6.1.1_softdevice. hex" and these is the bootloader hex "secure_bootloader_ble_s132_pca10040.hex"  from SDK 15.3. if you need its hex   please ask.

      we you can please reply the command  for generating SD+BL zip file with all the condition mentioned above.

  • Hello Nandu, 

    I believe we discussed this in another post, didn't we?

    And you managed to do this but it turned out your application was too big. Did you change to the 512kb version of the nRF?

    However, I may repeat myself if that is what you want. I also told your colleague this, by the way.

    What is nrfutil command for generating a zip file containing SD and BL(sdk 15.3) at these condition. Mainly i need to known what is value of "--sd-req and --sd-id"

    if you intend to upgrade from SDK14.2.0 to SDK15.3.0 with DFU, in other words, you move from S132v5.0.0 to S132v6.1.1, you need the "--sd-req 0x9D --sd-id 0xB7.

    Ask your colleague. We have gone through this in detail. If you are not sure who I am talking about, send me a PM, and I can give you his name. 

  • And you managed to do this but it turned out your application was too big. Did you change to the 512kb version of the nRF?

    Yes man ,I changed it to 512kb .

    I will send both hex file both softdevice and bootloader hex file to you take look

    softdevice hex  

    6052.s132_nrf52_6.1.1_softdevice.hex

    bootloader hex

    secure_bootloader_ble_s132_pca10040.hex

    After flashing bootloder and softdevice the flash memory layout look like below

    And its advertising as "DfuTrag" too.

    Please check by yourself man that the bootloader is fit for 512 kb and also try to make a zip file with all the condition i mentioned and try to upload to a DK which is flashed with SD and BL of sdk 14.2.

    In our case after doing the OTA -DFU its not advertising . i don't known why.

  • If it is not advertising as DFU targ, then there is probably a bug in your application that causes the chip to reset before it starts advertising. Do you remember the ticket where I told you about debugging when there is a bootloader present?

    In Segger Embedded Studio, you can just press "Tools" -> "Attach Debugger" from the toolbar menu when you have your application project open, and it will start the debug session.

  • If it is not advertising as DFU targ, then there is probably a bug in your application that causes the chip to reset before it starts advertising.

    Actually there is no application in the DK only SD and BL and also there is no application hex in the zip file too.

     You mean the application for bootloader ?

    Do you remember the ticket where I told you about debugging when there is a bootloader present?

    yes, But at that time, debug was done by you and told me to use "pca10040_ble" instead of "pca10040_ble_debug". 

  • You can debug the application using the "pca10040_ble" bootloader project as long as you program the bootloader settings, and use "attach debugger" instead of "build and debug".

    The difference between "attach debugger" and "build and debug" is that "build and debug" will upload the .hex file. When you do this from the IDE, the application will behave the same, but there are some bit differences. If there are any bit differences it means that the signature of the application will change(the signature generated when you create the DFU image or if you generate the bootloader settings and program it manually).

    If the signature changes it means that the bootloader will reject the application. 

    So use "attach debugger". 

Reply
  • You can debug the application using the "pca10040_ble" bootloader project as long as you program the bootloader settings, and use "attach debugger" instead of "build and debug".

    The difference between "attach debugger" and "build and debug" is that "build and debug" will upload the .hex file. When you do this from the IDE, the application will behave the same, but there are some bit differences. If there are any bit differences it means that the signature of the application will change(the signature generated when you create the DFU image or if you generate the bootloader settings and program it manually).

    If the signature changes it means that the bootloader will reject the application. 

    So use "attach debugger". 

Children
Related