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

How to make BLE examples working. for nRF5XDK series. (BLE_app_templates)

How to make BLE examples working. for nRF52DK series (BLE_app_template)?

Hi, I tried for around a week. and I will describe what I did, and what I have found first. I use nRF52 SDK, PCA#10040

I am recently focus on BLE use. so I chose 2 basic examples. A. BLE_app_becom B. BLE_app_Template

*****In my mind, if I want to make the nRF52 to work. is like PPAP I have an "APPLICATION HEX file ",
I have a "Soft Device HEX file (s132_nrf52_2.0.1_softdevice.hex)" uh.... Working Functioning SDK....

but it's really not they way i think. 1.
my nRF52 SDK already have s132_nrf52_2.0.1_softdevice.hex as SOFTDEVICE, so i use Keil, to upload the application ( Ble_app_becom, and BLE_app_template). and when uploading the nrf52SDK led is falshing too. but it's the nrf52 SDK is not funcitoning

so with nordic Engineer kindly reply, they suggest me. use nrfGo to
Step1. Erase All
Step2. "Programe Application" the file under the folder "HEX" ble_app_template_pca10040_s132.hex ble_app_beacon_pca10040_s132.hex

YES 2 is working...
BUT BUT looks like the ble_app_XXXXXXX__s132.hex "IS ALREADY" combine "ble_app_XXXX.hex" and "sd132...hex"

     ***** IF  I want  Learn from these examples,  
            I cant do much, but only use   nrfGO  "Programe Application "....
            that doesnt  help me much.

THIS IS THE MY REAL QUESTION*************** How can i use the "KEIL GENERATED APPLICATION HEX FILE" which is under the folder "_build"
PLUS the SD132 ( s132_nrf52_2.0.1_softdevice.hex or any SOFTDEVICE that fit)

to make the nRF52 SDK working fucntioning BLE_app_XXXXXX examples.

I dont know how? a. maybe combine 2 hex file in to one hex file. (but HOW?) b. or maybe upload s132...hex file by hiting "Programe SoftDevice" ,
"AND THEN upload Application.hex file into nrf52 SDK " SEPERATELY" (but HOW?)

c. or maybe nrf52 SD already have s132...hex file.
and I just use "KEIL to upload" the applications. (but HOW?) (and I hope these can work, it will save a lot of time when coding)

Sorry these is definetly NewB question, but i tried, for a week. but not much prgress.....

Could anyone kindly answer my NEWB BLE_app_XXXX examples basic question?

Thanks a lot!!!

  • Hi,

    Yes, you need both SoftDevice and application.

    Most examples comes with a combined hex file of both SoftDevice and application, but this is not what you will normally work with. Usually you will download the SoftDevice and the application separately.

    Where are the .hex files?

    • The application hex file is made in the_build/ folder of your project, when you compile the project. Usually it has a name such as nrf52832_xxaa.hex, depending on what nRF device it is built for.
    • The SoftDevice hex file is found in the folder /components/softdevice/s???/hex/, where s??? is the name of the SoftDevice (for instance s132). It has a name such as s132_nrf52_3.0.0_softdevice.hex, depending on SoftDevice name and version.

    How to download them?

    • I think it is easiset is to use Keil. In the toolbar there is a dropdown for selecting target. The choices are "nrf52832_xxaa" (for the application) or "flash_s132_nrf52_3.0.0_softdevice" (for the SoftDevice). The exact names may differ, depending on nRF5x device, SoftDevice and SDK. The LOAD button (usually next to the dropdown) downloads the selected target, i.e. either application or SoftDevice.
    • You can use nRFgo Studio instead. There are separate tabs for downloading SoftDevice and application, so you must select the correct item in turn. You must find the .hex file on disk, select it, and program. Do this for both SoftDevice and application.

    Note that you may get an error where the area to write is not empty. If so, then you must "erase all" in nRFgo Studio. This will erase all flash, so then you have to download both SoftDevice and application afterwards.

    You only need to download the SoftDevice once, as it does not change. You can download the new application whenever you do changes to it, again and again, without touching the SoftDevice. (As long as you do not erase all flash. If you do that then of course you must download the SoftDevice again.)

    Regards, Terje

  • Thank you, Terje

    it works now. and my problem maybe choose the wrong softdevice.

    Instead of using the Softdevice hex file underr /components/softdevice/s???/hex/ ,
    i probably mess up with the softdevice that comes with the evalutaion board, or mess up with the softdevice downlaoded on the nordic officail website.

    it's all S132 ,but probably I mess up with different versions i guess. so the point is to use the correct SoftDevice file, which is under.../components/softdevice/s???/hex/ thanks a lot

Related