Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"unknown target" error when attempting disassembly of any function #184

Open
GregWoods opened this issue May 18, 2020 · 1 comment
Open

Comments

@GregWoods
Copy link

Although cargo asm doesn't work for embedded,
cargo asm --target thumbv7em-none-eabihf does work. It produces a huge list of functions, both mine, and for all the dependencies.

If I now try to add a path by copy-pasting my 'main' function from the huge list, I get an error...

cargo asm --target thumbv7em-none-eabihf stm32f4_05_serial::__cortex_m_rt_main

[ERROR][cargo_asm::target]
[C:\Users\gregw\.cargo\registry\src\github.com-1ecc6299db9ec823\cargo-asm-0.1.16\src\target.rs:37]
: unknown target

I also tried combinations of:

cargo asm --target thumbv7em-none-eabihf stm32f4_05_serial::__cortex_m_rt_main
cargo asm --target=thumbv7em-none-eabihf stm32f4_05_serial::__cortex_m_rt_main
cargo asm --target thumbv7em-none-eabihf -- stm32f4_05_serial::__cortex_m_rt_main
cargo asm --target thumbv7em-none-eabihf stm32f4_05_serial::__cortex_m_rt_main()

Any suggestions?

@JOE1994
Copy link

JOE1994 commented Jul 19, 2020

I had the exact same issue, and the reason was that I wasn't using the latest version of cargo-asm.

Instead of doing cargo install cargo-asm (which probably fetches installation from Crates.io),
Try running cargo install --git https://github.com/gnzlbg/cargo-asm.git.

After overriding my installation of cargo-asm, the first option among the four combinations
(cargo asm --target thumbv7em-none-eabihf stm32f4_05_serial::__cortex_m_rt_main) works fine for me 😃

I hope this works for you as well

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

No branches or pull requests

2 participants