Sometimes a baord package installs, however for some reason not all files are deployed correctly.
The below guide helps to clear the cached items, forcing a fresh download of all components the next time they are installed.
Example Corruption
One example of this is when you run a build, and the first command fails with the below, showing the compiler was not installed correctly.
arm-none-eabi-g++*: fatal error: cannot execute cc1plus: CreateProcess: No such file or directory
1. Locate the Staging Folder
Enable the vMicro > Compiler > Show Build Properties option.
Compile your project.
Search the output for "vmresolved.tools.path" which should give an entry similar to the below:
C:\Users\YourUsername\AppData\Local\Arduino15\packages\STMicroelectronics\tools\xpack-arm-none-eabi-gcc\13.2.1-1.1
Navigate to the "Arduino15" folder in Windows Explorer (i.e C:\Users\YourUsername\AppData\Local\Arduino15
).
Leave this window open to use in step 3.
2. Uninstall the Board Package
From the Micro Explorer > Board Manager, uninstall the affected board package by clicking on it.
Now close all instances of Visual Studio and the Arduino IDE if they are open.
3. Clear the Staging Folder
Delete the C:\Users\YourUsername\AppData\Local\Arduino15\staging
folder, which you can see in the window left open from step 1.
4. Reinstall the Board Package
Open Visual Studio, and reinstall the board package again from the Micro Explorer > Board Manager tab.
The whole package will be downloaded afresh, and then installed again.