-
Notifications
You must be signed in to change notification settings - Fork 15
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
Fix ARM compiler path on Windows #49
Conversation
Looks like the compiler path changed in recent versions. I'm using Version `12.3.Rel1`, released July 28, 2023. https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads Possible fix for pd-rs#44?
Should this path really be hardcoded? Assuming the toolchain installer sets your path correctly, and it does in my case, this absolute path can just be removed, and the environment relied on. Doing this would be more robust since there will be no need to update I've confirmed this works for me: diff --git a/src/main.rs b/src/main.rs
index 25359e2..c38e9be 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -28,8 +28,7 @@ const GCC_PATH_STR: &'static str = "/usr/local/bin/arm-none-eabi-gcc";
#[cfg(all(unix, not(target_os = "macos")))]
const GCC_PATH_STR: &'static str = "arm-none-eabi-gcc";
#[cfg(windows)]
-const GCC_PATH_STR: &'static str =
- r"C:\Program Files (x86)\Arm GNU Toolchain arm-none-eabi\12.3 rel1\bin\arm-none-eabi-gcc.exe";
+const GCC_PATH_STR: &'static str = "arm-none-eabi-gcc.exe";
#[cfg(unix)]
#[allow(unused)] |
This looks like kinda breaking change for old versions and system without arm-gcc in the PATH. That's ok, but so need to bump minor version component. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, that's ok, but I'm sure there also need to mention in the readme that arm-gcc should be in path on windows.
Also, how about use my new utils to find gcc? Here is example. |
WRT the new stuff, I'm going to have to migrate to it. When I started my project, none of that was even publicly available. |
Oh look, this fixes the broken Windows test, lol. 🎉 Yeah, I can update the readme. |
Include a note about GCC ARM compiler being required in the `PATH` env var.
Looks like the compiler path changed in recent versions. I'm using Version
12.3.Rel1
, released July 28, 2023.https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads
Possible fix for #44?