This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Thread SDK hardcodes UART pins

From what I can tell, the SDK for Thread provided from Nordic uses a precompiled Openthread library that hardcodes the UART pin configuration. This means that users of this SDK must modify and recompile the library manually if they want to use the Thread SDK on their own boards with different pin configurations. The Openthread library is meant to compile as a platform independent binary, and the Nordic supplied SDK should include the specific lower layer code separately. This along with an application/board specific sdk-config.h file would allow the required flexibility.

Are there any plans to support this?

Thanks!

Parents
  • Hello,

    It looks like you are correct. Please let me check with the guys working on our OpenThread solution, and I will let you know. For all I know they are already planning to do this. "Our" OpenThread (the one used in the Thread SDK) library is still in the development stage.

     

    I will forward your feedback, and I will get back to you!

     

    Best regards,

    Edvin

     

  • Ok that sounds great thanks!

    As an example of where this can be problematic, I'm trying to build an Openthread application that uses UART1 for printf functionality, since UART0 is already used in the Openthread code that's compiled within the library. I get a linker error as follows:

    ../../make/../sdk/nrf5_sdk_15.0.0_thread/external/openthread/lib/gcc/libopenthread-nrf52840-sdk.a(libopenthread_nrf52840_sdk_a-uart.o): In function `UARTE0_UART0_IRQHandler':
    /build/KNG-OL-JOB1/openthread/examples/../examples/platforms/nrf52840/uart.c:273: multiple definition of `UARTE0_UART0_IRQHandler'
    _build/nrfx_prs.o:nrfx_prs.c:(.text.UARTE0_UART0_IRQHandler+0x0): first defined here
    collect2: error: ld returned 1 exit status
    ../../make/Makefile:675: recipe for target '_build/thread_hello_world_blank.hex' failed
    make: *** [_build/thread_hello_world_blank.hex] Error 1

    I am almost certain I've set up my sdk_config.h correctly. I've disabled UART0, UARTE0, and ensured nrf_drv_uart and app_uart use UART1. Here is my sdk_config.h just in case I missed a define or two and someone is willing to look it over. I'm having a very hard time tracing down where UARTE0_UART0_IRQHandler is defined within all the platform/device macros. I don't see where it would be defined in nrfx_prs.c.

Reply
  • Ok that sounds great thanks!

    As an example of where this can be problematic, I'm trying to build an Openthread application that uses UART1 for printf functionality, since UART0 is already used in the Openthread code that's compiled within the library. I get a linker error as follows:

    ../../make/../sdk/nrf5_sdk_15.0.0_thread/external/openthread/lib/gcc/libopenthread-nrf52840-sdk.a(libopenthread_nrf52840_sdk_a-uart.o): In function `UARTE0_UART0_IRQHandler':
    /build/KNG-OL-JOB1/openthread/examples/../examples/platforms/nrf52840/uart.c:273: multiple definition of `UARTE0_UART0_IRQHandler'
    _build/nrfx_prs.o:nrfx_prs.c:(.text.UARTE0_UART0_IRQHandler+0x0): first defined here
    collect2: error: ld returned 1 exit status
    ../../make/Makefile:675: recipe for target '_build/thread_hello_world_blank.hex' failed
    make: *** [_build/thread_hello_world_blank.hex] Error 1

    I am almost certain I've set up my sdk_config.h correctly. I've disabled UART0, UARTE0, and ensured nrf_drv_uart and app_uart use UART1. Here is my sdk_config.h just in case I missed a define or two and someone is willing to look it over. I'm having a very hard time tracing down where UARTE0_UART0_IRQHandler is defined within all the platform/device macros. I don't see where it would be defined in nrfx_prs.c.

Children
No Data
Related