Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Add MPS2 ACLs #22

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
.DS_Store
.build
BUILD
gdb.script
*.sw*
mbed_settings.py*
/mbed-os/
/firmware.*
/debug.elf
/debug.elf
2 changes: 1 addition & 1 deletion mbed_app.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"target_overrides": {
"K64F": {
"*": {
"target.features_add": ["UVISOR"],
"target.extra_labels_add": ["UVISOR_SUPPORTED"]
}
Expand Down
20 changes: 20 additions & 0 deletions source/main-hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
#define MAIN_BTN SW2
#define MAIN_BTN_PUPD PullUp

#if defined TARGET_K64F

#define MAIN_ACL(acl_list_name) \
static const UvisorBoxAclItem acl_list_name[] = { \
{SIM, sizeof(*SIM), UVISOR_TACLDEF_PERIPH}, \
Expand All @@ -48,4 +50,22 @@
{SPI0, sizeof(*SPI0), UVISOR_TACLDEF_PERIPH}, \
}

#elif defined TARGET_MPS2

#define MAIN_ACL(acl_list_name) \
static const UvisorBoxAclItem acl_list_name[] = { \
{CMSDK_GPIO0, sizeof(*CMSDK_GPIO0), UVISOR_TACLDEF_PERIPH}, \
{CMSDK_GPIO1, sizeof(*CMSDK_GPIO1), UVISOR_TACLDEF_PERIPH}, \
{CMSDK_UART0, sizeof(*CMSDK_UART0), UVISOR_TACLDEF_PERIPH}, \
{CMSDK_UART1, sizeof(*CMSDK_UART1), UVISOR_TACLDEF_PERIPH}, \
{CMSDK_UART2, sizeof(*CMSDK_UART2), UVISOR_TACLDEF_PERIPH}, \
{CMSDK_DUALTIMER, sizeof(*CMSDK_DUALTIMER), UVISOR_TACLDEF_PERIPH}, \
}

#else

#error "Target not supported."

#endif

#endif /* __UVISOR_HELLOWORLD_MAIN_HW_H__ */