{"action":"opened","issue":{"url":"https://api.github.com/repos/ARMmbed/uvisor-helloworld/issues/53","labels_url":"https://api.github.com/repos/ARMmbed/uvisor-helloworld/issues/53/labels{/name}","comments_url":"https://api.github.com/repos/ARMmbed/uvisor-helloworld/issues/53/comments","events_url":"https://api.github.com/repos/ARMmbed/uvisor-helloworld/issues/53/events","html_url":"https://github.com/ARMmbed/uvisor-helloworld/issues/53","id":130344110,"number":53,"title":"How to keep Serial instance with arguments in BOX context","user":{"login":"JaredCJR","id":8264929,"avatar_url":"https://avatars.githubusercontent.com/u/8264929?v=3","gravatar_id":"","url":"https://api.github.com/users/JaredCJR","html_url":"https://github.com/JaredCJR","followers_url":"https://api.github.com/users/JaredCJR/followers","following_url":"https://api.github.com/users/JaredCJR/following{/other_user}","gists_url":"https://api.github.com/users/JaredCJR/gists{/gist_id}","starred_url":"https://api.github.com/users/JaredCJR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JaredCJR/subscriptions","organizations_url":"https://api.github.com/users/JaredCJR/orgs","repos_url":"https://api.github.com/users/JaredCJR/repos","events_url":"https://api.github.com/users/JaredCJR/events{/privacy}","received_events_url":"https://api.github.com/users/JaredCJR/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-01T12:03:26Z","updated_at":"2016-02-01T12:03:26Z","closed_at":null,"body":"Hi,\r\nI would like to create a BOX that need to use USART3 in STM32F429i-Discovery.\r\nHowever,I am confused about how to keep an `Serial` instance in the secure BOX.\r\n\r\nWhy I want to do this is because I found that if the `Serial` instance is declared outside the BOX_Context,the background ACLs of the main box still needs the permission to access USART3.\r\n\r\n`Serial mri_port(PB_10,PB_11); placed in struct` is invalid syntax in C++, so I am wondering how to keep the `Serial` instance secret with arguments.\r\n \r\n\r\n```C\r\n#define BOX_ACL(acl_list_name)                      \\                                                                                                              \r\n    static const UvisorBoxAclItem acl_list_name[] = {     \\\r\n        {GPIOB,  sizeof(*GPIOB),  UVISOR_TACLDEF_PERIPH}, \\\r\n        {RCC,    sizeof(*RCC),    UVISOR_TACLDEF_PERIPH}, \\\r\n        {USART3, sizeof(*USART3), UVISOR_TACLDEF_PERIPH}, \\\r\n    }\r\n\r\n\r\ntypedef struct {\r\n    Serial mri_port(PB_10,PB_11);//USART3 pins in STM32F429\r\n    uint32_t val;\r\n} BOX_Context;\r\n\r\n\r\n/* create ACLs for secret data section */\r\nBOX_ACL(g_new_box_acl);                                                                                                                                          \r\n\r\n\r\n/* configure secure box compartment and reserve box context */\r\nUVISOR_BOX_CONFIG(new_box, g_new_box_acl, UVISOR_BOX_STACK_SIZE, BOX_Context);\r\n\r\n```\r\nThanks."}}