"pins_arduino.h: No such file or directory" with megaatmega2560

I’ve seen the error “pins_arduino.h: No such file or directory” in a number of posts here. They seem to be about framework packages missing. But I’m using a pretty common board and framework. I’m trying to compile an old marlin project that worked in the arduino ide. My platformio.ini file …

[env:megaatmega2560]
platform = atmelavr
board = megaatmega2560
framework = arduino

I tried changing the framework to the two packages I found at C:\Users\<user>\.platformio\packages, framework-arduino-avr and framework-arduino-avr-megacore. Both of those gave the error that the board doesn’t support the framework. Shouldn’t there be a framework-arduino package?

I tried deleting my .platformio folder and resintalling and I also tried deleting my .vscode folder. Neither worked.

I tried creating a new project in a copy of my old arduino-ide folder. I also tried using the import arduino project. They gave the same results.

What should I try next?

I just cloned the marlin 2.0 repo from github and it has the same problem. As I said before, I’ve reinstalled platformio. I have no idea where to go from here.

Is this a compiler error or an IntelliSense error? Can you build simple blinky sketches?

1 Like

I uninstalled vscode completely. Then I deleted the .platformio and .vscode folders from my user home. After reinstalling everything the problem is gone. This has been a pita.