Updated PlatformIO CLI (markdown)

Jason2866 2019-10-28 09:25:38 +01:00
parent ae663d7d02
commit 01dbe1f228
1 changed files with 34 additions and 30 deletions

@ -9,43 +9,47 @@ How to flash the Tasmota firmware onto a device using the `platformio` command l
## Download the Sonoff-Tasmota source code ## Download the Sonoff-Tasmota source code
Either download the latest Tasmota release Source code from https://github.com/arendst/Sonoff-Tasmota/releases and extract it or clone the Git repository: Either download the latest Tasmota Source code from https://github.com/arendst/Tasmota/ and extract it or clone the Git repository:
'git clone https://github.com/arendst/Sonoff-Tasmota.git` 'git clone https://github.com/arendst/Tasmota.git`
## Select the environment ## Select the environment
The default environment configuration can be used to easily generate Tasmota firmware variants (sonoff, sensors, display, etc.). If you're not sure which binary is the right one for you, consult the [builds table](Builds) or just start with [sonoff.bin](http://thehackbox.org/tasmota/release/sonoff.bin). To build and/or flash exactly one of these, use the `-e` command line argument (e.g., `-e sonoff-sensors`). Alternatively, uncomment (i.e., remove the leading `;`) the desired *env_default* line in the *platformio.ini* file and do not use the `-e` argument on the command. The default environment configuration can be used to easily generate Tasmota firmware variants (sonoff, sensors, display, etc.). If you're not sure which binary is the right one for you, consult the [builds table](Builds) or just start with `tasmota.bin` / `sonoff.bin`. To build and/or flash exactly one of these, use the `-e` command line argument (e.g., `-e sonoff-sensors`). Alternatively, uncomment (i.e., remove the leading `;`) the desired *env_default* line in the *platformio.ini* file and do not use the `-e` argument on the command.
``` ```
env_default = sonoff ; *** Uncomment one of the lines below to build/upload only one environment
;env_default = sonoff-minimal ;default_envs = tasmota
;env_default = sonoff-basic ;default_envs = tasmota-ircustom ; alternative to 'tasmota' with full IR protocols activated, you will need to disable some features to keep code not too big
;env_default = sonoff-classic ;default_envs = tasmota-minimal
;env_default = sonoff-knx ;default_envs = tasmota-basic
;env_default = sonoff-sensors ;default_envs = tasmota-knx
;env_default = sonoff-display ;default_envs = tasmota-sensors
;env_default = sonoff-BG ;default_envs = tasmota-display
;env_default = sonoff-BR ;default_envs = tasmota-ir
;env_default = sonoff-CN ;default_envs = tasmota-BG
;env_default = sonoff-CZ ;default_envs = tasmota-BR
;env_default = sonoff-DE ;default_envs = tasmota-CN
;env_default = sonoff-ES ;default_envs = tasmota-CZ
;env_default = sonoff-FR ;default_envs = tasmota-DE
;env_default = sonoff-GR ;default_envs = tasmota-ES
;env_default = sonoff-HE ;default_envs = tasmota-FR
;env_default = sonoff-HU ;default_envs = tasmota-GR
;env_default = sonoff-IT ;default_envs = tasmota-HE
;env_default = sonoff-NL ;default_envs = tasmota-HU
;env_default = sonoff-PL ;default_envs = tasmota-IT
;env_default = sonoff-PT ;default_envs = tasmota-KO
;env_default = sonoff-RU ;default_envs = tasmota-NL
;env_default = sonoff-SE ;default_envs = tasmota-PL
;env_default = sonoff-TR ;default_envs = tasmota-PT
;env_default = sonoff-TW ;default_envs = tasmota-RU
;env_default = sonoff-UK ;default_envs = tasmota-SE
;default_envs = tasmota-SK
;default_envs = tasmota-TR
;default_envs = tasmota-TW
;default_envs = tasmota-UK
``` ```
# Compile and upload # Compile and upload
Once all the prerequisites are in place, compiling and uploading is one simple command. Execute this from within the `Sonoff-Tasmota` source code directory: Once all the prerequisites are in place, compiling and uploading is one simple command. Execute this from within the `Tasmota` source code directory:
`platformio run -e <variant> --target upload --upload-port <port>` `platformio run -e <variant> --target upload --upload-port <port>`