How to adapt the Radio Test sample to nRF52840 dongle?

Hi  Nordic

i would like to adapt radio test sample to nRF52840 dongle from based on pca10056.

can you help to check below steps are correct?

1- Followed  the the instruction :  nRF52840 Dongle Programming Tutorial - Getting Started - nRF5 SDK guides - Nordic DevZone (nordicsemi.com),

2-  added below UART pins definition into pca11059.h, for example

#define RX_PIN_NUMBER NRF_GPIO_PIN_MAP(1,1)
#define TX_PIN_NUMBER NRF_GPIO_PIN_MAP(1,2)
#define CTS_PIN_NUMBER NRF_GPIO_PIN_MAP(1,4)
#define RTS_PIN_NUMBER NRF_GPIO_PIN_MAP(1,7) 

3- Programming and use p1.1 and p1.2 for uart communiction.

//

SDK : nRF5_SDK_17.1.0_ddde560\examples\peripheral\radio_test\pca10056

SEGGER Embedded Studio for ARM 7.12a

Thanks.

  • Hello, I had tried that approach, but there appears to be something wrong because I am not able to click the write button.
     

  • Hi,

    What is the address range of the application? The MBR (Master Boot Record) occupies 0x-0xFFF on the nRF52840 dongle, so you need to make sure your application starts after this. In addition, the USB bootloader starts at 0xE0000 and occupies the rest of the flash, so this should also be reserved. This should automatically be configured when you build for the dongle (nrf52840dongle_nrf52840), but if it is not, you can use static partitioning. See Configuring static partitions for more information on this.

    Best regards,
    Marte

  • Hi, you were correct I was building for the incorrect device, however now that I have corrected that and am using nrf52840dongle_nrf52840 I am running into the following build error:

    warning: CONSOLE_HANDLER (defined at drivers/console/Kconfig:27) was assigned the value 'y' but got the value 'n'. 

    In addition, when I tried to add the dongle as the device to build for it was not in the list of compatible devices. I am attaching the config log as well as a screen shot of my build cofig setup, can you please let me know if you see what is going wrong?

    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/nrfWorkspace/radio_test
    -- CMake version: 3.20.5
    -- Found Python3: C:/ncs/toolchains/ffa23e2f3e/opt/bin/python.exe (found suitable version "3.8.2", minimum required is "3.8") found components: Interpreter
    -- Cache files will be written to: C:/ncs/v2.5.0-rc2/zephyr/.cache
    -- Zephyr version: 3.4.99 (C:/ncs/v2.5.0-rc2/zephyr)
    -- Found west (found suitable version "1.1.0", minimum required is "0.14.0")
    -- Board: nrf52840dongle_nrf52840
    -- Found host-tools: zephyr 0.16.1 (C:/ncs/toolchains/ffa23e2f3e/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.1 (C:/ncs/toolchains/ffa23e2f3e/opt/zephyr-sdk)
    -- Found Dtc: C:/ncs/toolchains/ffa23e2f3e/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found BOARD.dts: C:/ncs/v2.5.0-rc2/zephyr/boards/arm/nrf52840dongle_nrf52840/nrf52840dongle_nrf52840.dts
    -- Found devicetree overlay: boards/nrf52840dongle_nrf52840.overlay
    -- Generated zephyr.dts: C:/nrfWorkspace/radio_test/build/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: C:/nrfWorkspace/radio_test/build/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: C:/nrfWorkspace/radio_test/build/zephyr/dts.cmake

    warning: CONSOLE_HANDLER (defined at drivers/console/Kconfig:27) was assigned the value 'y' but got
    the value 'n'. Check these unsatisfied dependencies: UART_CONSOLE (=n), CONSOLE (=n). See
    docs.zephyrproject.org/.../kconfig.html and/or look up
    CONSOLE_HANDLER in the menuconfig/guiconfig interface. The Application Development Primer, Setting
    Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful
    too.

    Parsing C:/ncs/v2.5.0-rc2/zephyr/Kconfig
    Loaded configuration 'C:/ncs/v2.5.0-rc2/zephyr/boards/arm/nrf52840dongle_nrf52840/nrf52840dongle_nrf52840_defconfig'
    Merged configuration 'C:/nrfWorkspace/radio_test/prj.conf'
    Merged configuration 'C:/nrfWorkspace/radio_test/nrf52840dongle_nrf52840.conf'
    Configuration saved to 'C:/nrfWorkspace/radio_test/build/zephyr/.config'
    Kconfig header saved to 'C:/nrfWorkspace/radio_test/build/zephyr/include/generated/autoconf.h'
    -- Found GnuLd: c:/ncs/toolchains/ffa23e2f3e/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe (found version "2.38")
    -- The C compiler identification is GNU 12.2.0
    -- The CXX compiler identification is GNU 12.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/ncs/toolchains/ffa23e2f3e/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    -- Configuring incomplete, errors occurred!
    See also "C:/nrfWorkspace/radio_test/build/CMakeFiles/CMakeOutput.log".
    See also "C:/nrfWorkspace/radio_test/build/CMakeFiles/CMakeError.log".
    FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\ffa23e2f3e\opt\bin\cmake.EXE' -DWEST_PYTHON=C:/ncs/toolchains/ffa23e2f3e/opt/bin/python.exe '-Bc:\nrfWorkspace\radio_test\build' -GNinja -DBOARD=nrf52840dongle_nrf52840 -DNCS_TOOLCHAIN_VERSION:STRING=NONE -DOVERLAY_CONFIG:STRING=nrf52840dongle_nrf52840.conf -DDTC_OVERLAY_FILE:STRING=boards/nrf52840dongle_nrf52840.overlay '-DBOARD_ROOT:STRING=c:/nrfworkspace/blinky_pwm;c:/nrfworkspace/radio_test;c:/nrfworkspace/nrf_ex_radiotest;c:/nrfworkspace/radio_test_1' '-Sc:\nrfWorkspace\radio_test'

  • Hi,

    alliebarrett said:
    In addition, when I tried to add the dongle as the device to build for it was not in the list of compatible devices

    This is because the dongle is not officially supported in the sample.

    alliebarrett said:
    however now that I have corrected that and am using nrf52840dongle_nrf52840 I am running into the following build error:

    warning: CONSOLE_HANDLER (defined at drivers/console/Kconfig:27) was assigned the value 'y' but got the value 'n'. 

    Since the sample does not support the dongle out of the box, you need to apply the changes in my first comment in this ticket: RE: How to adapt the Radio Test sample to nRF52840 dongle? , specifically adding the two files nrf52840dongle_nrf52840.conf, and boards/nrf52840dongle_nrf52840.overlay, and making the changes to CMakeLists.txt and main.c as I mention there.

    Best regards,
    Marte

Related