fixed, now back to working state

unstable
penguin 4 years ago
parent 87736de5b4
commit 6d0008843c

@ -22,7 +22,7 @@ pub struct IglooPrj
{
name: String,
target_bank: Vec<IglooTarget>,
project_dir: std::path::PathBuf,
pub project_dir: std::path::PathBuf,
}
@ -79,10 +79,16 @@ impl IglooPrj
let mut temp: Vec<IglooTarget> = Vec::new();
let targ = IglooTarget::from(
inst,
String::from(target_in),
&_targ_make_table_name,
&_targ_manifest_file_name).unwrap();
IglooEnvInfo::get_env_info().cwd
.join(name_in)
.join(".igloo")
.join("target")
.join(target_in),
inst,
String::from(target_in),
&_targ_make_table_name,
&_targ_manifest_file_name).unwrap();
temp.push(targ);
Ok(IglooPrj

@ -1,9 +1,13 @@
use igloo_base::*;
use igloo_base::IglooErrType::*;
use crate::config::Config;
use crate::IglooPrj;
use crate::Igloo;
use crate::config::Config;
use std::collections::HashMap;
use std::path::PathBuf;
pub struct IglooTarget
{
// name, links, and includes are extracted from a manifest
@ -12,6 +16,7 @@ pub struct IglooTarget
pub includes: Vec<config::Value>,
pub openocd: HashMap<String, config::Value>,
pub make_manifest: HashMap<String, config::Value>,
pub root: PathBuf,
}
impl IglooTarget
@ -21,6 +26,7 @@ impl IglooTarget
IglooTarget
{
name: String::from(""),
root: PathBuf::default(),
make_manifest: HashMap::default(),
links: HashMap::default(),
includes: Vec::default(),
@ -28,7 +34,7 @@ impl IglooTarget
}
}
pub fn from(inst: &Igloo, name_in: String,
pub fn from(root: PathBuf, inst: &Igloo, name_in: String,
target_make_loc: &str,
target_man_loc: &str) -> Result<IglooTarget, IglooErrType>
{
@ -93,6 +99,7 @@ impl IglooTarget
.unwrap(),
openocd: target_man.get_table("esf.openocd")
.unwrap(),
root: root,
})
}

@ -64,7 +64,7 @@ pub fn target_exists(master_mm: &Config, master_tm: &Config, name: &str)
return Err(InvalidTarget)
}
match master_mm.get_table("target.make")
match master_tm.get_table("target.make")
{
Ok(v) =>
{

Loading…
Cancel
Save