Updated Compiling Tasmota on Gitpod (markdown)

Jason2866 2019-10-28 09:48:55 +01:00
parent da4cb005ac
commit ed0c7654ba
1 changed files with 13 additions and 13 deletions

@ -8,8 +8,8 @@ Gitpod is a web browser based online IDE. All you need to use it is to link your
![Gitpod login](https://i.imgur.com/irTdi4A.png) ![Gitpod login](https://i.imgur.com/irTdi4A.png)
After you successfully sign in, you can start your personal project. The fastest way to load Tasmota into Gitpod is with one of the following links: After you successfully sign in, you can start your personal project. The fastest way to load Tasmota into Gitpod is with one of the following links:
- Development Branch: [`https://gitpod.io#https://github.com/arendst/Sonoff-Tasmota/tree/development`](https://gitpod.io#https://github.com/arendst/Sonoff-Tasmota/tree/development) - Development Branch: [`https://gitpod.io#https://github.com/arendst/Tasmota/tree/development`](https://gitpod.io#https://github.com/arendst/Tasmota/tree/development)
- Master Release: [`https://gitpod.io#https://github.com/arendst/Sonoff-Tasmota/tree/master`](https://gitpod.io#https://github.com/arendst/Sonoff-Tasmota/tree/master) - Master Release: [`https://gitpod.io#https://github.com/arendst/Tasmota/tree/master`](https://gitpod.io#https://github.com/arendst/Tasmota/tree/master)
- [TasmoCompiler](https://github.com/benzino77/tasmocompiler/blob/master/README.md): [`https://gitpod.io/#https://github.com/benzino77/tasmocompiler`](https://gitpod.io/#https://github.com/benzino77/tasmocompiler) - [TasmoCompiler](https://github.com/benzino77/tasmocompiler/blob/master/README.md): [`https://gitpod.io/#https://github.com/benzino77/tasmocompiler`](https://gitpod.io/#https://github.com/benzino77/tasmocompiler)
**Browser Extension** **Browser Extension**
@ -30,13 +30,13 @@ The display consists of three panels:
### Customize Firmware Features and Settings ### Customize Firmware Features and Settings
:warning: ATTENTION: The proper method of customizing firmware compilation options is to use the `user_config_override.h` file. Most customizations should not require changes to the `my_user_config.h` file. To modify the stock configuration: :warning: ATTENTION: The proper method of customizing firmware compilation options is to use the `user_config_override.h` file. Most customizations should not require changes to the `my_user_config.h` file. To modify the stock configuration:
1. Select the `/sonoff` folder in the Explorer (1) pane 1. Select the `/tamota` folder in the Explorer (1) pane
2. Create a new file called `user_config_override.h` 2. Create a new file called `user_config_override.h`
3. In the Editor (2) pane, add, change, or remove anything you need in your configuration file to define your own settings. Refer to the `user_config_override_sample.h` file as well as `my_user_config.h` for `#define` options ([sample](https://pastebin.com/M5KPPWAJ)). You can find a list of Tasmota features and settings listed [here](https://github.com/arendst/Sonoff-Tasmota/wiki/Builds). Define the features you require in your configuration file. 3. In the Editor (2) pane, add, change, or remove anything you need in your configuration file to define your own settings. Refer to the `user_config_override_sample.h` file as well as `my_user_config.h` for `#define` options ([sample](https://pastebin.com/M5KPPWAJ)). You can find a list of Tasmota features and settings listed [here](https://github.com/arendst/Tasmota/wiki/Builds). Define the features you require in your configuration file.
4. Click 'File' on the menu bar and 'Save' your edits. 4. Click 'File' on the menu bar and 'Save' your edits.
### Prepare the IDE for Compilation ### Prepare the IDE for Compilation
1. Open the `platformio.ini` file located in the `/Sonoff-Tasmota` root directory (scroll to the bottom of the file Explorer (1) pane). In this file, removing a leading semicolon `;` enables a statement. 1. Open the `platformio.ini` file located in the `/Tasmota` root directory (scroll to the bottom of the file Explorer (1) pane). In this file, removing a leading semicolon `;` enables a statement.
2. In the Editor (2) pane: 2. In the Editor (2) pane:
- If you are using your own `user_config_overrid.h`, you must tell the compiler to use it. Find the `[common]` section in the file. Enable `-DUSE_CONFIG_OVERRIDE` - If you are using your own `user_config_overrid.h`, you must tell the compiler to use it. Find the `[common]` section in the file. Enable `-DUSE_CONFIG_OVERRIDE`
![Edit platformio.ini](https://i.imgur.com/AQml2kI.png) ![Edit platformio.ini](https://i.imgur.com/AQml2kI.png)
@ -48,14 +48,14 @@ This action is done in the Terminal pane (3) with very simple commands.
![compile command](https://i.imgur.com/wXA4hvd.png) ![compile command](https://i.imgur.com/wXA4hvd.png)
The simplest one is `platformio run -e sonoff`. With this command, Gitpod will compile the Tasmota firmware with the features you selected. If you need a different variant, you can specify this option on the command line: The simplest one is `platformio run -e tasmota`. With this command, Gitpod will compile the Tasmota firmware with the features you selected. If you need a different variant, you can specify this option on the command line:
`platformio run -e <variant-name>` `platformio run -e <variant-name>`
Examples: Examples:
- `platformio run -e sonoff-sensors` - `platformio run -e tasmota-sensors`
- `platformio run -e sonoff-DE` - `platformio run -e tasmota-DE`
Compilation normally takes only a couple of minutes. The time if takes is directly related to the configurations you selected; the more features selected means more time is needed to compile. When done, you will find a firmware file named `firmware.bin` in the `/Sonoff-Tasmota/.pioenvs/<variant-name>/` folder in the Explorer (1) pane. Compilation normally takes only a couple of minutes. The time if takes is directly related to the configurations you selected; the more features selected means more time is needed to compile. When done, you will find a firmware file named `firmware.bin` in the `/Tasmota/.pioenvs/<variant-name>/` folder in the Explorer (1) pane.
![folders](https://i.imgur.com/SEqyGy2.png) ![folders](https://i.imgur.com/SEqyGy2.png)
@ -66,10 +66,10 @@ Watch a [livestream video by digiblurDIY](https://www.youtube.com/watch?v=vod3Wo
### Flash Your Device ### Flash Your Device
#### OTA Flash #### OTA Flash
If you already have Tasmota flashed on your device, you can use the `File Upload` OTA method to load the new firmware binary file. If you already have Tasmota flashed on your device, you can use the `File Upload` OTA method to load the new firmware binary file.
1. Download [`sonoff-minimal.bin`](http://thehackbox.org/tasmota/020300/sonoff-minimal.bin) 1. Download [`tasmota-minimal.bin`](http://thehackbox.org/tasmota/tasmota-minimal.bin)
2. Make a backup of the device configuration using the web UI `Configuration` menu option. 2. Make a backup of the device configuration using the web UI `Configuration` menu option.
3. Upload `sonoff-minimal` to your device using the web UI `Firmware Upgrade` selection. Choose `Upgrade by file upload`. 3. Upload `tasmota-minimal` to your device using the web UI `Firmware Upgrade` selection. Choose `Upgrade by file upload`.
3. After `sonoff-minimal` is successfully loaded, select `Firmware Upgrade` once again and upload the new firmware file that was just compiled using Gitpod. 3. After `tasmota-minimal` is successfully loaded, select `Firmware Upgrade` once again and upload the new firmware file that was just compiled using Gitpod.
#### Serial Flash #### Serial Flash
Follow the same [procedure for flashing](https://github.com/arendst/Sonoff-Tasmota/wiki/Flashing) as you would any new device. Follow the same [procedure for flashing](https://github.com/arendst/Tasmota/wiki/Flashing) as you would any new device.