Calling secure function from non secure area in TF-M threadx
Hi, need support. send_msg() is a secure area message of TF-M and I am calling it in non secure area via secure_nsc API.
What I am observing here is that I am not able to call this function in _tx_initialize_kernel_enter() function after the call to TX_PORT_SPECIFIC_PRE_INITIALIZATION. Just to mention this experiment is happening from STM32U585 board. Below is the code snippet for this.
VOID _tx_initialize_kernel_enter(VOID)
{
/* Determine if the compiler has pre-initialized ThreadX. */
if (_tx_thread_system_state != TX_INITIALIZE_ALMOST_DONE)
{
/* No, the initialization still needs to take place. */
/* Ensure that the system state variable is set to indicate
initialization is in progress. Note that this variable is
later used to represent interrupt nesting. */
_tx_thread_system_state = TX_INITIALIZE_IN_PROGRESS;
/* Call any port specific preprocessing. */
TX_PORT_SPECIFIC_PRE_INITIALIZATION
send_msg();
.
.
.
.
.
}
