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

Open the SDK nrf52840 on SEGGER

I'm new with Nordic products, I bougth one nRF52840 and I tried to install Segger, to start programming.

I had a problem when I tried to open a SDK on Segger. When I try, show to me a warning message and after a erro (Images bellow).

I followed the nRF Connect Software guide "Getting Started Assistant", but didn't work.

I need help to start a programming the nRF52840.

I tried to use VsCode to generate a .HEX, but didn't work too

Parents Reply Children
  • It worked, but now how can I get a .HEX file on Segger? I can compile, but I have no acess to .HEX file to upload a code on my nRF52840 through nRFConnect Programmer app.

  • You don't need to flash the sample using the programmer app (however, it is still possible if preferable for some reason). You can both build/compile and flash your sample using SEGGER.

    To build/compile:

    To program/flash (assuming you've connected the nRF52840 DK to your computer and turned it on):

    Best regards,

    Simon

  • I forgot to mention, but I'm using the nRF52840 Dongle PCB, and a option(Download ) show another message. 
    I'll send a video, show what I need to do.


    (Sorry for my english, isn't my mother language, so if you don't understand something you can ask and I try to explain)

  • Okay. Now I see more clearly, the video helped. The fact that you're using an nRF52840 Dongle changes things. I will try to clear out some different stuff such that you'll understand things better:

    nRF52840 does not have a programmer

    The nRF52840 does not have a programmer (Interface MCU) on the board, so you can not flash the program onto the chip and you can not debug the application. The nRF52840, on the other hand, does have one, so the approach you showed in the video should work for that.

    SEGGER Embedded Studio (SES) vs. SEGGER Embedded Studio Nordic Edition

    • If you're using the nRF5 SDK (e.g. nRF5 SDK 16.0.0 or  nRF5 SDK 17.0.0) you should use the original version of SES. The one that can be downloaded from here and the one used in this video series
      • It may work to use the Nordic Edition anyway, but I don't think it is the intention
    • If you're using the nRF Connect SDK, you should use SES Nordic Edition. Which is the one that is included with the Toolchain Manager

    Whether you should use the nRF5 SDK or the nRF Connect SDK is another discussion. You may open a new case/search in Devzone if you have questions about this choice.

    How to generate the hex file and program the nRF52840 Dongle

    As mentioned earlier, the dongle doesn't have a programmer. But is shipped with an Open USB bootloader which makes it possible to program it through DFU, and the Programmer app in nRF Connect for Desktop can perform this DFU. Let me show, step by step how to do this:

    • Build your project:

    The hex file is now located here:

    • Connect the nRF5840 Dongle and Press the reset button to put the Dongle in DFU mode.
    • Open the programmer app select the device and drag the file ble_app_blinky_pca10059_s140.hex into the app
    • If not already present on the dongle, add the SoftDevice as well, it is located in nRF5_SDK_17.0.0_9d13099\components\softdevice\s140\hex\s140_nrf52_7.0.1_softdevice.hex
    • Eventually click "Write":

    • After you've downloaded it a message "Nordic DFU Trigger Interface was not found.." might show up. But don't worry about it
    • You can now see the device advertising as "Nordic_Blinky" e.g. by using the nRF Connect app on the phone

    Some other useful links:

    Best regards,

    Simon

Related