diff --git a/src/main.rs b/src/main.rs index 89f4ff2..5549413 100644 --- a/src/main.rs +++ b/src/main.rs @@ -270,11 +270,10 @@ fn run_chip(args: ArgRun, target: &mut PhysicalTarget) -> Result<(), Error> { let source_file = build_dir.join(&source_file_name); let output_file = source_file.with_extension("ihx"); - let cmd = Some(OsString::from(format!("sdcc \"{}\"", source_file_name.to_string_lossy()))); + let cmd = Some(OsString::from(format!("sdcc \"{}\"", args.path.canonicalize()?.to_string_lossy()))); let cmd_path = Some(build_dir.clone()); std::fs::create_dir_all(build_dir)?; - std::fs::copy(args.path, &source_file)?; write_chip(ArgWrite { path: output_file.into_os_string(),