[ISSUE] Arm GCC not found, even though it is installed

Hello,

I am trying to compile a local project using VSCode Particle workbench extension, on Windows 10.

I have been reading a lot of different forum posts about this topic, and I’ve followed the workflows of getting files out of OneDrive, disabling extensions, installing and reinstalling the device toolchain, checking the Environment Audit, doing an Environment reset, even clean uninstalling and reinstalling VSCode and the Particle Workbench extension, but nothing seems to be working so far. The gcc-arm-10.2.1 installs correctly, but for whatever reason the compiler can’t find it. I can’t locally compile a blank project for the Argon board using DeviceOS@4.0.0. The error is shown here:

The only other notable thing is this message from Intellisense, which I don’t think is an issue:

and environment audit is shown here, notably, the validPath has true, and gcc-arm-10.2.1 has true in the audit as well. Any guidance would be very much appreciated! Thank you!

{
“username”: “”,
“workspace”: {
“name”: “FirstProject”,
“isWorkspace”: false,
“folders”: [
{
“location”: “d:\Particle\FirstProject”,
“hasValidPath”: true,
“settings”: {
“firmwareName”: “deviceOS”,
“firmwareVersion”: “4.0.0”,
“targetDevice”: “”,
“targetPlatform”: “argon”,
“compileButtonAction”: “localAppDeviceOS”,
“flashButtonAction”: “localAppDeviceOS”,
“disableWelcomeScreen”: false,
“disableDeviceOSOutdatedCheck”: false,
“disableLocalCompilerDirtyCheck”: false,
“enableVerboseLocalCompilerLogging”: false,
“compileDefines”: ,
“customDeviceOSLocation”: “”,
“maxAllowedToolchains”: 4
},
“files”: [
“.vscode”,
“.vscode\c_cpp_properties.json”,
“.vscode\launch.json”,
“.vscode\settings.json”,
“project.properties”,
“README.md”,
“src”,
“src\FirstProject.cpp”,
“src\FirstProject.ino”
]
}
]
},
“cli”: {
“binpath”: “c:\Users\gavin\.vscode\extensions\particle.particle-vscode-core-1.15.6\src\cli\bin\windows\amd64\particle.exe”,
“ok”: true,
“version”: “3.5.0”
},
“localCompiler”: {
“ok”: true,
“dependencies”: [
{
“id”: “deviceOS@4.0.0”,
“ok”: true
},
{
“id”: “gcc-arm@10.2.1”,
“ok”: true
},
{
“id”: “buildtools@1.1.1”,
“ok”: true
},
{
“id”: “buildscripts@1.11.0”,
“ok”: true
},
{
“id”: “openocd@0.11.0-particle.4”,
“ok”: true
}
]
},
“platform”: {
“os”: “windows”,
“type”: “Windows_NT”,
“release”: “10.0.19044”,
“arch”: “x64”,
“path”: {
“key”: “Path”,
“value”: “C:\Python310\Scripts\;C:\Python310\;C:\Program Files\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\MATLAB\R2019b\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Git\cmd;C:\Program Files\dotnet\;D:\nodeJS\;C:\ProgramData\chocolatey\bin;D:\PuTTY\;C:\Users\gavin\AppData\Local\Microsoft\WindowsApps;C:\Users\gavin\flutter\bin;;C:\Users\gavin\AppData\Roaming\npm;D:\Microsoft VS Code\bin”,
“entries”: [
“C:\Python310\Scripts\”,
“C:\Python310\”,
“C:\Program Files\Common Files\Oracle\Java\javapath”,
“C:\WINDOWS\system32”,
“C:\WINDOWS”,
“C:\WINDOWS\System32\Wbem”,
“C:\WINDOWS\System32\WindowsPowerShell\v1.0\”,
“C:\WINDOWS\System32\OpenSSH\”,
“C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL”,
“C:\Program Files\Intel\Intel(R) Management Engine Components\DAL”,
“C:\Program Files\Intel\WiFi\bin\”,
“C:\Program Files\Common Files\Intel\WirelessCommon\”,
“C:\Program Files\MATLAB\R2019b\bin”,
“C:\Program Files\Microsoft SQL Server\130\Tools\Binn\”,
“C:\Program Files\Git\cmd”,
“C:\Program Files\dotnet\”,
“D:\nodeJS\”,
“C:\ProgramData\chocolatey\bin”,
“D:\PuTTY\”,
“C:\Users\gavin\AppData\Local\Microsoft\WindowsApps”,
“C:\Users\gavin\flutter\bin”,
“”,
“C:\Users\gavin\AppData\Roaming\npm”,
“D:\Microsoft VS Code\bin”
]
},
“homeDir”: “C:\Users\gavin”,
“particleDir”: “C:\Users\gavin\.particle”,
“particleToolchainDir”: “C:\Users\gavin\.particle\toolchains”
},
“env”: {
“ALLUSERSPROFILE”: “C:\ProgramData”,
“APPDATA”: “C:\Users\gavin\AppData\Roaming”,
“APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL”: “1”,
“ChocolateyInstall”: “C:\ProgramData\chocolatey”,
“ChocolateyLastPathUpdate”: “133084230476107548”,
“CHROME_CRASHPAD_PIPE_NAME”: “\\.\pipe\crashpad_28996_RNVUSQWVFWAYTUWA”,
“CommonProgramFiles”: “C:\Program Files\Common Files”,
“CommonProgramFiles(x86)”: “C:\Program Files (x86)\Common Files”,
“CommonProgramW6432”: “C:\Program Files\Common Files”,
“COMPUTERNAME”: “DESKTOP-IDDJD24”,
“ComSpec”: “C:\WINDOWS\system32\cmd.exe”,
“DriverData”: “C:\Windows\System32\Drivers\DriverData”,
“ELECTRON_RUN_AS_NODE”: “1”,
“HOME”: “C:\Users\gavin\AppData\Roaming\SPB_Data”,
“HOMEDRIVE”: “C:”,
“HOMEPATH”: “\Users\gavin”,
“LOCALAPPDATA”: “C:\Users\gavin\AppData\Local”,
“LOGONSERVER”: “\\DESKTOP-IDDJD24”,
“NUMBER_OF_PROCESSORS”: “8”,
“OneDrive”: “C:\Users\gavin\OneDrive”,
“OneDriveConsumer”: “C:\Users\gavin\OneDrive”,
“ORIGINAL_XDG_CURRENT_DESKTOP”: “undefined”,
“OS”: “Windows_NT”,
“Path”: “C:\Python310\Scripts\;C:\Python310\;C:\Program Files\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\MATLAB\R2019b\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Git\cmd;C:\Program Files\dotnet\;D:\nodeJS\;C:\ProgramData\chocolatey\bin;D:\PuTTY\;C:\Users\gavin\AppData\Local\Microsoft\WindowsApps;C:\Users\gavin\flutter\bin;;C:\Users\gavin\AppData\Roaming\npm;D:\Microsoft VS Code\bin”,
“PATHEXT”: “.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW”,
“PROCESSOR_ARCHITECTURE”: “AMD64”,
“PROCESSOR_IDENTIFIER”: “Intel64 Family 6 Model 142 Stepping 10, GenuineIntel”,
“PROCESSOR_LEVEL”: “6”,
“PROCESSOR_REVISION”: “8e0a”,
“ProgramData”: “C:\ProgramData”,
“ProgramFiles”: “C:\Program Files”,
“ProgramFiles(x86)”: “C:\Program Files (x86)”,
“ProgramW6432”: “C:\Program Files”,
“PSModulePath”: “C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules”,
“PUBLIC”: “C:\Users\Public”,
“SESSIONNAME”: “Console”,
“SystemDrive”: “C:”,
“SystemRoot”: “C:\WINDOWS”,
“TEMP”: “C:\Users\gavin\AppData\Local\Temp”,
“TMP”: “C:\Users\gavin\AppData\Local\Temp”,
“USERDOMAIN”: “DESKTOP-IDDJD24”,
“USERDOMAIN_ROAMINGPROFILE”: “DESKTOP-IDDJD24”,
“USERNAME”: “gavin”,
“USERPROFILE”: “C:\Users\gavin”,
“VBOX_MSI_INSTALL_PATH”: “C:\Program Files\Oracle\VirtualBox\”,
“VSCODE_AMD_ENTRYPOINT”: “vs/workbench/api/node/extensionHostProcess”,
“VSCODE_CODE_CACHE_PATH”: “C:\Users\gavin\AppData\Roaming\Code\CachedData\d045a5eda657f4d7b676dedbfa7aab8207f8a075”,
“VSCODE_CWD”: “D:\Microsoft VS Code”,
“VSCODE_HANDLES_UNCAUGHT_ERRORS”: “true”,
“VSCODE_IPC_HOOK”: “\\.\pipe\1a5a6355688b3dfd932791dfa9432f74-1.72.2-main-sock”,
“VSCODE_NLS_CONFIG”: “{"locale":"en-us","availableLanguages":{},"_languagePackSupport":true}”,
“VSCODE_PID”: “28996”,
“windir”: “C:\WINDOWS”
},
“versions”: {
“node”: “16.14.2”,
“v8”: “10.2.154.15-electron.0”,
“uv”: “1.43.0”,
“zlib”: “1.2.11”,
“brotli”: “1.0.9”,
“ares”: “1.18.1”,
“modules”: “106”,
“nghttp2”: “1.45.1”,
“napi”: “8”,
“llhttp”: “6.0.4”,
“openssl”: “1.1.1”,
“cldr”: “40.0”,
“icu”: “70.1”,
“tz”: “2022b”,
“unicode”: “14.0”,
“electron”: “19.0.17”,
“microsoft-build”: “15825693”
},
“vscode”: {
“appName”: “Visual Studio Code”,
“appRoot”: “d:\Microsoft VS Code\resources\app”,
“machineId”: “420ef1b7fb41c4f8c1db108eacda8972005c3c6276e5f5a1b183b8e133e9b838”,
“sessionId”: “79738975-5f53-46aa-a3e4-84bec95330971667329960540”,
“version”: “1.72.2”
},
“extensions”: [
{
“id”: “ms-vscode-remote.remote-wsl-recommender”,
“version”: “0.0.17”
},
{
“id”: “ms-vscode.js-debug”,
“version”: “1.72.1”
},
{
“id”: “ms-vscode.js-debug-companion”,
“version”: “1.0.18”
},
{
“id”: “ms-vscode.vscode-js-profile-table”,
“version”: “1.0.3”
},
{
“id”: “cschlosser.doxdocgen”,
“version”: “1.4.0”
},
{
“id”: “marus25.cortex-debug”,
“version”: “1.6.6”
},
{
“id”: “ms-vscode-remote.remote-containers”,
“version”: “0.255.4”
},
{
“id”: “ms-vscode-remote.remote-ssh”,
“version”: “0.90.1”
},
{
“id”: “ms-vscode-remote.remote-wsl”,
“version”: “0.72.0”
},
{
“id”: “ms-vscode.cpptools”,
“version”: “1.12.4”
},
{
“id”: “particle.particle-vscode-core”,
“version”: “1.15.6”
},
{
“id”: “particle.particle-vscode-pack”,
“version”: “1.15.6”
},
{
“id”: “particle.particle-vscode-snippets”,
“version”: “1.15.6”
},
{
“id”: “particle.particle-vscode-theme”,
“version”: “1.15.6”
},
{
“id”: “PKief.material-icon-theme”,
“version”: “4.21.0”
}
]
}

