Closed ryankurte closed 5 years ago
If it's alright with y'all I might just merge this as a WIP and we can keep building in more PRs?
For cargo objcopy? Maybe I was trying the wrong set of args but I couldn't get it to work without specifying --bin
or --example
pointing to the bin or example name, I opened an issue https://github.com/rust-embedded/cargo-binutils/issues/36 about arguments and defaults.
Seems to be a bug in cargo-binutils
, typically if you have a src/main.rs
you don't need to specify either --bin
or --example
. In fact it's a rather annoying bug that it doesn't work automatically, because for single-binary crates you'll have to specify the crate name itself:
# cargo objcopy --release --bin stm32f4-smoltcp-demo -- -O binary out.bin
Compiling stm32f4-smoltcp-demo v0.1.0 (/Users/egger/OSS/stm32f4-smoltcp-demo)
Finished release [optimized + debuginfo] target(s) in 3.42s
But what I meant to ask was: Do we have a section somewhere that describes which options to use when to select the correct binary?
because for single-binary crates you'll have to specify the crate name itself
yep, that's what i got working / all i intended to convey in those examples
Do we have a section somewhere that describes which options to use when to select the correct binary?
aha! no we don't, mostly because i couldn't work out what those options should be (and switched back to arm-none-eabi-objcopy
because of it), it'd be an excellent addition if you're up for it?
Probably to be split into separate sections when complete? I got sidetracked by other issues before finishing though so it's still WIP.