-
Notifications
You must be signed in to change notification settings - Fork 168
enable_icache gives linker error #245
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
Comments
Huh, the same Could you try On a random test build I just did from clean against cortex-m master, I see:
|
I've tried it on both Windows 10 and Ubuntu 18.04 now. Same result. Both had My target folder does contain a libcortex-m-rt.a, but not a libcortex-m.a. |
Something's definitely wrong if you're not getting a
The build script is responsible for copying the relevant target binary archive into
How are you depending on cortex-m? If you're using a git path, maybe it would be worth checking out the repository and trying a |
This is my verbose output:
I don't see the out folder mentioned with a So the build script is built and it is executed. |
Oh, right, nuts, I think I've worked out what the issue is. If you disable the |
Ah I see! I took a look at the build script and saw this if statement: if target.starts_with("thumb") && env::var_os("CARGO_FEATURE_INLINE_ASM").is_none() {
fs::copy(
format!("bin/{}.a", target),
out_dir.join(format!("lib{}.a", name)),
).unwrap();
println!("cargo:rustc-link-lib=static={}", name);
println!("cargo:rustc-link-search={}", out_dir.display());
} It only copies the libcortex-m.a if inline asm is turned off. |
Looks like we both realised at the same time. I've opened the PR above which should fix this, though I'm not sure if there's any disadvantage of always linking the prebuilt object. |
245: Change macros crate to same version as cortex-m-rt r=jonas-schievink a=adamgreig Closes #244 Co-authored-by: Adam Greig <[email protected]>
Hey all,
when enabling the ICache, I now get this linker error:

It seems it's got to do with the change in #234.
The __enable_icache symbol that's defined in the assembly can't be found.
I'm compiling for the stm32h743 on the latest nightly (rustc 1.46.0-nightly (346aec9b0 2020-07-11)).
My .cargo/config (it's just the default I believe):
I've tried the commented options as well, but that didn't help.
The text was updated successfully, but these errors were encountered: