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

Cannot find arm-none-eabi-gcc #2

Closed
pbauszat opened this issue Jan 23, 2024 · 6 comments
Closed

Cannot find arm-none-eabi-gcc #2

pbauszat opened this issue Jan 23, 2024 · 6 comments

Comments

@pbauszat
Copy link

When compiling with Visual Studio code on Windows, the ARM gcc compiler cannot be found:

Unable to resolve configuration with compilerPath "/arm-none-eabi-gcc"

The compiler directory is in $PATH$ and can be run from the terminal and powershell.
The problem only occurs when the gnuInstallRoot setting is left empty.

It seems that the issue is that VS code tries to run

/arm-none-eabi-gcc

instead of just

arm-none-eabi-gcc

@geissdoerfer
Copy link
Contributor

I can't reproduce this on Windows 10. Everything works fine with the following settings.json:

{
    "rioteeSdkRoot": "C:/Uers/Myuser/Riotee_SDK",
    "operSys": "Win32",
    "gnuInstallRoot": "",
    "files.associations": {
        "type_traits": "c",
    },
    "editor.formatOnSave": true,
}

and this in the Path variable: C:\Program Files (x86)\Arm GNU Toolchain arm-none-eabi\12.2 mpacbti-rel1\bin

Can you please post your settings.jsonand your PATH variable? Also, please insert $(info PREFIX is $(PREFIX)) in the SDK's Makefile right before the line that starts with .PHONYand post the output from terminal when trying to build the application.

@pbauszat
Copy link
Author

Here is the content of my settings.json (I set the Riotee SDK path relative and that works fine):

{
    "rioteeSdkRoot": "./../../../../Riotee_SDK",
    "sdkRoot": "./../../../../Riotee_SDK",
    "operSys": "Win32",
    "gnuInstallRoot": "",
    "files.associations": {
        "type_traits": "c",
        "riotee_timing.h": "c",
        "riotee_stella.h": "c"
    },
    "editor.formatOnSave": true,
}

And these are the warnings in the output after opening the folder in VS code:

[1/25/2024, 11:11:07 AM] Unable to resolve configuration with compilerPath "/arm-none-eabi-gcc".  Using "cl.exe" instead.
[1/25/2024, 11:11:07 AM] Unable to resolve configuration with compilerPath "/arm-none-eabi-gcc".  Using "cl.exe" instead.

This is the extra output when adding the line to the SDK's makefile:
PREFIX is ""arm-none-eabi-

@geissdoerfer
Copy link
Contributor

Ah I see, it's just the linting etc in VSC. Compliation works fine, right? I found the problem, will think of a solution.

@geissdoerfer
Copy link
Contributor

geissdoerfer commented Jan 28, 2024

I changed a definition which may fix your problem. Unfortunately, I ran into another issue that prevents IntelliSense from finding the compiler at least on on Linux. I've reported the issue here: microsoft/vscode-cpptools#11903

Please check if 7cf076f fixed your problem. If not, please add the path to your compiler under gnuInstallRootin settings.json with a trailing slash. That should make IntelliSense work for you.

@pbauszat
Copy link
Author

pbauszat commented Feb 1, 2024

The proposed bugfix does not solve the problem, because VS code then looks for the compiler in the current project directory (at least on Windows).

However, setting gnuInstallRoot does fix the problem. It's not a great solution because the configuration file now contains a hard-coded local path (hard to share code between machines) but it works for now and compilation is fine anyways as you mentioned.

Thanks! I'll close the issue for now.

@pbauszat pbauszat closed this as completed Feb 1, 2024
@geissdoerfer
Copy link
Contributor

FYI: This bug has been fixed in vscode 1.19 and you should no longer get the error message.

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