diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 25022994d..324360e7d 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -166,11 +166,35 @@ fn main() -> Result<(), Box> { let kkey = args.nth(4); match task.as_deref() { Some("renode-image") => { - generate_app_menus(&vec!["ball".to_string()]); + let mut args = env::args(); + args.nth(1); + let mut pkgs = hw_pkgs.to_vec(); + let mut apps: Vec = args.collect(); + if apps.len() == 0 { // add the standard demo apps if none are specified + println!("No apps specified, adding default apps..."); + apps.push("ball".to_string()); + apps.push("repl".to_string()); + } + for app in &apps { + pkgs.push(app); + } + generate_app_menus(&apps); renode_image(false, &hw_pkgs, &[])? }, Some("renode-test") => { - generate_app_menus(&vec!["ball".to_string()]); + let mut args = env::args(); + args.nth(1); + let mut pkgs = hw_pkgs.to_vec(); + let mut apps: Vec = args.collect(); + if apps.len() == 0 { // add the standard demo apps if none are specified + println!("No apps specified, adding default apps..."); + apps.push("ball".to_string()); + apps.push("repl".to_string()); + } + for app in &apps { + pkgs.push(app); + } + generate_app_menus(&apps); renode_image(false, &cbtest_pkgs, &[])? }, Some("libstd-test") => {