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

ble_thread_dyn_mtd_coap_cli_pca10056_s140 with 2 UARTES

Hello

I would like to use both UARTES in the exemple "ble_thread_dyn_mtd_coap_cli_pca10056_s140". 

I tried to adapt this example using the example "nRF5_SDK_for_Thread_and_Zigbee_v4.0.0_dc7186b \ examples \ peripheral \ serial_uartes" but I have link problems with libraries that are in common between my program and the SoftDevice ...

How can I fix it?


Thank you

Parents
  • Hi,

    The OpenThread libraries are by default built with support for UART (for NCP and CLI). If you want to use UART0 for another purpose, you need to build the libraries without UART. These steps should work:

    1. Start with a fresh copy of the SDK, and make sure you place it as close to the ROOT of the hard drive as possible.
    2. Modify the file in external\openthread\project\nrf52840\openthread_nrf52840\softdevice\uart\armgcc\Makefile and comment out/remove all lines involving UART:
      1. #  $(PROJ_DIR)/../openthread/examples/platforms/nrf528xx/src/uart.c \
      2. #CFLAGS += -DOPENTHREAD_CONFIG_NCP_UART_ENABLE=1
      3. #CFLAGS += -DUART_AS_SERIAL_TRANSPORT=1
      4. #ASMFLAGS += -DOPENTHREAD_CONFIG_NCP_UART_ENABLE=1
      5. #ASMFLAGS += -DUART_AS_SERIAL_TRANSPORT=1
    3. Open command line and go to [nRF5 SDK for Thread and Zigbee v4.0.0 ROOT]\external\openthread\project.
    4. Enter the following commands:
      git clone https://github.com/openthread/openthread.git
      cd openthread
      git checkout 8a1992e2e42fb707babe9491a6a1456e553490e8
      cd ..
      make -C nrf52840\openthread_nrf52840\softdevice\uart\armgcc
    5. Open the SES project. Under directory 'OpenThread' in the project browser, remove the file named 'libopenthread-nrf52840-softdevice-sdk.a'.
    6. Add the file external\openthread\project\nrf52840\openthread_nrf52840\softdevice\uart\armgcc\libopenthread-nrf52840-softdevice-sdk.a to the project.
    7. Remove the following preprocessor symbols in the SES project settings:
      1. CFLAGS += -DNRFX_PRS_ENABLED=0
      2. CFLAGS += -DUART0_ENABLED=0
      3. CFLAGS += -DUART1_ENABLED=1

    Best regards,
    Jørgen

  • Hello

    I'm sorry but I have an issue with the point number 4. When I enter the command "make -C nrf52840\openthread_nrf52840\softdevice\uart\armgcc" I have this response:

    But I notice that there are a difference in the GNU version (the mine is "C:\Program Files (x86)\GNU Tools Arm Embedded\9 2019-q4-major")

    How can I change this script ?

    Thank you

Reply Children
No Data
Related