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

How to generate a hex file from a sample app - Segger embedded studio for ARM (Nordic version)

Hi,

I have setup the Segger Embedded Studio for ARM (Nordic Edition) V5.10d, and managed to compile a sample app from ,

V1.4.2 -> nrf -> samples -> bluetooth -> peripheral uart

I used my NRF52-DK, hooked up the board to my PC and managed to program the app with "Build and Run" option. I quickly verified that the app is working, by installing the "nrf-tool box" on my phone, and run the app, connect to the device named "Nordic-UART_service". Then did setup the terminal emulator (inbuilt on the segger) with 115200/8/N/1 and managed to communicate with the phone's app, both directions, rx and tx.

Apart from the NRF52-DK, I have designed and built our own NRF52832 based board, which was initially tested with a custom serial/UART bootloader. For this, earlier I used Arduino IDE and managed to program the custom board and run the apps.

Now, I need to migrate to the official NRF SDK studio (Segger which I already setup and tested) and use this SDK to compile and build, but then I need a means to program the custom boards.

My custom boards have the following options (hardware wise)

1. Serial RX/TX exposed

2. SWDIO / SWDCLK pins exposed

With these options, how do I compile an app on the NRF-SDK, and download the Hex file (??) on to the custom board?

I have previously managed to program the bootloader + SoftAPI on to my custom board through the SWDIO/SWDCLK interface, provided from the NRF52-DK board.

I would like to know, 

1. Similar to the way I program the bootloader + SoftAPI on to the custom board through the SWD interface, can I program the app on to the custom board?

2. If I want to use a Serial/UART bootloader, where by pressing a button, the custom board goes on to Serial bootloader mode, does the NRF-SDK support to flash/program the app through a serial cable (with a USB 2 serial cable).

Looking forward to hearing from you soon.

Thanks.

regards,

Dinesh.

Parents
  • Hi Dinesh,

    It is not clear to me which SDK you want to use. Based on what you write initially it looks like you use / want to use the nRF Connect SDK. But you also mention "SoftAPI", which makes me think of the SoftDevice, which is used together with the nRF5 SDK (though the Nordic BLE controller for NCS is also called SoftDevice controller. Please clarify that first. In any case the getting started guides  has linked to are good places to start.

    1. Similar to the way I program the bootloader + SoftAPI on to the custom board through the SWD interface, can I program the app on to the custom board?

    Programming via SWD is exactlyt he same on the DK as on the custom board. The only thing you need to remember is that the DK has an onboard debugger, which you will not have on your custom board. So you need to hook the SWD lines of your custom board to a debugger (could be the DK) in order to program it.

    2. If I want to use a Serial/UART bootloader, where by pressing a button, the custom board goes on to Serial bootloader mode, does the NRF-SDK support to flash/program the app through a serial cable (with a USB 2 serial cable).

    Yes, you can upgrade via serial DFU. If you use the nRF5 SDK then you should look at the example bootloader. If you are using the nRF Connect SDK you should look at the Zephyr documentationf or that. You sould typically need MCUboot as a bootloader and MCUmgr in order to handle the transport. See Device Management.

    Einar

Reply
  • Hi Dinesh,

    It is not clear to me which SDK you want to use. Based on what you write initially it looks like you use / want to use the nRF Connect SDK. But you also mention "SoftAPI", which makes me think of the SoftDevice, which is used together with the nRF5 SDK (though the Nordic BLE controller for NCS is also called SoftDevice controller. Please clarify that first. In any case the getting started guides  has linked to are good places to start.

    1. Similar to the way I program the bootloader + SoftAPI on to the custom board through the SWD interface, can I program the app on to the custom board?

    Programming via SWD is exactlyt he same on the DK as on the custom board. The only thing you need to remember is that the DK has an onboard debugger, which you will not have on your custom board. So you need to hook the SWD lines of your custom board to a debugger (could be the DK) in order to program it.

    2. If I want to use a Serial/UART bootloader, where by pressing a button, the custom board goes on to Serial bootloader mode, does the NRF-SDK support to flash/program the app through a serial cable (with a USB 2 serial cable).

    Yes, you can upgrade via serial DFU. If you use the nRF5 SDK then you should look at the example bootloader. If you are using the nRF Connect SDK you should look at the Zephyr documentationf or that. You sould typically need MCUboot as a bootloader and MCUmgr in order to handle the transport. See Device Management.

    Einar

Children
No Data
Related