Openthread example on Feather-nrf52840 (express)

Hey there, to start of i am absolutely new to riot. I have recently got hands on some feather-nrf52840 boards. I can flash the hello world example without an issue, but getting the openthread example to work is just way ahead of my current understanding of riot. First of the board is not in the Makefile whitelist. So i added it manually, after which (to no surprise) i get an exception: /opt/gnu-mcu-eclipse/arm-none-eabi-gcc/gcc-arm-none-eabi-10.3-2021.10/bin/…/lib/gcc/arm-none-eabi/10.3.1/…/…/…/…/arm-none-eabi/bin/ld: DWARF error: section .debug_str is larger than its filesize! (0x7d2f8 vs 0x507c4) /home/myname/esp/RIOT/examples/openthread/bin/feather-nrf52840/openthread_contrib/platform_uart.o:/home/myname/esp/RIOT/pkg/openthread/contrib/platform_uart.c:83: undefined reference to uart_init' /opt/gnu-mcu-eclipse/arm-none-eabi-gcc/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: /home/myname/esp/RIOT/examples/openthread/bin/feather-nrf52840/openthread_contrib/platform_uart.o:/home/myname/esp/RIOT/pkg/openthread/contrib/platform_uart.c:97: undefined reference to uart_write’ collect2: error: ld returned 1 exit status

Is there an easy fix to this or do i need to write some code on my own to get it working? (even some docs to look into would be helpful)

Thanks in advance :slight_smile:

Hi subplot and welcome to the community.

From what I can find, the feather-nrf52840 makes use of USB serial (CDC ACM) by default to provide a shell and doesn’t have a built-in usb serial converter on the board to expose UART serial in a convenient way to the host computer.

Openthread with the current platform bindings in RIOT only supports UART for the Openthread shell and requires a board with UART exposed for the shell. This is the reason why the feather-nrf52840 is not in the whitelist I think.

The feather-nrf52840 can be switched to use UART for the stdio and not USB serial, by adding USEMODULE += stdio_uart to the application makefile. See also the feather-nrf52840 documentation under “Terminal”. This exposes UART on pin 24 and 25, marked as RX and TX on the board.

So adding USEMODULE += stdio_uart should fix the compilation issue you ran into, at the cost of requiring an extra USB serial converter.

If you’re willing to put in more effort and want to keep using the USB port on the board, the next step would be to write a platform uart implementation which uses the CDC ACM implementation in RIOT.