Core Pre 2.6 only

Jason2866 2019-10-23 11:58:32 +02:00
parent 98902672ee
commit 93fc032046
1 changed files with 3 additions and 34 deletions

@ -2,7 +2,6 @@
**It is not recommended to use Arduino IDE for compiling Tasmota firmware, use [Gitpod](https://github.com/arendst/Sonoff-Tasmota/wiki/Compiling-Tasmota-on-Gitpod) or [VSC](https://github.com/arendst/Sonoff-Tasmota/wiki/Visual-Studio-Code) to build.**
**For these IDEs, setup is much easier and Tasmota project is already configured for.**
**At the moment it is _**NOT**_ possible to build Tasmota with Arduino IDE and the recommended core pre 2.6.!**
## Download Arduino IDE
- Download Arduino IDE from https://www.arduino.cc/en/main/software
@ -16,24 +15,11 @@ I prefer a *dedicated standalone version* of the IDE allowing easy ESP8266 file
IMPORTANT: For Windows users, before executing *arduino.exe* add an empty folder called *portable* in the known folder.
### Install ESP8266 board software
- Open Arduino IDE and select ``File`` → ``Preferences`` (``Arduino`` → ``Preferences`` on Mac) and add the following text for field *Additional Boards Manager URLs:* ``http://arduino.esp8266.com/stable/package_esp8266com_index.json`` and select *OK*.
- Open Arduino IDE and select ``File`` → ``Preferences`` (``Arduino`` → ``Preferences`` on Mac) and use the following text for field *Additional Boards Manager URLs:* ``https://github.com/Jason2866/Arduino/releases/download/2.5.3/package_esp8266com_index.json`` and select *OK*.
- Open ``Tools`` → ``Boards...`` → ``Boards Manager...`` and scroll down and click on *esp8266 by ESP8266 Community*. Click the *Install* button to download and install the latest ESP8266 board software. Select *Close*.
## Download Tasmota
- Download the latest Tasmota release Source code from https://github.com/arendst/Sonoff-Tasmota/releases and unzip to another known folder.
### Copy files
#### ESP8266 Board version 2.3.0 (2.3.x)
**Core is NOT recommended to use (Many security issues), not supported anymore**
- If not available copy from the Tasmota release Source code folder *arduino\version 2.3.0\tools\sdk\ld* file *eagle.flash.1m0.ld* to Arduino IDE folder *portable\packages\esp8266\hardware\esp8266\2.3.0\tools\sdk\ld*.
- Replace in Arduino IDE folder *portable\packages\esp8266\hardware\esp8266\2.3.0* file *boards.txt* with the Tasmota Source code file *arduino\version 2.3.0\boards.txt*.
#### ESP8266 Board version 2.4.2 (2.4.x)
**Core is NOT recommended to use (Security issues), not supported anymore**
- Remove default compile options for floating point ``printf`` and ``scanf`` which are not being used by Tasmota and save 15k code space.
- Replace in Arduino IDE folder *portable\packages\esp8266\hardware\esp8266\2.4.2* file *platform.txt* with the Tasmota Source code file *arduino\version 2.4.2\platform.txt*.
#### For all versions
- Copy all files from the Tasmota release Source code folder *lib* into your *sketchbook\libraries* folder.
- About the issue of missing header files and/or libraries while compiling that users had, it is possible that the library folder is in the wrong place. That issue can be happen if you installed your Arduino IDE in a virtual environment. This came up after some tests (6) of an installation in `VM-Ware Workstation 14 Pro - 14.1.1 build-7528167` with not all current updates from VM-Ware. The library folder was placed in **/portable/libraries** and not in **/portable/sketchbook/libraries**. We can't say why that happens but there is the possibilty. So please check it when you get compile errors with missing header files and/or libaries. After updating VM-Ware and a new installation of Arduino IDE 1.8.8 the issue was gone. The installation of Arduino IDE 1.8.8 on windows 7 pro were 100% ok without any issue. Right now the newer version of Arduino IDE is avaiable. Version 1.8.9
- Copy the Tasmota release Source code folder *sonoff* to your *sketchbook*.
@ -43,23 +29,11 @@ IMPORTANT: For Windows users, before executing *arduino.exe* add an empty folder
- Select ``Tools`` and verify the following settings for **All Tasmota devices**.
#### ESP8266 Board version 2.3.0 (2.3.x):
#### ESP8266 Board version 2.5.3 (core pre 2.6):
<img src="https://github.com/arendst/arendst.github.io/blob/master/media/arduinoide230b.png" width="300" />
<img src="https://user-images.githubusercontent.com/24528715/67381494-4b5b1e00-f58c-11e9-9c47-9617698b6302.png" width="300" />
#### ESP8266 Board version 2.4.2 (2.4.x):
<img src="https://github.com/arendst/arendst.github.io/blob/master/media/arduinoide242b.png" width="300" />
### Optional: Prepare for OTA upload
Tasmota release Source code provides scripts to be installed in the Arduino IDE and your webserver to copy the compiled binary to your webserver. This webserver can then provide the firmware via OTA to the device.
- If not available install PHP on your webserver and copy the Tasmota release Source code folder *api* to the root of your webserver.
- If not already done in the previous steps replace in Arduino IDE folder *portable\packages\esp8266\hardware\esp8266\2.3.0* file *boards.txt* with the Tasmota Source code file *arduino\version 2.3.0\boards.txt*.
- Replace in Arduino IDE folder *portable\packages\esp8266\hardware\esp8266\2.3.0* file *platform.txt* with the Tasmota Source code file *arduino\version 2.3.0\platform.txt*.
- Copy from the Tasmota release Source code folder *arduino* file *espupload.py* to Arduino IDE folder *portable\packages\esp8266\hardware\esp8266\2.3.0\tools* and change in the script HOST_ADDR to point to your webserver ip address.
After restarting your Arduino IDE you now have an extra option for ``Tools`` - ``Upload Using: "OTA_upload"``.
## Compile Tasmota
Open Arduino IDE and select file *sonoff.ino* from your *sketchbook\sonoff* folder.
@ -88,9 +62,4 @@ Grounding pin GPIO00 can often be achieved by pressing button 1 on the Sonoff de
NOTE: For a proper device initialization after first firmware upload power down and power up the device.
## Optional: Upload Tasmota to OTA server
If a webserver is available you can upload the compiled firmware using optional scripts and prepare it for OTA download by any Tasmota device using the MQTT ``upgrade 1`` or ``upgrade 5.1.2`` command.
- Make sure that ``Tools`` - ``Upload Using: "OTA_upload"`` is selected.
- Upload the compiled firmware to the OTA server with ``Sketch`` - ``Upload``.