This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

NCS 2.0.0 samples will not work on nRF52840 Dongle

Hi,

I am trying to run any of the samples, even the most basic ones as blinky, and they will not run on my nRF52840 dongle, which has a header to program directly with jlink, using another DK to connect with debug out.

The dongle works perfectly using SDK 17.1.0, and same connection configuration.

They (samples) all work perfectly in any of the other nordic DK using NCS 2.0.0.

I have a mac pro with M1 running with all of the recommendations for vscode and jlink. (Intel versions)

Even trying to debug, enabling debug options at build time, will not give me access to the disassembly, or run for that matter.

At the beginning I thought that it could be the code needed to do the voltage setup for the leds to work, but then I saw that it was included on the board_nrf52840dongle_nrf52840_init() function inside the board.c for the dongle, as well as the code in the generated zhephyr.lst.

Can you tell me if I am doing something wrong?

Thanks!

  • HA, thnx, I just wanted to say that I have been busy trying to get the an example compiled.

    just ran the template on 2.0.0 and got stranded with errors etc.: 

    [330/341] Linking C executable zephyr\zephyr_pre0.elf
    FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map 
    cmd.exe /C "cd . && C:\XXX\Documents\NCS_V1\toolchains\v2.0.0\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe   @CMakeFiles\zephyr_pre0.rsp -o zephyr\zephyr_pre0.elf  && cmd.exe /C "cd /D C:\XXX\Documents\ZIGBEE_VS_CODE\template_test\build_2\zephyr && C:\XXX\Documents\NCS_V1\toolchains\v2.0.0\opt\bin\cmake.exe -E echo ""
    c:/XXX/documents/ncs_v1/toolchains/v2.0.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/../../../../arm-zephyr-eabi/bin/ld.exe: zephyr/subsys/random/libsubsys__random.a(rand32_entropy_device.c.obj): in function `rand_get':
    C:\XXX\Documents\NCS_V1\v2.0.0\zephyr\subsys\random\rand32_entropy_device.c:80: undefined reference to `__device_dts_ord_98'
    c:/XXX/documents/ncs_v1/toolchains/v2.0.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/../../../../arm-zephyr-eabi/bin/ld.exe: zephyr/subsys/random/libsubsys__random.a(rand32_entropy_device.c.obj): in function `z_impl_sys_rand32_get':
    C:\XXX\Documents\NCS_V1\v2.0.0\zephyr\subsys\random\rand32_entropy_device.c:32: undefined reference to `__device_dts_ord_98'
    c:/XXX/documents/ncs_v1/toolchains/v2.0.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/../../../../arm-zephyr-eabi/bin/ld.exe: modules/hal_nordic/nrf_802154/libnrf-802154-platform.a(nrf_802154_random_zephyr.c.obj): in function `nrf_802154_random_init':
    C:\XXX\Documents\NCS_V1\v2.0.0\zephyr\modules\hal_nordic\nrf_802154\radio\platform\nrf_802154_random_zephyr.c:32: undefined reference to `__device_dts_ord_98'
    collect2.exe: error: ld returned 1 exit status
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'c:\XXX\Documents\NCS_V1\toolchains\v2.0.0\opt\bin\cmake.EXE' --build 'c:\XXX\Documents\ZIGBEE_VS_CODE\template_test\build_2'
    The terminal process terminated with exit code: 1.

    After Ive seen your post I tried it on the 1.9.1. compiled like a charm.

    And since Im pretty new to this it almost got me ;)

    FYI: code runs fine on 2.0 for the DK, but not for the dongle.

    sorry that its not of any help, but maybe it draws some attention

  • Thank you, but mine does compile without any errors. It will simply not run after flashing.

    I just tried in version 1.9.1 and did not work either. Now I am even more confused, since I am having no problem with any of the other nordic's DKs

  • well, that was a waste on my end then,,

    good luck. 

  • Hello,

    If you try the older NCS versions (1.9.1), or the nRF5 SDK samples now, do they work? The reason I ask is because of what is said about the REGOUT0 register in this tutorial.

    I tested the blinky sample from 2.0.0 on a dongle. I programmed the default bootloader from the tutorial (link), and programmed the blinky application via nRF Connect for Desktop -> Programmer, and it works fine here.

    BR,
    Edvin

  • Thank you for your response .

    We are very familiar with using the dongle, as we have used it to prototype proofs of concept for clients extensively, not as a dongle but as a full board, sometimes powering it with external power instead of USB, and have always worked perfectly with SDK 17.1.0 and below. We always erase the flash completely and do not use the provided bootloader.

    As you mention in your tutorial, we have always modified REGOUT0 to adjust the voltage when using SDK 17. We do it even with our custom boards that we have in production with the nRF52833. We are upgrading our firmware from SDK17 to NCS.

    Currently, with NCS, the program will not even start, it is not a problem with adjusting the voltage so the LEDs work.

    We are not using the USB bootloader. We program directly in the P1 SWD interface.

    I tried in NCS 1.9.1 and it does not work either.

    I also saw on NCS that the code needed to adjust REGOUT0 is included on the board_nrf52840dongle_nrf52840_init() function inside the board.c for the dongle, as well as the code in the generated zhephyr.lst.

    Please advice.

    Thanks!

Related