From 54e491840d4098bce7d57c461609135a3eb4871a Mon Sep 17 00:00:00 2001 From: bunnie Date: Mon, 7 Mar 2022 13:17:58 +0800 Subject: [PATCH] stash to work on an aes api bug --- Cargo.lock | 23 +++++++++++++++++++++++ Cargo.toml | 1 + buildpush.ps1 | 3 ++- xtask/src/main.rs | 18 +++++++++++++++++- 4 files changed, 43 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 64a032dd0..f672d314c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -840,6 +840,29 @@ dependencies = [ "backtrace", ] +[[package]] +name = "ffi-sys" +version = "0.1.0" +dependencies = [ + "cc", +] + +[[package]] +name = "ffi-test" +version = "0.1.0" +dependencies = [ + "ffi-sys", + "log", + "log-server", + "num-derive", + "num-traits", + "susres", + "ticktimer-server", + "utralib", + "xous", + "xous-names", +] + [[package]] name = "filetime" version = "0.2.14" diff --git a/Cargo.toml b/Cargo.toml index d28461924..03e3afce2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -89,6 +89,7 @@ members = [ "apps/ball", "apps/repl", "services/libstd-test", + "services/ffi-test", "kernel", ] resolver = "2" diff --git a/buildpush.ps1 b/buildpush.ps1 index 9e3b285a4..210b673f7 100644 --- a/buildpush.ps1 +++ b/buildpush.ps1 @@ -3,7 +3,8 @@ # set RUSTFLAGS=--remap-path-prefix=F:\largework\rust-win\code\xous-core\=build # $env:RUSTFLAGS="--remap-path-prefix=$(Get-Location)=build" -cargo xtask app-image ball repl +# cargo xtask app-image ball repl +cargo xtask ffi-test # cargo xtask minimal precursors/soc.svd CertUtil -hashfile precursors/bbram-test1.nky MD5 diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 87257e560..3532f1fac 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -90,7 +90,6 @@ fn main() -> Result<(), Box> { "xous-names", "trng", "llio", - "test-stub", "susres", "com", ]; @@ -157,6 +156,7 @@ fn main() -> Result<(), Box> { "com", "graphics-server", "keyboard", + "spinor", ]; let aestest_pkgs = ["ticktimer-server", "log-server", "aes-test"]; @@ -210,6 +210,22 @@ fn main() -> Result<(), Box> { renode_image(false, &pkgs, extra_packages.as_slice(), None, Some(&["--features", "renode-bypass"]))?; } + Some("ffi-test") => { + let mut args = env::args(); + args.nth(1); + let mut pkgs = hw_pkgs.to_vec(); + pkgs.push("ffi-test"); + let args: Vec = args.collect(); + let mut extra_packages = vec![]; + for program in &args { + extra_packages.push(program.as_str()); + } + build_hw_image(false, Some("./precursors/soc.svd".to_string()), + &pkgs, None, None, None, &[], Some(&["--features", "renode-bypass"]))? + + //renode_image(false, &pkgs, extra_packages.as_slice(), + //None, Some(&["--features", "renode-bypass"]))?; + } Some("libstd-net") => { let mut args = env::args(); args.nth(1);