mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-07 16:23:38 +03:00
Merge remote-tracking branch 'esp8266/master'
This commit is contained in:
commit
897a475fdb
@ -11,7 +11,7 @@ ESP8266 Arduino core comes with libraries to communicate over WiFi using TCP and
|
|||||||
- [Using git version](#using-git-version-)
|
- [Using git version](#using-git-version-)
|
||||||
- [Using stable version with PlatformIO](#using-stable-version-with-platformio)
|
- [Using stable version with PlatformIO](#using-stable-version-with-platformio)
|
||||||
- [Documentation](#documentation)
|
- [Documentation](#documentation)
|
||||||
- [Issues and support](#issues-and-support)
|
- [Issues and support](#issues-and-support)
|
||||||
- [Contributing](#contributing)
|
- [Contributing](#contributing)
|
||||||
- [License and credits](#license-and-credits)
|
- [License and credits](#license-and-credits)
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ Starting with 1.6.4, Arduino allows installation of third-party platform package
|
|||||||
- Open Boards Manager from Tools > Board menu and install *esp8266* platform (and don't forget to select your ESP8266 board from Tools > Board menu after installation).
|
- Open Boards Manager from Tools > Board menu and install *esp8266* platform (and don't forget to select your ESP8266 board from Tools > Board menu after installation).
|
||||||
|
|
||||||
The best place to ask questions related to this core is ESP8266 community forum: http://www.esp8266.com/arduino.
|
The best place to ask questions related to this core is ESP8266 community forum: http://www.esp8266.com/arduino.
|
||||||
If you find this ESP8266 board manager useful, please consider supporting it with a donation. The ESP8266 Community Forum and IGRR have made this wonderful port available.
|
If you find this forum or the ESP8266 Boards Manager package useful, please consider supporting it with a donation.
|
||||||
[](https://www.paypal.com/webscr?cmd=_s-xclick&hosted_button_id=4M56YCWV6PX66)
|
[](https://www.paypal.com/webscr?cmd=_s-xclick&hosted_button_id=4M56YCWV6PX66)
|
||||||
|
|
||||||
#### Available versions
|
#### Available versions
|
||||||
@ -38,11 +38,11 @@ Documentation: [http://esp8266.github.io/Arduino/versions/2.0.0/](http://esp8266
|
|||||||
##### Staging version 
|
##### Staging version 
|
||||||
Boards manager link: `http://arduino.esp8266.com/staging/package_esp8266com_index.json`
|
Boards manager link: `http://arduino.esp8266.com/staging/package_esp8266com_index.json`
|
||||||
|
|
||||||
Documentation: [http://esp8266.github.io/Arduino/versions/2.0.0-rc2/](http://esp8266.github.io/Arduino/versions/2.0.0-rc2/)
|
Documentation: [http://esp8266.github.io/Arduino/versions/2.1.0-rc1/](http://esp8266.github.io/Arduino/versions/2.1.0-rc1/)
|
||||||
|
|
||||||
### Using git version [](https://travis-ci.org/esp8266/Arduino)
|
### Using git version [](https://travis-ci.org/esp8266/Arduino)
|
||||||
|
|
||||||
- Install Arduino 1.6.5
|
- Install Arduino 1.6.7
|
||||||
- Go to Arduino directory
|
- Go to Arduino directory
|
||||||
- Clone this repository into hardware/esp8266com/esp8266 directory (or clone it elsewhere and create a symlink)
|
- Clone this repository into hardware/esp8266com/esp8266 directory (or clone it elsewhere and create a symlink)
|
||||||
```bash
|
```bash
|
||||||
|
18
boards.txt
18
boards.txt
@ -189,6 +189,8 @@ generic.menu.DebugLevel.WiFi=WiFi
|
|||||||
generic.menu.DebugLevel.WiFi.build.debug_level=-DDEBUG_ESP_WIFI
|
generic.menu.DebugLevel.WiFi.build.debug_level=-DDEBUG_ESP_WIFI
|
||||||
generic.menu.DebugLevel.HTTPClient=HTTPClient
|
generic.menu.DebugLevel.HTTPClient=HTTPClient
|
||||||
generic.menu.DebugLevel.HTTPClient.build.debug_level=-DDEBUG_ESP_HTTP_CLIENT
|
generic.menu.DebugLevel.HTTPClient.build.debug_level=-DDEBUG_ESP_HTTP_CLIENT
|
||||||
|
generic.menu.DebugLevel.HTTPClient2=HTTPClient + SSL
|
||||||
|
generic.menu.DebugLevel.HTTPClient2.build.debug_level=-DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_SSL
|
||||||
generic.menu.DebugLevel.HTTPUpdate=HTTPUpdate
|
generic.menu.DebugLevel.HTTPUpdate=HTTPUpdate
|
||||||
generic.menu.DebugLevel.HTTPUpdate.build.debug_level=-DDEBUG_ESP_HTTP_UPDATE
|
generic.menu.DebugLevel.HTTPUpdate.build.debug_level=-DDEBUG_ESP_HTTP_UPDATE
|
||||||
generic.menu.DebugLevel.HTTPUpdate2=HTTPClient + HTTPUpdate
|
generic.menu.DebugLevel.HTTPUpdate2=HTTPClient + HTTPUpdate
|
||||||
@ -944,8 +946,20 @@ wifinfo.build.variant=wifinfo
|
|||||||
wifinfo.build.flash_mode=qio
|
wifinfo.build.flash_mode=qio
|
||||||
wifinfo.build.board=ESP8266_ESP12
|
wifinfo.build.board=ESP8266_ESP12
|
||||||
wifinfo.build.spiffs_pagesize=256
|
wifinfo.build.spiffs_pagesize=256
|
||||||
wifinfo.build.debug_port=
|
wifinfo.build.debug_port=Serial1
|
||||||
wifinfo.build.debug_level=
|
wifinfo.build.debug_level=Wifinfo
|
||||||
|
|
||||||
|
wifinfo.menu.Debug.Disabled=Disabled
|
||||||
|
wifinfo.menu.Debug.Disabled.build.debug_port=
|
||||||
|
wifinfo.menu.Debug.Serial=Serial
|
||||||
|
wifinfo.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial
|
||||||
|
wifinfo.menu.Debug.Serial1=Serial1
|
||||||
|
wifinfo.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1
|
||||||
|
|
||||||
|
wifinfo.menu.DebugLevel.None=None
|
||||||
|
wifinfo.menu.DebugLevel.None.build.debug_level=
|
||||||
|
wifinfo.menu.DebugLevel.Wifinfo=Wifinfo
|
||||||
|
wifinfo.menu.DebugLevel.Wifinfo.build.debug_level=-DDEBUG_ESP_WIFINFO
|
||||||
|
|
||||||
#wifinfo.menu.ESPModule.ESP07512=ESP07 (1M/512K SPIFFS)
|
#wifinfo.menu.ESPModule.ESP07512=ESP07 (1M/512K SPIFFS)
|
||||||
#wifinfo.menu.ESPModule.ESP07512.build.board=ESP8266_ESP07
|
#wifinfo.menu.ESPModule.ESP07512.build.board=ESP8266_ESP07
|
||||||
|
BIN
doc/Troubleshooting/debug_level.png
Normal file
BIN
doc/Troubleshooting/debug_level.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 36 KiB |
BIN
doc/Troubleshooting/debug_port.png
Normal file
BIN
doc/Troubleshooting/debug_port.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 34 KiB |
102
doc/Troubleshooting/debugging.md
Normal file
102
doc/Troubleshooting/debugging.md
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
---
|
||||||
|
title: Debugging
|
||||||
|
---
|
||||||
|
|
||||||
|
## Table of Contents
|
||||||
|
* [Introduction](#introduction)
|
||||||
|
* [Requirements](#requirements)
|
||||||
|
* [Usage](#Usage)
|
||||||
|
* [Informations](#Informations)
|
||||||
|
* [For Developers](#for-developers)
|
||||||
|
|
||||||
|
## Introduction
|
||||||
|
|
||||||
|
Since 2.1.0-rc1 the core includes a Debugging feature that is controllable over the IDE menu.
|
||||||
|
|
||||||
|
The new menu points manage the real-time Debug messages.
|
||||||
|
|
||||||
|
### Requirements
|
||||||
|
|
||||||
|
For usage of the debugging a Serial connection is required (Serial or Serial1).
|
||||||
|
|
||||||
|
The Serial Interface need to be initialized in the ```setup()```.
|
||||||
|
|
||||||
|
Set the Serial baud rate as high as possible for your Hardware setup.
|
||||||
|
|
||||||
|
Minimum sketch to use debugging:
|
||||||
|
```cpp
|
||||||
|
void setup() {
|
||||||
|
Serial.begin(115200);
|
||||||
|
}
|
||||||
|
|
||||||
|
void loop() {
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
1. Select the Serial interface for the Debugging messages:
|
||||||
|

|
||||||
|
|
||||||
|
2. Select which type / level you want debug messages for:
|
||||||
|

|
||||||
|
|
||||||
|
3. Check if the Serial interface is initialized in ```setup()``` (see [Requirements](#requirements))
|
||||||
|
|
||||||
|
4. Flash sketch
|
||||||
|
|
||||||
|
5. Check the Serial Output
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Informations
|
||||||
|
|
||||||
|
It work with every sketch that enables the Serial interface that is selected as debug port.
|
||||||
|
|
||||||
|
The Serial interface can still be used normal in the Sketch.
|
||||||
|
|
||||||
|
The debug output is additional and will not disable any interface from usage in the sketch.
|
||||||
|
|
||||||
|
### For Developers
|
||||||
|
|
||||||
|
For the debug handling uses defines.
|
||||||
|
|
||||||
|
The defined are set by command line.
|
||||||
|
|
||||||
|
#### Debug Port
|
||||||
|
|
||||||
|
The port has the define ```DEBUG_ESP_PORT``` possible value:
|
||||||
|
- Disabled: define not existing
|
||||||
|
- Serial: Serial
|
||||||
|
- Serial1: Serial1
|
||||||
|
|
||||||
|
#### Debug Level
|
||||||
|
|
||||||
|
All defines for the different levels starts with ```DEBUG_ESP_```
|
||||||
|
|
||||||
|
a full list can be found here in the [boards.txt](https://github.com/esp8266/Arduino/blob/master/boards.txt#L180)
|
||||||
|
|
||||||
|
#### Example for own debug messages
|
||||||
|
|
||||||
|
The debug messages will be only shown when the Debug Port in the IDE menu is set.
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
#ifdef DEBUG_ESP_PORT
|
||||||
|
#define DEBUG_MSG(...) DEBUG_ESP_PORT.printf( __VA_ARGS__ )
|
||||||
|
#else
|
||||||
|
#define DEBUG_MSG(...)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void setup() {
|
||||||
|
Serial.begin(115200);
|
||||||
|
|
||||||
|
delay(3000);
|
||||||
|
DEBUG_MSG("bootup...\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
void loop() {
|
||||||
|
DEBUG_MSG("loop %d\n", millis());
|
||||||
|
delay(1000);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
@ -141,6 +141,7 @@ While many RC servo motors will accept the 3.3V IO data pin from a ESP8266, most
|
|||||||
Libraries that don't rely on low-level access to AVR registers should work well. Here are a few libraries that were verified to work:
|
Libraries that don't rely on low-level access to AVR registers should work well. Here are a few libraries that were verified to work:
|
||||||
|
|
||||||
- [Adafruit_ILI9341](https://github.com/Links2004/Adafruit_ILI9341) - Port of the Adafruit ILI9341 for the ESP8266
|
- [Adafruit_ILI9341](https://github.com/Links2004/Adafruit_ILI9341) - Port of the Adafruit ILI9341 for the ESP8266
|
||||||
|
- [arduinoVNC](https://github.com/Links2004/arduinoVNC) - VNC Client for Arduino
|
||||||
- [arduinoWebSockets](https://github.com/Links2004/arduinoWebSockets) - WebSocket Server and Client compatible with ESP8266 (RFC6455)
|
- [arduinoWebSockets](https://github.com/Links2004/arduinoWebSockets) - WebSocket Server and Client compatible with ESP8266 (RFC6455)
|
||||||
- [aREST](https://github.com/marcoschwartz/aREST) - REST API handler library.
|
- [aREST](https://github.com/marcoschwartz/aREST) - REST API handler library.
|
||||||
- [Blynk](https://github.com/blynkkk/blynk-library) - easy IoT framework for Makers (check out the [Kickstarter page](http://tiny.cc/blynk-kick)).
|
- [Blynk](https://github.com/blynkkk/blynk-library) - easy IoT framework for Makers (check out the [Kickstarter page](http://tiny.cc/blynk-kick)).
|
||||||
|
@ -127,7 +127,7 @@ wl_status_t ESP8266WiFiMulti::run(void) {
|
|||||||
ip = WiFi.localIP();
|
ip = WiFi.localIP();
|
||||||
mac = WiFi.BSSID();
|
mac = WiFi.BSSID();
|
||||||
DEBUG_WIFI_MULTI("[WIFI] Connecting done.\n");
|
DEBUG_WIFI_MULTI("[WIFI] Connecting done.\n");
|
||||||
DEBUG_WIFI_MULTI("[WIFI] SSID: %s\n", WiFi.SSID());
|
DEBUG_WIFI_MULTI("[WIFI] SSID: %s\n", WiFi.SSID().c_str());
|
||||||
DEBUG_WIFI_MULTI("[WIFI] IP: %d.%d.%d.%d\n", ip[0], ip[1], ip[2], ip[3]);
|
DEBUG_WIFI_MULTI("[WIFI] IP: %d.%d.%d.%d\n", ip[0], ip[1], ip[2], ip[3]);
|
||||||
DEBUG_WIFI_MULTI("[WIFI] MAC: %02X:%02X:%02X:%02X:%02X:%02X\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
|
DEBUG_WIFI_MULTI("[WIFI] MAC: %02X:%02X:%02X:%02X:%02X:%02X\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
|
||||||
DEBUG_WIFI_MULTI("[WIFI] Channel: %d\n", WiFi.channel());
|
DEBUG_WIFI_MULTI("[WIFI] Channel: %d\n", WiFi.channel());
|
||||||
|
@ -39,7 +39,7 @@ cat << EOF > exclude.txt
|
|||||||
package
|
package
|
||||||
EOF
|
EOF
|
||||||
# Also include all files which are ignored by git
|
# Also include all files which are ignored by git
|
||||||
git ls-files --other --ignored --exclude-standard --directory >> exclude.txt
|
git ls-files --other --directory >> exclude.txt
|
||||||
# Now copy files to $outdir
|
# Now copy files to $outdir
|
||||||
rsync -a --exclude-from 'exclude.txt' $srcdir/ $outdir/
|
rsync -a --exclude-from 'exclude.txt' $srcdir/ $outdir/
|
||||||
rm exclude.txt
|
rm exclude.txt
|
||||||
|
@ -24,8 +24,9 @@ set -e
|
|||||||
|
|
||||||
# some variable definitions
|
# some variable definitions
|
||||||
tmp_path=$1
|
tmp_path=$1
|
||||||
arduinoESP_src="$tmp_path/arduino"
|
doc_src_path=$2
|
||||||
version="$(git --work-tree=$arduinoESP_src describe --tags --always)"
|
arduinoESP_src=$(cd $PWD/..; pwd)
|
||||||
|
version="$(git --work-tree=$arduinoESP_src --git-dir=$arduinoESP_src/.git describe --tags --always)"
|
||||||
release_date=$(date "+%b_%d,_%Y") # format for badge link
|
release_date=$(date "+%b_%d,_%Y") # format for badge link
|
||||||
build_date=$(date "+%b %d, %Y")
|
build_date=$(date "+%b %d, %Y")
|
||||||
destination_path="$tmp_path/doc"
|
destination_path="$tmp_path/doc"
|
||||||
@ -62,7 +63,8 @@ mkdir -p $destination_path/$version
|
|||||||
cp -R $arduinoESP_src/doc/* $destination_path/src
|
cp -R $arduinoESP_src/doc/* $destination_path/src
|
||||||
|
|
||||||
# download doc template
|
# download doc template
|
||||||
git clone $doc_template_url $destination_path/build
|
rsync -av $doc_src_path/ $destination_path/build/
|
||||||
|
# git clone $doc_template_url $destination_path/build
|
||||||
|
|
||||||
# create versions.html file
|
# create versions.html file
|
||||||
|
|
||||||
@ -113,4 +115,3 @@ popd
|
|||||||
|
|
||||||
# grab badge
|
# grab badge
|
||||||
wget -q -O $destination_path/$version/badge.svg "https://img.shields.io/badge/updated-$release_date-blue.svg"
|
wget -q -O $destination_path/$version/badge.svg "https://img.shields.io/badge/updated-$release_date-blue.svg"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user