-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move CHERI auto demo to separate directory
Reorganises the automotive demo to place the CHERI-specific code in its own CHERI directory, to mirror the organisation used for non-CHERIoT legacy firmware, and to more clearly modularise and separate the two implementations of the demo library.
- Loading branch information
1 parent
37499b3
commit 72e04e7
Showing
5 changed files
with
66 additions
and
60 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
-- Copyright lowRISC Contributors. | ||
-- SPDX-License-Identifier: Apache-2.0 | ||
|
||
-- Compartments used for the automotive demo firmware | ||
compartment("automotive_send") | ||
add_deps("lcd", "debug") | ||
add_files( | ||
"../lib/automotive_common.c", | ||
"../lib/automotive_menu.c", | ||
"../lib/no_pedal.c", | ||
"../lib/joystick_pedal.c", | ||
"../lib/digital_pedal.c", | ||
"../lib/analogue_pedal.c" | ||
) | ||
add_files("send.cc") | ||
|
||
compartment("automotive_receive") | ||
add_deps("lcd", "debug") | ||
add_files("../lib/automotive_common.c") | ||
add_files("receive.cc") | ||
|
||
-- Automotive demo: Sending Firmware (1st board) (CHERIoT version) | ||
firmware("automotive_demo_send_cheriot") | ||
add_deps("freestanding", "automotive_send") | ||
on_load(function(target) | ||
target:values_set("board", "$(board)") | ||
target:values_set("threads", { | ||
{ | ||
compartment = "automotive_send", | ||
priority = 2, | ||
entry_point = "entry", | ||
stack_size = 0x1000, | ||
trusted_stack_frames = 3 | ||
} | ||
}, {expand = false}) | ||
end) | ||
after_link(convert_to_uf2) | ||
|
||
-- Automotive Demo: Receiving Firmware (2nd board) | ||
firmware("automotive_demo_receive") | ||
add_deps("freestanding", "automotive_receive") | ||
on_load(function(target) | ||
target:values_set("board", "$(board)") | ||
target:values_set("threads", { | ||
{ | ||
compartment = "automotive_receive", | ||
priority = 2, | ||
entry_point = "entry", | ||
stack_size = 0x1000, | ||
trusted_stack_frames = 5 | ||
} | ||
}, {expand = false}) | ||
end) | ||
after_link(convert_to_uf2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,4 @@ | ||
-- Copyright lowRISC Contributors. | ||
-- SPDX-License-Identifier: Apache-2.0 | ||
|
||
compartment("automotive_send") | ||
add_deps("lcd", "debug") | ||
add_files("../../third_party/automotive_demo/automotive_common.c") | ||
add_files("../../third_party/automotive_demo/automotive_menu.c") | ||
add_files("../../third_party/automotive_demo/no_pedal.c") | ||
add_files("../../third_party/automotive_demo/joystick_pedal.c") | ||
add_files("../../third_party/automotive_demo/digital_pedal.c") | ||
add_files("../../third_party/automotive_demo/analogue_pedal.c") | ||
add_files("send.cc") | ||
|
||
compartment("automotive_receive") | ||
add_deps("lcd", "debug") | ||
add_files("../../third_party/automotive_demo/automotive_common.c") | ||
add_files("receive.cc") | ||
|
||
-- Automotive demo (CHERIoT version) | ||
firmware("automotive_demo_send") | ||
add_deps("freestanding", "automotive_send") | ||
on_load(function(target) | ||
target:values_set("board", "$(board)") | ||
target:values_set("threads", { | ||
{ | ||
compartment = "automotive_send", | ||
priority = 2, | ||
entry_point = "entry", | ||
stack_size = 0x1000, | ||
trusted_stack_frames = 3 | ||
} | ||
}, {expand = false}) | ||
end) | ||
after_link(convert_to_uf2) | ||
|
||
-- Automotive Demo: Receive Firmware (2nd board) | ||
firmware("automotive_demo_receive") | ||
add_deps("freestanding", "automotive_receive") | ||
on_load(function(target) | ||
target:values_set("board", "$(board)") | ||
target:values_set("threads", { | ||
{ | ||
compartment = "automotive_receive", | ||
priority = 2, | ||
entry_point = "entry", | ||
stack_size = 0x1000, | ||
trusted_stack_frames = 5 | ||
} | ||
}, {expand = false}) | ||
end) | ||
after_link(convert_to_uf2) | ||
includes("cheri", "legacy") |