Issue with FS on ESP8266

#include "FS.h"

void setup() {
  Serial.begin(115200);
  bool success = SPIFFS.begin();

  if (success) {
    Serial.println("Working");
  } else {
    Serial.println("Failed");
  }
}

void loop() {
  Serial.println("test");
  delay(2000);
}

The above code works perfectly fine while uploading with Arduino IDE but not working with platformio (uploading works but nothing being printed on serial monitor). If i comment the FS related code, it starts to work even with platformio.

Any help with this.

What is your board? Please provide platformio.ini.

[env:esp07]
platform = espressif8266
board = esp07
framework = arduino
build_flags = -Wl,-Tesp8266.flash.1m64.ld

Suddenly started to work. Really weird. Sorry for the raising this topic.