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

Problem flashing example ble peripheral programs

Hi I am new to Nordic development and set up all the tools required for compiling and flashing program to nrf52840 0n ubuntu. I downloaded nrfjprog and jlink segger and put it in the required path: /OPT/.

I am not able to flash any programs to nrf device using make flash command. If I do drag and drop it works for most of the examples.

But If I do drag and drop for Ble peripheral, any example code doesn't work. I first drag and drop hex code for soft device S140, and then program it with required hex code.

Note: I program the device with hex code generated after compiling an example code without changing it, The hex codes provided in dev kit work properly

Parents
  • AFIK. If you drag and drop , it erases the whole of flash and then flashes your application hex

    However, when it erases the whole of the flash, it also erases the SoftDevice.

    So if you want to use drag and drop, you need to merge your application hex with the Softdevice hex, every time before you upload.

    You have not stated what build environment you are using, but if you are using the Gcc make file, then just use the

    make flash

    command, as this will just flash your application and not erase the Softdevice.

    You would of course need to flash the Softdevice once in the first place, either by dragging and dropping, or there is a make file target which does that, which I think is

    make flash-softdevice

    But you would need to double check the syntax

Reply
  • AFIK. If you drag and drop , it erases the whole of flash and then flashes your application hex

    However, when it erases the whole of the flash, it also erases the SoftDevice.

    So if you want to use drag and drop, you need to merge your application hex with the Softdevice hex, every time before you upload.

    You have not stated what build environment you are using, but if you are using the Gcc make file, then just use the

    make flash

    command, as this will just flash your application and not erase the Softdevice.

    You would of course need to flash the Softdevice once in the first place, either by dragging and dropping, or there is a make file target which does that, which I think is

    make flash-softdevice

    But you would need to double check the syntax

Children
  • Hi, Thankyou for your input. Yes I am using gcc build environment, but I am not able to do

    make flash and make flash_softdevice

    I am getting the following error:

    ERROR: JLinkARM DLL load failed. Try again. If it keeps failing, please

    I have installed segger JLINK in required path but it still does not work. They say please update to recent version, I have downloaded the recent version for the website.

    But mergehex thing works

Related