I create a blinking LED code using PIN 15 of ESP32-S2 and the code was running smoothly if I upload the code using Arduino IDE:
void setup() {
pinMode(15, OUTPUT);
}
void loop() {
digitalWrite(15, HIGH);
delay(5000);
digitalWrite(15, LOW);
delay(5000);
}
Below is my configuration in Arduino IDE:
I implement the same code using PlatformIO but the code is not running (LED was not blinking) although the code was successfully uploaded.
I build board.json for my custom board:
{
"build": {
"arduino": {
"ldscript": "esp32s2_out.ld"
},
"core": "esp32",
"extra_flags": "-DARDUINO_ESP32S2_DEV",
"f_cpu": "240000000L",
"f_flash": "40000000L",
"flash_mode": "qio",
"mcu": "esp32s2",
"variant": "esp32s2"
},
"connectivity": [
"wifi"
],
"debug": {
"openocd_target": "esp32s2.cfg"
},
"frameworks": [
"arduino",
"espidf"
],
"name": "Espressif Ferbos-ESP32-S2",
"upload": {
"flash_size": "2MB",
"maximum_ram_size": 327680,
"maximum_size": 2097152,
"require_upload_port": true,
"speed": 460800
},
"url": "ferbos",
"vendor": "Espressif"
}
and my platform.ini file contains this:
[env:ferbos_esp32s2]
platform = espressif32
board = ferbos-esp32-s2
framework = arduino
board_build.mcu = esp32s2
board_build.f_cpu = 240000000L
board_build.f_flash = 40000000L
board_build.flash_mode = qio
board_build.flash_size = 2MB
board_build.partitions = min_spiffs.csv
board_build.psram_type = disabled
upload_protocol = esptool
upload_speed = 921600
monitor_speed = 115200
what is the exact problem that I face? is there any misconfiguration in my platformio?