My student has issues with cannot find "avr-gcc"

My student has a Windows 10 PRO system. He cannot compile. The file c_cpp_properties.json file says that there is a problem: cannot find “avr-gcc”

Also in main () the program doesn’t recognize the include file “Arduino.h”
It says it cannot open source file “avr/prmspace.h” file.

He gets a compile error so it does not recognize the Arduino library. He can run the Arduino IDE and everything works fine, but the Platform IO gives errors.

Here is a snipet of his file

Here is a snipet of the properties.json file

and here is a snipet of the compiler errors

Looks like a incomplete or broken toolchain package. Remove the folders C:\Users\jacks\.platformio\packages\toolchain-atmelavr as well as C:\Users\jacks\.platformio\.cache and retry building. Make sure you have a stable internet connection while the toolchain is being redownloaded.

It could also be that an antivirus is blocking the invocation.

If more weird errors arise, remove the whole C:\Users\jacks\.platformio\packages\ folder and retry.

Thank you very much for the quick response! I will let you know if that worked

I had exactly the same errors this morning when I installed Platformio on a virtual Linux machine after opening a project in VS code (and NOT through the Platformio extension!)

I ended up re-installing the atmel-AVR extension (in the Platforms tab within Pio home window), restarted VS code and then reloaded the project this time through the Platformio home->Projects screen, this solved my issue.

I think you’ll find that that file should be avr/pgmspace.h, and not avr/prmspace.h.