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

nRF52840 DONGLE debugging

Hi,

I am developing a project using the nRF52840 DONGLE. As part of the process, I need to be able to debug my code, so I am using IAR and a J-TRACE PRO for that. The problem is, when I download any program that uses BLE, I just cant debug, as the firmware never reaches main on startup. When I download any example that doesn't uses BLE, such as the USB Generic HID, it works fine. So, what could possibly be the error? I have already tried the sugestions on this tutorial, but got no results. Another curious thing is that I can't download the SOFTDEVICE via nRFGO, becouse it says that "No device detected, or readback protection may be set". When using nRF Connect, I can read the device memory and program the softdevice.

The example I am trying tho download to my dongle is the ble_app_uart_c. I did change the board define to PCA10059 and commented the UART initialization for bypassing the pins definition error.

Parents
  • Are you including the softdevice in the IAR build? These are the steps we use, in particular the using Flash Loader was not an option:

    Options->Debugger->Images:

      Download Extra Image [Checked]

      Path: blah\blah\s132_nrf52_6.1.0_softdevice.hex

      Offset: 0

      Options->Debugger->Download:

      Verify Download [Checked]

      Use Flash Loader: [Un-Checked]

      This works as-is with the vanilla linker icf file and standard SoftDevice settings (Nordic Uart example based) which doesn't need editing:

    Debugging code with softdevice interrupts running using stepping is another issue, but at least the above lets the code run to main() and beyond with the ability to break on a breakpoint once pretty much anywhere. There are a few posts on debugging with running code beyond the first breakpoint.

  • I was already including the Softdevice in the IAR Build, the diference was that I was using the newest version, not the 6.1.0 as you suggested. Using this older version solved the problem.

Reply Children
No Data
Related