Beware that this post is related to an SDK in maintenance mode
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

SDK 15 legacy UART header problem

I'm converting an SDK 14.2.0 project to SDK 15.0.0, initially using the legacy layer. 

The documentation states that:

"The UART default configuration is located in sdk_config.h. If UARTE is present on the chip, the driver can be configured at runtime to support UART mode, UARTE mode, or both. The following example shows how to configure the driver to support both modes in runtime and have legacy mode as the default:

#ifdef NRF52
#define UART0_USE_EASY_DMA        false
#define UART_EASY_DMA_SUPPORT     1
#define UART_LEGACY_SUPPORT       1
#endif //NRF52

However legacy mode appears to only allow either UART_EASY_DMA_SUPPORT or UART_LEGACY_SUPPORT to be set to 1, not both. If both are set to 1, the legacy layer header apply_old_config.h sets both NRFX_UART_ENABLED and NRFX_UARTE_ENABLED to 1. This in turn means that the contents of both nrfx_uart.c and nrfx_uarte.c are compiled, and the linker then complains that there are multiple definitions of function UARTE0_UART0_IRQHandler(), which are actually renamed functions nrfx_uart_0_irq_handler() and nrfx_uarte_0_irq_handler().

If I set only one of the UART_EASY_DMA_SUPPORT and UART_LEGACY_SUPPORT options to 1, the project compiles and links without any problems.

Parents Reply Children
No Data
Related