mirror of https://github.com/ARMmbed/mbed-os.git
				
				
				
			LPC55S69_NS: Fix baremetal compilation error
As the `psa` library is not included in the baremetal profile, perform a TFM system reset only if the `psa` library is included in the build otherwise perform a normal CMSIS system reset.pull/11978/head
							parent
							
								
									ffdd54315f
								
							
						
					
					
						commit
						20f41a0540
					
				| 
						 | 
				
			
			@ -1,3 +1,6 @@
 | 
			
		|||
{
 | 
			
		||||
    "name": "psa"
 | 
			
		||||
    "name": "psa",
 | 
			
		||||
    "config": {
 | 
			
		||||
        "present": 1
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,6 +16,8 @@
 | 
			
		|||
 * limitations under the License.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#if MBED_CONF_PSA_PRESENT
 | 
			
		||||
 | 
			
		||||
#include "cmsis_nvic_virtual.h"
 | 
			
		||||
#include "mbed_toolchain.h"
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -25,3 +27,5 @@ void __NVIC_TFMSystemReset(void)
 | 
			
		|||
{
 | 
			
		||||
    mbed_psa_system_reset();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#endif // MBED_CONF_PSA_PRESENT
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -37,9 +37,14 @@ extern "C" {
 | 
			
		|||
#define NVIC_GetActive              __NVIC_GetActive
 | 
			
		||||
#define NVIC_SetPriority            __NVIC_SetPriority
 | 
			
		||||
#define NVIC_GetPriority            __NVIC_GetPriority
 | 
			
		||||
#if MBED_CONF_PSA_PRESENT
 | 
			
		||||
#define NVIC_SystemReset            __NVIC_TFMSystemReset
 | 
			
		||||
#else
 | 
			
		||||
#define NVIC_SystemReset            __NVIC_SystemReset
 | 
			
		||||
#endif // MBED_CONF_PSA_PRESENT
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#if MBED_CONF_PSA_PRESENT
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Overriding the default CMSIS system reset implementation by calling
 | 
			
		||||
 *        secure TFM service.
 | 
			
		||||
| 
						 | 
				
			
			@ -47,6 +52,8 @@ extern "C" {
 | 
			
		|||
 */
 | 
			
		||||
void __NVIC_TFMSystemReset(void);
 | 
			
		||||
 | 
			
		||||
#endif // MBED_CONF_PSA_PRESENT
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue