-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from arkedge/feature/run-subobc-example-on-c2a…
…-runtime Run examples/subobc on c2a-sils-runtime
- Loading branch information
Showing
4 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
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,17 @@ | ||
[package] | ||
name = "c2a-example-subobc" | ||
version.workspace = true | ||
edition = "2021" | ||
|
||
[dependencies] | ||
c2a-core.workspace = true | ||
|
||
# runtime | ||
c2a-sils-runtime.workspace = true | ||
|
||
# ifimpl | ||
c2a-uart-kble.workspace = true | ||
c2a-wdt-noop.workspace = true | ||
|
||
[build-dependencies] | ||
cmake = "0.1" |
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,22 @@ | ||
fn main() { | ||
// Build C2A & link | ||
let mut c2a_cmake = cmake::Config::new("."); | ||
let libc2a = c2a_cmake | ||
.very_verbose(true) | ||
.define("USE_32BIT_COMPILER", "ON") | ||
.define("BUILD_C2A_AS_C99", "ON") | ||
.define("BUILD_C2A_AS_SILS_FW", "ON") | ||
.define("USE_SCI_COM_WINGS", "OFF") | ||
.build_target("C2A"); | ||
|
||
println!("cargo:rerun-if-changed=./CMakeLists.txt"); | ||
println!("cargo:rerun-if-changed=./src/src_core"); | ||
println!("cargo:rerun-if-changed=./src/src_user"); | ||
|
||
let libc2a = libc2a.build(); | ||
println!( | ||
"cargo:rustc-link-search=native={}/build", // no install step in libC2A | ||
libc2a.display() | ||
); | ||
println!("cargo:rustc-link-lib=static=C2A"); | ||
} |
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,9 @@ | ||
use c2a_sils_runtime as c2a_runtime; | ||
|
||
extern crate c2a_uart_kble; | ||
extern crate c2a_wdt_noop; | ||
|
||
fn main() { | ||
c2a_runtime::c2a_init(); | ||
c2a_runtime::c2a_main(); | ||
} |