Hello guys Im having problem with Building this basic program:
#include <Arduino.h>
// put function declarations here:
int myFunction(int, int);
void setup() {
// put your setup code here, to run once:
int result = myFunction(2, 3);
}
void loop() {
// put your main code here, to run repeatedly:
}
// put function definitions here:
int myFunction(int x, int y) {
return x + y;
}
And when I try to build it I get this error:
- Looking for pins_arduino.h dependency? Check our library registry!
- CLI > platformio lib search “header:pins_arduino.h”
- Web > PlatformIO Registry
#include “pins_arduino.h”
^~~~~~~~~~~~~~~~
compilation terminated.
*** [.pio\build\esp32dev\FrameworkArduino\FunctionalInterrupt.cpp.o] Error 1
============================ [FAILED] Took 13.30 seconds ============================
Please help me how to solve this!
Many thanks in advance
Please share the content of your platformio.ini
as preformatted-text.
Okay
…
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; Redirecting...
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
…
must exist or when custom json board require be variant of existed board
There is nothing unusual in your platformio.ini
It looks like your platform / framework installation has been broken.
- Close VS Code
- delete
C:\Users\<username>\.platformio\platforms\espressif32
- delete
C:\Users\<username>\.platformio\packages\framework-arduinoespressif32
- Start VS Code
- Wait until PlatformIO finished all tasks (reinstalling the platform / framework)
- Try to build the project again