In order to be able to use uart1 as a hardware UART to talk to another microcontroller, we defined pins for uart1 in an overlay file (and created a new build configuration so that the overlay file would be applied), and added this to our proj.conf (as explained on this page):
CONFIG_BUILD_WITH_TFM=y
CONFIG_TFM_LOG_LEVEL_SILENCE=y
However, in our code, this line still causes an error:
const struct device *uart_dev = DEVICE_DT_GET(DT_NODELABEL(uart1));
Do you know why? What do we need to do to be able to use uart1?