In PlatformIO while creating a project , in the board selection there is no ESP-12F in the boards. While there is ESP-12E. I can flash ESP-12F while choosing ESP-12E from the boards without any flashing issue. But there are some runtime issues, the one that I noticed is the LED doesn't blink when flashed from PlatformIO , but works fine, when flashed using Arduino IDE using the same code. So there may be some difference in the configurations.


In this directory I found the esp-12e board which is a JSON format.

  "build": {
    "core": "esp8266",
    "extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP12",
    "f_cpu": "80000000L",
    "f_flash": "40000000L",
    "flash_mode": "dio",
    "ldscript": "eagle.flash.4m1m.ld",
    "mcu": "esp8266",
    "variant": "nodemcu"
  "connectivity": [
  "frameworks": [
  "name": "Espressif ESP8266 ESP-12E",
  "upload": {
    "maximum_ram_size": 81920,
    "maximum_size": 4194304,
    "require_upload_port": true,
    "resetmethod": "nodemcu",
    "speed": 115200
  "url": "http://www.esp8266.com/wiki/doku.php?id=esp8266-module-family",
  "vendor": "Espressif"

How do I add ESP-12F to the PlatformIO boards and flashing without any issue.

  • 1
    Ask platformIO... it's their responsibility to keep their boards packages up to date for their platform...
    – Majenko
    Sep 18, 2019 at 8:59
  • @Majenko Thanks for the direction!! :)
    – Khaalidi
    Sep 18, 2019 at 12:18

1 Answer 1


At the PlatformIO community I asked the same question, and pfeerick suggested to add a build flag.

It’s most likely the onboard LED is on GPIO2, not GPIO1 so try adding

build_flags = -D LED_BUILTIN=2 to your platformio.ini … hopefully that kicks in before the pins_arduino.h defintion.

But It didn't did the trick. And the compiler throws a bunch of warnings. What I did to make it work is to ignore LED_BUILTIN constant and use 2 instead. 😎😎😎😎😎🤣🤣

#include <Arduino.h>
void setup() {
 pinMode(2, OUTPUT);

void loop() 
  • The build flags shouldn't have a space after the "D". build_flags = -DLED_BUILTIN=2
    – Makotosan
    Mar 12, 2021 at 19:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.