hm. very odd. couple of things worth trying just to maybe learn more:

  1. run the Particle: Launch Compiler Shell command then execute which arm-none-eabi-gcc and share what it prints out. from there, it couldn’t hurt to try running a build with: make -f $PARTICLE_MAKEFILE compile-user (as documented in the usage output)

  2. try creating a new project on your C:\ drive: from within VSCode + Workbench, run the Particle: Create Project command then from the main menu select Terminal > Run Task… > Particle > Particle: Compile application (local). if that builds successfully, try copying the entire project directory to your D:\ drive and re-running the build task against that then share your findings

Alright so when I run the which arm-none-eabi-gcc command, I get the following result,


Which u think that it is encouraging that the shell can find it.

So now, get this for the compiling part.
When I ran the make -f $PARTICLE_MAKEFILE compile-user, it seemed like it made it pretty far, building files, invoking the ARM-GCC C Compiler, UNTIL it got to here:

Then when I ran it again, it made it even further and then it failed here:

Each time I have ran the make -f $PARTICLE_MAKEFILE compile-user command, it seems to be failing in a different directory, all of a sudden unable to find the ARM gcc compiler. Really strange lol

When created a new project within my C:\ drive, it generated the same error as before.

Hi, I wonder if you ran the previous command from a terminal inside VS Code. If not, can you?

