cancel
Showing results for 
Search instead for 
Did you mean: 

Difficulty using serial prints or HAL_UART_TRANSMIT from Nonsecure world via callback api

SAlam.2
Associate

Hello,

I am trying to mimic the STM32 Example code, UART_Trace_TrustZone, to have my nonsecure world use a secure callback to print to the serial port after being initialized. However, only my secure world prints to the serial port. Ideally, I would also see the non secure world print to the serial port as well after the Nonsecure_init() function is called.

I have tried copying the same strategy as the example, writing the same SECURE_TraceMessage function as them, however I am still out of luck. I followed this video when setting up TrustZone (https://www.youtube.com/watch?v=0mSsKxzYj3s)

I attached my secure and non secure worlds as well as my IOC file. I will eventually be using X-Cube-AI for my other tasks but currently have those functions commented out to try and just get the TrustZone features working. Any help would be appreciated.

Also not sure if this is a common issue, but when generating the code if you run into build errors in the secure world regarding the libraries,

Right click the secure world project

  • In Project --> Properties --> C/C++ General --> Paths and Symbols --> Libraries, add ":NetworkRuntime600_CM33_GCC.a"
  • In Project --> Properties --> C/C++ General --> Paths and Symbols --> Library Paths, add "../Middlewares/ST/AI/Lib"

0 REPLIES 0