How do I use PlatformIO to flash ESP-12F (ESP8266MOD) 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.


  C:\Users\USER\.platformio\platforms\espressif8266\boards


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": [
    "wifi"
  ],
  "frameworks": [
    "arduino",
    "simba",
    "esp8266-rtos-sdk",
    "esp8266-nonos-sdk"
  ],
  "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.
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 &lt;Arduino.h&gt;
void setup() {
 pinMode(2, OUTPUT);
}

void loop() 
{
  digitalWrite(2,LOW);
  delay(200);
  digitalWrite(2,HIGH);
  delay(200);
}