Multi-NUS on the nRF21540-DK

I have succeeded in running the Multi-NUS package on the nRF52840DK. My client's client learned of the nRF21540EK and wants to try using it to extend the range in the present application. Is there an equivalent of the Multi-NUS package available for this board? Fallback would be an NUS application whereby i could gather the routines to access the control lines for the 21540 and merge it with the Multi-NUS software.

  • Thank you for responding to that much. I am still standing by for a way to configure the project for the nRF21540.

  • I thought that I have given you enough information on how to work with the nRF51540 EK and the integration notes around it. Maybe it is better to work step by step with errors you get. What error are you getting after at this point?

  • The problem is not errors. I simply cannot find a way to set the configuration for the nRF21540. The only "board" that shows up is the nRF52840DK. There is most likely some path configured incorrectly. But what?

  • If you have used the Toolchain manager to install the SDK, then the only path that matters is the path to the toolchain folder as I showed earlier.

    If you have set it right, and removed your old build folder, then it should show up all the boards

    If it doesn't, then your toolchain is not properly installed. I did not see that behavior myself before. So if the problem persists, you can attach your project here and I can try to resolve the dependencies.

  • The word "should" is a wonderful modifier. The tools "should" do a lot of things.

    By non-intuitively deleting the build configuration, and then non-intuitively selecting non-Nordic boards, notwithstanding the "Nordic" printed all over the 21540 DK, I was able to select the "nRF21540 DK NRF52840" configuration. Then doing "Build Configuration", I get a very long string of build script, ending with this:

    In file included from D:\Nordic\v1.9.1\zephyr\include\toolchain.h:50,
                     from D:\Nordic\v1.9.1\zephyr\include\sys\printk.h:11,
                     from D:\Nordic\v1.9.1\zephyr\include\sys\__assert.h:11,
                     from D:\Nordic\v1.9.1\zephyr\include\drivers\gpio.h:18,
                     from D:\Nordic\v1.9.1\nrf\subsys\mpsl\fem\mpsl_fem.c:8:
    D:/Nordic/v1.9.1/nrf/subsys/mpsl/fem/mpsl_fem.c: In function 'fem_nrf21540_gpio_configure':
    D:\Nordic\v1.9.1\zephyr\include\toolchain\gcc.h:61:36: error: static assertion failed: ""
       61 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
          |                                    ^~~~~~~~~~~~~~
    D:\Nordic\v1.9.1\nrf\subsys\mpsl\fem\mpsl_fem.c:280:2: note: in expansion of macro 'BUILD_ASSERT'
      280 |  BUILD_ASSERT(
          |  ^~~~~~~~~~~~
    [194/236] Building C object zephyr/kernel/CMakeFiles/kernel.dir/errno.c.obj
    [195/236] Linking C static library modules\nrf\subsys\mpsl\init\lib..__nrf__subsys__mpsl__init.a
    [196/236] Building C object zephyr/kernel/CMakeFiles/kernel.dir/init.c.obj
    [197/236] Building C object modules/nrf/subsys/bluetooth/controller/CMakeFiles/..__nrf__subsys__bluetooth__controller.dir/hci_driver.c.obj
    [198/236] Building C object zephyr/kernel/CMakeFiles/kernel.dir/fatal.c.obj
    [199/236] Building C object zephyr/kernel/CMakeFiles/kernel.dir/kheap.c.obj
    [200/236] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mem_slab.c.obj
    [201/236] Building C object modules/nrf/drivers/mpsl/flash_sync/CMakeFiles/..__nrf__drivers__mpsl__flash_sync.dir/flash_sync_mpsl.c.obj
    [202/236] Building C object zephyr/subsys/bluetooth/host/CMakeFiles/subsys__bluetooth__host.dir/gatt.c.obj
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'd:\Nordic\v1.9.1\toolchain\opt\bin\cmake.EXE' --build 'd:\304\FW\Hook\examples\ble_central\multi-NUS-master21540\build'
    The terminal process terminated with exit code: 1.

    Terminal will be reused by tasks, press any key to close it.

    Apparently an ASSERT macro is trying to warn me about something, but I can't figure out its meaning. Next??

Related