nRF5 SDK is not maintained anymore
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Adding UART code to the 'light switch server' project

Hi,

I am evaluating the nRF52840-DK and wanted to add some debug code to the UART.

I have used the same libraries as the 'UART_PCA10056 (which works), but when the code is linked an error comes as follows:-

Please advise where to look at for this error.

Parents Reply Children
  • Hi Paul, 

    It turned out that the serial library in the mesh SDK is not capable of printing out a string so there is a buffer needed (this is implemented inside the serial.c library which related to mesh serialization, which we don't plan to use here). 
    So we need to use the app_uart library in nRF5 SDK instead (this is the library that the log in nRF5 SDK uses).

    I attached here the example I made for SDK v4.0 . Basically you need to add app_fifo, app_uart_fifo and retarget.c 
    log.c is modified to log_serial.c to print out to serial instead of RTT. 
    light_switch - SerialLog.zip

Related