forked from CHERIoT-Platform/cheriot-rtos
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathxmake.lua
41 lines (36 loc) · 1.15 KB
/
xmake.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
-- Copyright Microsoft and CHERIoT Contributors.
-- SPDX-License-Identifier: MIT
set_project("CHERIoT Compartmentalised hello world (more secure)")
sdkdir = "../../sdk"
includes(sdkdir)
set_toolchains("cheriot-clang")
option("board")
set_default("sail")
compartment("producer")
add_files("producer.cc")
compartment("consumer")
add_files("consumer.cc")
-- Firmware image for the example.
firmware("producer-consumer")
-- Both compartments need memcpy and the message queue compartment.
add_deps("freestanding", "message_queue", "debug")
add_deps("producer", "consumer")
on_load(function(target)
target:values_set("board", "$(board)")
target:values_set("threads", {
{
compartment = "producer",
priority = 1,
entry_point = "run",
stack_size = 0x500,
trusted_stack_frames = 5
},
{
compartment = "consumer",
priority = 1,
entry_point = "run",
stack_size = 0x400,
trusted_stack_frames = 3
}
}, {expand = false})
end)