1. What does "cmse_check_adress_range" function return?
2. Using "__attribute__((cmse_nonsecure_entry))" means that after passing the parameters to caller function, the r0-r3 register immediately cleared by hareware?
When i was creating a project following AN291, i had some problems below:
1.After creating the "secure project", i didn't find the file "Test_s_CMSE_Lib.o" in the object file. I don't konw why. (please see the picture and the red rectangle)
2. And I wonder how can i find the "get filetype for 'Test_s_CMSE_Lib.o' " in the picture below?
AN291, page 14
Thanks a lot!
Hi Wenchuan,
I can help with your first two questions:
Wenchuan said:1. What does "cmse_check_adress_range" function return?
cmse_check address_range returns a void pointer. If the check is successful the returned pointer will have the same value as the one you passed in (p) if the check failed it will be NULL.
Wenchuan said:. Using "__attribute__((cmse_nonsecure_entry))" means that after passing the parameters to caller function, the r0-r3 register immediately cleared by hareware?
The attribute will not cause those registers to be cleared as they are needed to pass parameters. That attribute is used to allow non-secure code to call into the secure code.
BR,
Pete.
Hi Peter,
Thanks for reply.
Question 1 solved! Thanks a lot!
For question 2, I see some contradictory. Picture below from AN291 page 7.
Can you explain more detailed?
Thanks!