Skip to content

Commit c85f582

Browse files
committed
Merge branch 'master' of github.com:wyattearp/Arduino
2 parents 9b880e7 + e7cf30b commit c85f582

File tree

5 files changed

+119
-2
lines changed

5 files changed

+119
-2
lines changed

boards.txt

+16-2
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ generic.menu.DebugLevel.WiFi=WiFi
189189
generic.menu.DebugLevel.WiFi.build.debug_level=-DDEBUG_ESP_WIFI
190190
generic.menu.DebugLevel.HTTPClient=HTTPClient
191191
generic.menu.DebugLevel.HTTPClient.build.debug_level=-DDEBUG_ESP_HTTP_CLIENT
192+
generic.menu.DebugLevel.HTTPClient2=HTTPClient + SSL
193+
generic.menu.DebugLevel.HTTPClient2.build.debug_level=-DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_SSL
192194
generic.menu.DebugLevel.HTTPUpdate=HTTPUpdate
193195
generic.menu.DebugLevel.HTTPUpdate.build.debug_level=-DDEBUG_ESP_HTTP_UPDATE
194196
generic.menu.DebugLevel.HTTPUpdate2=HTTPClient + HTTPUpdate
@@ -944,8 +946,20 @@ wifinfo.build.variant=wifinfo
944946
wifinfo.build.flash_mode=qio
945947
wifinfo.build.board=ESP8266_ESP12
946948
wifinfo.build.spiffs_pagesize=256
947-
wifinfo.build.debug_port=
948-
wifinfo.build.debug_level=
949+
wifinfo.build.debug_port=Serial1
950+
wifinfo.build.debug_level=Wifinfo
951+
952+
wifinfo.menu.Debug.Disabled=Disabled
953+
wifinfo.menu.Debug.Disabled.build.debug_port=
954+
wifinfo.menu.Debug.Serial=Serial
955+
wifinfo.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial
956+
wifinfo.menu.Debug.Serial1=Serial1
957+
wifinfo.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1
958+
959+
wifinfo.menu.DebugLevel.None=None
960+
wifinfo.menu.DebugLevel.None.build.debug_level=
961+
wifinfo.menu.DebugLevel.Wifinfo=Wifinfo
962+
wifinfo.menu.DebugLevel.Wifinfo.build.debug_level=-DDEBUG_ESP_WIFINFO
949963

950964
#wifinfo.menu.ESPModule.ESP07512=ESP07 (1M/512K SPIFFS)
951965
#wifinfo.menu.ESPModule.ESP07512.build.board=ESP8266_ESP07

doc/Troubleshooting/debug_level.png

36.4 KB
Loading

doc/Troubleshooting/debug_port.png

33.8 KB
Loading

doc/Troubleshooting/debugging.md

+102
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
---
2+
title: Debugging
3+
---
4+
5+
## Table of Contents
6+
* [Introduction](#introduction)
7+
* [Requirements](#requirements)
8+
* [Usage](#Usage)
9+
* [Informations](#Informations)
10+
* [For Developers](#for-developers)
11+
12+
## Introduction
13+
14+
Since 2.1.0-rc1 the core includes a Debugging feature that is controllable over the IDE menu.
15+
16+
The new menu points manage the real-time Debug messages.
17+
18+
### Requirements
19+
20+
For usage of the debugging a Serial connection is required (Serial or Serial1).
21+
22+
The Serial Interface need to be initialized in the ```setup()```.
23+
24+
Set the Serial baud rate as high as possible for your Hardware setup.
25+
26+
Minimum sketch to use debugging:
27+
```cpp
28+
void setup() {
29+
Serial.begin(115200);
30+
}
31+
32+
void loop() {
33+
}
34+
```
35+
36+
### Usage
37+
38+
1. Select the Serial interface for the Debugging messages:
39+
![Debug-Port](debug_port.png)
40+
41+
2. Select which type / level you want debug messages for:
42+
![Debug-Level](debug_level.png)
43+
44+
3. Check if the Serial interface is initialized in ```setup()``` (see [Requirements](#requirements))
45+
46+
4. Flash sketch
47+
48+
5. Check the Serial Output
49+
50+
51+
52+
## Informations
53+
54+
It work with every sketch that enables the Serial interface that is selected as debug port.
55+
56+
The Serial interface can still be used normal in the Sketch.
57+
58+
The debug output is additional and will not disable any interface from usage in the sketch.
59+
60+
### For Developers
61+
62+
For the debug handling uses defines.
63+
64+
The defined are set by command line.
65+
66+
#### Debug Port
67+
68+
The port has the define ```DEBUG_ESP_PORT``` possible value:
69+
- Disabled: define not existing
70+
- Serial: Serial
71+
- Serial1: Serial1
72+
73+
#### Debug Level
74+
75+
All defines for the different levels starts with ```DEBUG_ESP_```
76+
77+
a full list can be found here in the [boards.txt](https://github.com/esp8266/Arduino/blob/master/boards.txt#L180)
78+
79+
#### Example for own debug messages
80+
81+
The debug messages will be only shown when the Debug Port in the IDE menu is set.
82+
83+
```cpp
84+
#ifdef DEBUG_ESP_PORT
85+
#define DEBUG_MSG(...) DEBUG_ESP_PORT.printf( __VA_ARGS__ )
86+
#else
87+
#define DEBUG_MSG(...)
88+
#endif
89+
90+
void setup() {
91+
Serial.begin(115200);
92+
93+
delay(3000);
94+
DEBUG_MSG("bootup...\n");
95+
}
96+
97+
void loop() {
98+
DEBUG_MSG("loop %d\n", millis());
99+
delay(1000);
100+
}
101+
```
102+

doc/libraries.md

+1
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ While many RC servo motors will accept the 3.3V IO data pin from a ESP8266, most
141141
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:
142142
143143
- [Adafruit_ILI9341](https://github.com/Links2004/Adafruit_ILI9341) - Port of the Adafruit ILI9341 for the ESP8266
144+
- [arduinoVNC](https://github.com/Links2004/arduinoVNC) - VNC Client for Arduino
144145
- [arduinoWebSockets](https://github.com/Links2004/arduinoWebSockets) - WebSocket Server and Client compatible with ESP8266 (RFC6455)
145146
- [aREST](https://github.com/marcoschwartz/aREST) - REST API handler library.
146147
- [Blynk](https://github.com/blynkkk/blynk-library) - easy IoT framework for Makers (check out the [Kickstarter page](http://tiny.cc/blynk-kick)).

0 commit comments

Comments
 (0)