diff --git a/doc/platformio.md b/doc/platformio.md index a03500bb3..c03edae7e 100644 --- a/doc/platformio.md +++ b/doc/platformio.md @@ -28,6 +28,8 @@ platformio boards espressif # Initialise base project # platformio init --board %TYPE%(see above) +# for example, initialise project for ESP8266 ESP-12E board (NodeMCU) +platformio init --board esp12e # The next files/directories will be created in myproject # platformio.ini - Project Configuration File. |-> PLEASE EDIT ME <-| @@ -39,16 +41,44 @@ platformio init --board %TYPE%(see above) - Place your source code to `src` directory - Build/Upload project -``` +```bash # process/build project platformio run # build+upload firmware platformio run --target upload +``` -# build+upload firmware via OTA +## OTA firmware uploading + +There are 2 options: + +- Directly specify `--upoad-port` in command line +```bash platformio run --target upload --upload-port IP_ADDRESS_HERE ``` +- Specify [upload_port](http://docs.platformio.org/en/latest/projectconf.html#upload-port) option in `platformio.ini` +```ini +[env:***] +... +upload_port = IP_ADDRESS_HERE +``` + +### Authentication and upload options + +You can pass additional options/flags to OTA uploader using [upload_flags](http://docs.platformio.org/en/latest/projectconf.html#upload-flags) option in `platformio.ini` +```ini +[env:***] +upload_flags = --port=8266 +``` + +Availalbe flags +- `--port=ESP_PORT` ESP8266 ota Port. Default 8266 +- `--auth=AUTH` Set authentication password +- `--spiffs` Use this option to transmit a SPIFFS image and do not flash the module + +For the full list with availalbe options please run this command `~/.platformio/packages/framework-arduinoespressif/tools/espota.py -h`. + ## IDE Integration In addition, PlatformIO [can be integrated into the popular IDEs](http://docs.platformio.org/en/latest/ide.html). For example, initialise project for Espressif ESP8266 ESP-01 board and Eclipse IDE