diff --git a/components/TARGET_PSA/inc/psa/service.h b/components/TARGET_PSA/inc/psa/service.h index 072195ff6f..0d2d087860 100644 --- a/components/TARGET_PSA/inc/psa/service.h +++ b/components/TARGET_PSA/inc/psa/service.h @@ -16,15 +16,18 @@ */ #if defined(TARGET_TFM) + #include "interface/include/psa_service.h" -#define SPM_PANIC(format, ...) \ -{ \ - while(1){}; \ -} +#define SPM_PANIC(format, ...) tfm_panic() + #elif defined(TARGET_MBED_SPM) + #include "TARGET_MBED_SPM/psa_defs.h" #include "TARGET_MBED_SPM/COMPONENT_SPE/spm_server.h" #include "TARGET_MBED_SPM/COMPONENT_SPE/spm_panic.h" + #else + #error "Compiling psa service header on non-secure target is not allowed" + #endif