Skip to content

Commit 283eb97

Browse files
committed
docs: convert to .rst and add readthedocs
1 parent 5c7247b commit 283eb97

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+7191
-6324
lines changed

.travis.yml

+10-12
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,25 @@ language: bash
33
os:
44
- linux
55

6-
addons:
7-
apt:
8-
sources:
9-
- ubuntu-toolchain-r-test
10-
packages:
11-
- g++-4.8
6+
dist: trusty
7+
8+
install:
9+
- pip install --user -r doc/requirements.txt
1210

1311
script:
1412
- set -e
15-
- export CXX="g++-4.8" CC="gcc-4.8" GCOV="gcov-4.8"
13+
- echo -e "travis_fold:start:docs"
14+
- pushd $TRAVIS_BUILD_DIR/doc
15+
- SPHINXOPTS="-W" make html
16+
- popd
17+
- echo -e "travis_fold:end:docs"
1618
- echo -e "travis_fold:start:host_tests"
1719
- pushd $TRAVIS_BUILD_DIR/tests/host
1820
- make
1921
- make clean-objects
22+
- popd
2023
- echo -e "travis_fold:end:host_tests"
2124
- echo -e "travis_fold:start:sketch_test_env_prepare"
22-
- popd
2325
- wget -O arduino.tar.xz https://www.arduino.cc/download.php?f=/arduino-nightly-linux64.tar.xz
2426
- tar xf arduino.tar.xz
2527
- mv arduino-nightly $HOME/arduino_ide
@@ -42,10 +44,6 @@ script:
4244
- cat size.log
4345
- echo -e "travis_fold:end:size_report"
4446

45-
after_success:
46-
- pushd $TRAVIS_BUILD_DIR/tests/host
47-
- bash <(curl -s https://codecov.io/bash) -X gcov
48-
4947
notifications:
5048
email:
5149
on_success: change

doc/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_build

doc/Makefile

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line.
5+
SPHINXOPTS =
6+
SPHINXBUILD = sphinx-build
7+
SPHINXPROJ = ESP8266ArduinoCore
8+
SOURCEDIR = .
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

doc/Troubleshooting/debugging.md

-102
This file was deleted.

doc/Troubleshooting/debugging.rst

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

doc/Troubleshooting/stack_dump.md

-66
This file was deleted.

0 commit comments

Comments
 (0)