This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

cmse_nonsecure_entry Functions dont have SG instruction


I am currently using IAR for developing a Secure and Non Secure application on an STM32U575.

I am calling a function on the secure app from the non-secure app. The function has an added __attribute__( ( cmse_nonsecure_entry ) ) to it which are required for secure entry functions.

Upon examining the disassembly of the instruction the entry function doesnt have a Secure Gateway (SG) instruction but instead tagged as "DC32".

This causes a Bus Fault error as expected since the program wasnt able to transition from non-secure to secure without the SG instruction.

There seems to be no problem with the linker files and the compiler options. 

Would anyone be able to know what the problem is here?