Unknown board ID 'esp07s' - why?

Using PlatformIO on Windows10 I have been building a project for the Adafruit Huzzah breakout board which uses an ESP-12 device.
Now I want to build it for an ESP-07S device because it has a WiFi antenna connector. The reason is that the on-board antenna is not sensitive enough so I need an external antenna. Otherwise the project works fine on the Huzzah.

So I have created a new environment setting for it by copying the original and replacing the board designator as follows (from my platformio.ini file):

[env:esp07s-serial]
platform = espressif8266@2.5.2
board = esp07s
;board_build.flash_mode = dout
framework = arduino
lib_deps = 
	tzapu/WiFiManager@^0.16.0
	knolleary/PubSubClient@^2.8
	paulstoffregen/OneWire@^2.3.7
	milesburton/DallasTemperature@^3.11.0
	arduino-libraries/NTPClient@^3.2.1
upload_speed = 115200
upload_port = COM4
monitor_speed = 115200
monitor_port = COM4

But what happens is that when I hit build for this environment it complains as follows:

Executing task: C:\Users\Bosse\.platformio\penv\Scripts\platformio.exe run --environment esp07s-serial 

Processing esp07s-serial (platform: espressif8266@2.5.2; board: esp07s; framework: arduino)
-------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
Error: Unknown board ID 'esp07s'

I have no idea why this happens, the board is part of the Espressif framework as far as I can understand, so what can I do to get this to work?

Found out why it did not build:

The platform version (here 2.5.2) is not compatible with the esp07s board, probably it did not yet exist at that time…
So I removed the platform version info altogether and now it does build and I can upload to the board and run the code. :slight_smile:

However there is still a problem here because the ESP-07S has 4M flash and still the build process outputs this:

Building in release mode
Retrieving maximum program size .pio\build\esp07s-OTA\firmware.elf
Checking size .pio\build\esp07s-OTA\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [=====     ]  49.1% (used 40240 bytes from 81920 bytes)
Flash: [=====     ]  45.7% (used 477085 bytes from 1044464 bytes)

WHY?
The value on the Flash line is just 1MB (1044464)!
Should it not be 4MB (4194304)???