Skip to content

Commit 373b0ba

Browse files
committed
CMSIS 5: Virtualize NVIC_SystemReset
This applies only when the virtualization option is explicitly set. Currently only uVisor virtualizes the NVIC APIs.
1 parent 2866e21 commit 373b0ba

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

hal/targets/cmsis/core_cm3.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1353,6 +1353,7 @@ typedef struct
13531353
#define NVIC_GetActive __NVIC_GetActive
13541354
#define NVIC_SetPriority __NVIC_SetPriority
13551355
#define NVIC_GetPriority __NVIC_GetPriority
1356+
#define NVIC_SystemReset __NVIC_SystemReset
13561357
#endif /* CMSIS_NVIC_VIRTUAL */
13571358

13581359
#ifdef CMSIS_VECTAB_VIRTUAL
@@ -1581,7 +1582,7 @@ __STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGr
15811582
15821583
The function initiates a system reset request to reset the MCU.
15831584
*/
1584-
__STATIC_INLINE void NVIC_SystemReset(void)
1585+
__STATIC_INLINE void __NVIC_SystemReset(void)
15851586
{
15861587
__DSB(); /* Ensure all outstanding memory accesses included
15871588
buffered write are completed before reset */

hal/targets/cmsis/core_cm4.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1518,6 +1518,7 @@ typedef struct
15181518
#define NVIC_GetActive __NVIC_GetActive
15191519
#define NVIC_SetPriority __NVIC_SetPriority
15201520
#define NVIC_GetPriority __NVIC_GetPriority
1521+
#define NVIC_SystemReset __NVIC_SystemReset
15211522
#endif /* CMSIS_NVIC_VIRTUAL */
15221523

15231524
#ifdef CMSIS_VECTAB_VIRTUAL
@@ -1747,7 +1748,7 @@ __STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGr
17471748
17481749
The function initiates a system reset request to reset the MCU.
17491750
*/
1750-
__STATIC_INLINE void NVIC_SystemReset(void)
1751+
__STATIC_INLINE void __NVIC_SystemReset(void)
17511752
{
17521753
__DSB(); /* Ensure all outstanding memory accesses included
17531754
buffered write are completed before reset */

0 commit comments

Comments
 (0)