Could it be that there is a path or environment variable that is set on your windows console or powershell that VS Code does not pick up?

What if you compare the output of the env (or printenv? I forgot) command on powershell, a Windows console (CMD) and a terminal inside VS Code?

2 Likes

it seems to be failing in a different directory, all of a sudden unable to find the ARM gcc compiler

hm. very strange. fwiw, that error comes from here:

I think your intuition is right. Looking at the Path variable in the user environment:

Here’s the output of CMD:

Here’s the output of Powershell:

And here’s the output of the VS Code terminal:

At the very end of the output, the VS Code terminal does not have the …gcc_arm\10.2.1\bin

So now just need to get VS Code to pick up on that…

alright! What if you add it to the global environment variables on Windows itself?

Dangit, now I’m confused again. I added the arm compiler to the system and my user environment variables, and it shows up in the VS Code terminal,

and the Compiler bash terminal,
image

But it still can’t find the arm-gcc compiler…

VSCode/Windows are offering tremendous resistance. Wow.
How about you do this next?

Well, update. In (admittedly, in a little bit of a rage) I created in a new project in my C:\ drive, I uninstalled and reinstalled the device toolchain 4.0.0 I was working with in my .particle\toolchains\ folder, and lo and behold I have seen my first “compiled successfully” message. I am very confused as to why it just worked all of a sudden. But I’ll keep monitoring it.

1 Like