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

Viewing log in Python (pc-nrfutil)

I am using pc-nrfutil to perform FW upgrade (transport is serial), The target is custom board with 52840 processor, running Bootloader adapted from the SDK.

For most of the boards, it works fine. On certain board, I consistently got "Did not receive checksum response from DFU target.

I can see the message from "logger.info()" in my command prompt terminal in PC.

Sorry for the dumb question, but how do I see the message from "logger.log()"?

Any idea how to see logger.log() message? I would like to see SLIP raw messages to debug.

  • Hello,

    Do you mean where the logs you get on the nrfutil terminal is printed from? That would be nrfutil. But I think it will be better to try to debug the bootloader. Have you tried to monitor the bootloader project to find out why it doesn't work? Have you tested the pca10056_s140_ble_debug project, which will print some information in the RTT log?

    BR,

    Edvin

  • Hi Edvin,

    I found where the log is initialized, and I set the level, I saw the SLIP packet now.

    Regarding debugging Bootloader, yes, I have been trying to do it, but no luck. I will try to run the Bootloader from address 0x0000 and see if I can step through it.

  • I believe I just realized what you wanted, which was the verbose flag:

    "nrfutil -v -v -v -v (up to 4) dfu serial ..."

    I don't remember how many "-v"s you need in order to see the packets, but 4 of them will give the maximum information.

    Harry said:
    I will try to run the Bootloader from address 0x0000 and see if I can step through it.

     Address 0x0000 will be the softdevice, or MBR if you do not use the softdevice. If you use the debug project, the bootloader is moved a proper portion down, so that you can turn off optimization and enable logging. This will allow you to step through the code, and actually monitor the different values.

    BR,

    Edvin

  • Thanks Edvin. Is there any Bootloader Keil uVision project I can refer to? I got a weird bootloader debugging behavior, unable to set breakpoint on the library I imported from Nordic SDK. Btw, our bootloader consists of a thin layer of our own and then call SDK Bootloader.

  • Yes, we have a bootloader project in our SDKs. To be honest, I thought this was what you were already using. What SDK are you based on? Check the project in:

    SDK\examples\dfu\secure_bootloader\pca10056_s140_ble(_debug)\arm5_no_packs

    There you will find the bootloader's Keil project. 

Related