mirror of https://github.com/ARMmbed/mbed-os.git
Allow non-secure main thread to call secure functions
parent
43b98cf405
commit
0b00d0ce11
|
@ -321,6 +321,12 @@ void mbed_start_main(void)
|
|||
_main_thread_attr.cb_mem = &_main_obj;
|
||||
_main_thread_attr.priority = osPriorityNormal;
|
||||
_main_thread_attr.name = "main_thread";
|
||||
|
||||
/* Allow non-secure main thread to call secure functions */
|
||||
#if defined(DOMAIN_NS) && (DOMAIN_NS == 1U)
|
||||
_main_thread_attr.tz_module = 1U;
|
||||
#endif
|
||||
|
||||
osThreadId_t result = osThreadNew((osThreadFunc_t)pre_main, NULL, &_main_thread_attr);
|
||||
if ((void *)result == NULL) {
|
||||
MBED_ERROR1(MBED_MAKE_ERROR(MBED_MODULE_PLATFORM, MBED_ERROR_CODE_INITIALIZATION_FAILED), "Pre main thread not created", &_main_thread_attr);
|
||||
|
|
Loading…
Reference in New Issue