Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Issue with running SDK-mesh example on nRF52840 Dongle

Hi,

Unfortunately, I'm stuck on this issue with running SDK-mesh example on Dongle.
1) I did:
- took the project: nrf5_SDK_for_Mesh_v4.0.0_src\examples\light_switch\client\light_switch_client_nrf52840_xxAA_s140_7_0_1
- changed the settings of preprocessor definitions in board-type from PCA10056 -> PCA10059
- changed the settings of Preprocessor -> Linker -> placementMacros ... addresses like in attached screenshots

addresses_DKaddresses_Dongle


- then I changed in the main() to have RGB led on immediately after initialize

int main(void)
{
    initialize();
    start();

    for (;;)
    {
        
        //RGB led on immediately after initialize
        hal_led_pin_set(LED_ON_START, 1);

        (void)sd_app_evt_wait();
    }
}



- then downloaded the hex file using nRF-Connect-Programmer.
- then nothing happens when starting the dongle :(

2) I understood from you that I need an external debugger to be able to download a new bootloader in dongle, in order to be able to start-up the SDK-mesh project.
- where is this new bootloader?
- once I downloaded this new bootloader, can I use then the nRF-Connect-Programmer to download the compiled application based on SDK-mesh? (without external debugger)?
- for SDK-mesh (using BLE) - I think I need to download the soft-device, right? how/what settings should I check in the projects of soft-device, of the SDK-client-application, in bootloader ... such as they work fine?

3) I've searched a bit on nordic, google and I'm confused on what debugger can I use. I have both DK and a bunch of dongles.
If I modify the voltage reference on dongle, can I use DK's debugger to download the bootloader?
saw some posts like this:
devzone.nordicsemi.com/.../is-it-possible-to-program-the-nrf52840-dongle-using-the-nrf52832-dk-using-swd

I also plan to purchase a professional debugger that works with Segger Studio. Which one do you recommend?

4) I intend to develop & debug the BLE-mesh application on DK, but then the final deployment (hence the testing) => would be a dongle network.

Kind regards,
Liv

Parents Reply Children
  • Hi,

    1) I want to run the client-mesh from DK sources into Dongle.
    So, I did:
    - modified the client-dk project: nrf5_SDK_for_Mesh_v4.0.0_src\examples\light_switch_dongle\client by:
    a) changing the settings of preprocessor definitions in board PCA10056 -> PCA10059.
    b) I also changed the memory addresses: Preprocessor -> Linker -> Section Placement Macros ->
    FLASH_PH_START=0x0
    FLASH_PH_SIZE=0x100000
    RAM_PH_START=0x20000000
    RAM_PH_SIZE=0x40000
    FLASH_START=0x27000
    FLASH_SIZE=0xd9000
    RAM_START=0x20002300
    RAM_SIZE=0x3dd00

    - donwloaded using command-line programmer via the nRF52840 DK board's JTAG, the soft-device.hex and client.hex:
    nrfjprog -f nrf52 --eraseall

    cd C:\Nordic_Dongle\nrf5_SDK_for_Mesh_v4.0.0_src\bin\softdevice\


    nrfjprog -f nrf52 --chiperase --program s140_nrf52_7.0.1_softdevice.hex

    cd C:\Nordic_Dongle\nrf5_SDK_for_Mesh_v4.0.0_src\examples\light_switch_dongle\client\build\light_switch_client_nrf52840_xxAA_s140_7.0.1_Release\
    nrfjprog -f nrf52 --sectorerase --program light_switch_client_nrf52840_xxAA_s140_7.0.1.hex

    nrfjprog -f nrf52 --reset

    - after reset nothing happens (like program doesn't start)

    2) Besides the option to run the client-mesh directly into dongle (that I still don't know what's wrong in the steps above), I also would like to have a bootloader that allows developer to download a Mesh application via USB or via BLE (air).
    I understood from forum discussions that I need a bootloader for Mesh (the original doesn't work with soft-device).
    - Hence, I downloaded  bootloader (nrf5_SDK_for_Mesh_v4.0.0_src\bin\bootloader\gccarmemb\mesh_bootloader_gccarmemb_nrf52840_xxAA.hex) and then the soft-device and then the client-application.
    Again, nothing happens after reset!

    - Then, I want to make a bootloader for mesh using source files from this path (nrf5_SDK_for_Mesh_v4.0.0_src\mesh\bootloader). Unfortunately, the sources do not have a Segger project. Hence, I created a new project in segger, added in the headers, the sources from bootloader path, but it seems that i cannot detect&use the CMAkeList. How can I complete the segger project for bootloader such as I can compile it?

    3) I would like to know the exact bootstrapping steps in Dongle nRF52840 in both cases with soft-device for BLE or without:
    what address chips starts, bootloader runs, bootloader launch application from address xxx ... who runs softdevice from address yyy .... Eventually, what are the functions from bootloader that starts code from a specific address?


    Kind regards,

    Liv

Related