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

How to debug client OTA upgrade application, ZigBee?

What is the right way to use the debug possibilities of Segger Embedded Studio (or another allowed IDE) in case of the client Zigbee OTA upgrade application example? For now, I am using the NRF_LOG_INFO macros messages through the RTT Viewer. But is it possible to debug the client application “in a full manner”, I mean using the breakpoints, step into/over, etc.?
If yes, could you please advise me, how can I reach it?

  • Hi.

    I have to look some more at this, please be patient.

    Best regards,

    Andreas

  • Hi.

    I have not been able to debug in SES yet, but I have been able to set up a debugging session in Ozone.

    I ran the following script from the ota folder:

    make -j -C bootloader_debug\pca10056\blank\armgcc
    make -j -C client\pca10056\blank\armgcc
    
    nrfutil settings generate --family NRF52840 --application client\pca10056\blank\armgcc\_build\nrf52840_xxaa.hex --application-version 0x01010101 --bootloader-version 1 --bl-settings-version 2 --app-boot-validation VALIDATE_ECDSA_P256_SHA256 --key-file priv.pem settings.hex 
    
    mergehex -m client\pca10056\blank\armgcc\_build\nrf52840_xxaa.hex settings.hex -o dfu_client.hex 
    
    nrfjprog -f nrf52 -e
    nrfjprog -f nrf52 --program mbr_nrf52_2.4.1_mbr.hex --chiperase
    nrfjprog -f nrf52 --program bootloader\pca10056\blank\armgcc\_build\nrf52840_xxaa_mbr.hex
    nrfjprog -f nrf52 -r --program dfu_client.hex --sectorerase --snr 683357357 
    nrfjprog -r
    

    Then I opened Ozone and selected the .out file in the client folder (client\pca10056\blank\armgcc\_build\nrf52840_xxaa.out)

    Instead of downloading the file I selected "Attach to Running Program"

    And I was able to step through the code.

    Hope this helps you.

    Best regards,

    Andreas

  • Hi, Andreas.

    It is great! Thank you very much.

    Sincerely,

    Anna

Related