Skip to content

Commit 776d110

Browse files
niklarmAlessandroA
authored andcommitted
Add MPS2 target ACLs
1 parent f3d8701 commit 776d110

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

source/main-hw.h

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,29 @@
7575
{(void *) 0x42000000, 0x01000000, UVISOR_TACLDEF_PERIPH}, /* FIXME */ \
7676
}
7777

78+
#elif defined(TARGET_MPS2)
79+
80+
#define MAIN_LED USERLED1
81+
#define SECURE_LED USERLED2
82+
#define LED_ON true
83+
#define LED_OFF false
84+
#define SECURE_SWITCH USERSW1
85+
#define SECURE_SWITCH_PULL PullUp
86+
87+
#define MAIN_ACL(acl_list_name) \
88+
static const UvisorBoxAclItem acl_list_name[] = { \
89+
{CMSDK_GPIO0, sizeof(*CMSDK_GPIO0), UVISOR_TACLDEF_PERIPH}, \
90+
{CMSDK_GPIO1, sizeof(*CMSDK_GPIO1), UVISOR_TACLDEF_PERIPH}, \
91+
{CMSDK_UART0, sizeof(*CMSDK_UART0), UVISOR_TACLDEF_PERIPH}, \
92+
{CMSDK_UART1, sizeof(*CMSDK_UART1), UVISOR_TACLDEF_PERIPH}, \
93+
{CMSDK_UART2, sizeof(*CMSDK_UART2), UVISOR_TACLDEF_PERIPH}, \
94+
{CMSDK_DUALTIMER, sizeof(*CMSDK_DUALTIMER), UVISOR_TACLDEF_PERIPH}, \
95+
}
96+
97+
#else /* Target-specific settings */
98+
99+
#error "Unsupported target. Check out the README.md file to see the list of supported targets."
100+
78101
#endif /* Target-specific settings */
79102

80103
#endif /* __UVISOR_HELLOWORLD_MAIN_HW_H__ */

0 commit comments

Comments
 (0)