non-secure app with UART support

Hello,

We want to use UART interface such that commands from PC to nrf5340 over UART can be received for non secure application.

We have done POC where if application is normal application it works perfectly but if we make a non-secure application we are getting linking errors.

below few trial we have done.

Problem: When we are adding uart config in Overlay file, we are getting “Undefined reference to function/Variable”

 

We have tried below options.

 

  1. Adding related configuration macros in the prj.conf file.

Eg:

CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_SERIAL=y
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_UART_0_NRF_FLOW_CONTROL=y

CONFIG_NRF_UARTE1_SECURE=n (y also )

 

CONFIG_TFM_UART1_TXD_PIN=20

CONFIG_TFM_UART1_RXD_PIN=22

 

  1. Did relevant changes in the nrf5340dk_nrf5340_cpuapp_ns.overlay file

&uart1 {

              status = "okay";

              current-speed = <115200>;

              pinctrl-0 = <&uart1_default>;

              pinctrl-1 = <&uart1_sleep>;

              pinctrl-names = "default", "sleep";

};

 

Note: When status = “disabled”, we are not getting error. Also tried with UART0.

 

  1. Tried enabling USART1 related macro in the RTE_Device.h (By Default, UART0 is correctly configured)
  2. Tried with 3 examples, but same error

(1) persistent_key_usage

(2) tfm_ secure_peripheral

(3) New main.c file

 

      5)     Tried on 3 versions of Nordic SDK V2.1.0, V2.2.0, V2.3.0. Got different undefined reference errors in each.

 

              In V2.1.0,  Got errors due to tfm APIs

              In V2.2.0, Got errors due to Device_USART1

              In v2.3.0, Got many errors.

 

  1. Added Missing function definition paths in the CMakeLists file.

 

 

I tried all above methods, but nothing worked out. 

Regards

Dilip

Related