简体   繁体   中英

global variables on mbed uvisor

I have an aplication running on a K64F board with ARM Mbed OS. I takes advantage of the RTOS capabilities and is runnign some different threads to perform various actions. Communication between threads is done using queues defined as global variables on the first part of the code (as defined in the RTOS examples).

MemoryPool<cMsg, 16> NMPool;
Queue<cMsg, 16> NMQueue;

This way every thread can access the queue.

I want to convert these threads to uvisor isolated boxes. I have succesfully run independent threads this way but I have found no way of sharing common variables among diferent boxes. I have found no reference on how to make available the variables to the code defined in the box files that are compiled as a single project using uvisor. Any idea, example or help?

You cannot share memory between boxes, uVisor boxes run in isolated memory spaces (which is the whole point of using uVisor).

The only way to communicate between boxes is through RPC channels. See this article under the 'Expose public secure entry points to the secure box' section.

I think you can only pass primitives and struct's (because they're fixed size) over the RPC channel, but that's worth an experiment.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM