Skip to content

Commit f2d211b

Browse files
authored
Merge pull request #11978 from hugueskamba/hk-fix-lpc55s69_ns-baremetal-compilation
LPC55S69_NS: Fix baremetal compilation error
2 parents 7177d8f + 20f41a0 commit f2d211b

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

components/TARGET_PSA/mbed_lib.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
{
2-
"name": "psa"
2+
"name": "psa",
3+
"config": {
4+
"present": 1
5+
}
36
}

targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC55S69/TARGET_M33_NS/device/cmsis_nvic_virtual.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
* limitations under the License.
1717
*/
1818

19+
#if MBED_CONF_PSA_PRESENT
20+
1921
#include "cmsis_nvic_virtual.h"
2022
#include "mbed_toolchain.h"
2123

@@ -25,3 +27,5 @@ void __NVIC_TFMSystemReset(void)
2527
{
2628
mbed_psa_system_reset();
2729
}
30+
31+
#endif // MBED_CONF_PSA_PRESENT

targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC55S69/TARGET_M33_NS/device/cmsis_nvic_virtual.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,23 @@ extern "C" {
3737
#define NVIC_GetActive __NVIC_GetActive
3838
#define NVIC_SetPriority __NVIC_SetPriority
3939
#define NVIC_GetPriority __NVIC_GetPriority
40+
#if MBED_CONF_PSA_PRESENT
4041
#define NVIC_SystemReset __NVIC_TFMSystemReset
42+
#else
43+
#define NVIC_SystemReset __NVIC_SystemReset
44+
#endif // MBED_CONF_PSA_PRESENT
4145

4246

47+
#if MBED_CONF_PSA_PRESENT
4348
/**
4449
* \brief Overriding the default CMSIS system reset implementation by calling
4550
* secure TFM service.
4651
*
4752
*/
4853
void __NVIC_TFMSystemReset(void);
4954

55+
#endif // MBED_CONF_PSA_PRESENT
56+
5057
#ifdef __cplusplus
5158
}
5259
#endif

0 commit comments

Comments
 (0)