Skip to content

Conversation

@TaliPerry
Copy link

xtask and builder:

  • Add hex output for ROMs (needed by all HW standard tools).
  • Consolidate platform parsing.
  • Add support for any fpga platform (use "contains" to detect such platforms).
  • Remove double function.

Signed-off-by: Tali Perry [email protected]

Comment on lines +68 to +82
let mut xxd_cmd = Command::new("xxd");

let xxd_result = xxd_cmd
.arg("-p")
.arg("-c")
.arg("8")
.arg(&rom_binary)
.arg(&hex_binary)
.output();

println!("Building {:?}", &hex_binary);

if xxd_result.is_err() || !xxd_result.as_ref().unwrap().status.success() {
bail!("xxd failed to build ROM hex");
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like it could work well as a native Rust routine, otherwise we should document that xxd is a dependency for the builder tool.

Also, it would be good to include a comment that describes the shape of the hex data. Currently you would need to read the xxd manual to understand this snippet.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I will check. meanwhile I was told by the HW folks that I need to split it to two hex files, for two consecutive ROMs. I'm not sure if it's something specific to us or for everyone so I will remove it completely. hex is probably for all chip vendors. a split hex is probably specific to the FAB.

It would be nice for debugging to have an output ASM file too. If it's OK for all users I can add it too to this commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants