Skip to content

Commit ab961eb

Browse files
committed
docs: convert md to rst, add readthedocs
1 parent 93413ef commit ab961eb

Some content is hidden

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

78 files changed

+7583
-6268
lines changed

doc/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_build

doc/Makefile

Lines changed: 20 additions & 0 deletions
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

Lines changed: 0 additions & 102 deletions
This file was deleted.

doc/Troubleshooting/debugging.rst

Lines changed: 107 additions & 0 deletions
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

Lines changed: 0 additions & 66 deletions
This file was deleted.

doc/Troubleshooting/stack_dump.rst

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
Stack Dumps
2+
===========
3+
4+
Introduction
5+
------------
6+
7+
If the ESP crash the Exception Cause will be shown and the current stack will be dumped.
8+
9+
Example:
10+
11+
::
12+
13+
Exception (0): epc1=0x402103f4 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000
14+
15+
ctx: sys
16+
sp: 3ffffc10 end: 3fffffb0 offset: 01a0
17+
18+
>>>stack>>>
19+
3ffffdb0: 40223e00 3fff6f50 00000010 60000600
20+
3ffffdc0: 00000001 4021f774 3fffc250 4000050c
21+
3ffffdd0: 400043d5 00000030 00000016 ffffffff
22+
3ffffde0: 400044ab 3fffc718 3ffffed0 08000000
23+
3ffffdf0: 60000200 08000000 00000003 00000000
24+
3ffffe00: 0000ffff 00000001 04000002 003fd000
25+
3ffffe10: 3fff7188 000003fd 3fff2564 00000030
26+
3ffffe20: 40101709 00000008 00000008 00000020
27+
3ffffe30: c1948db3 394c5e70 7f2060f2 c6ba0c87
28+
3ffffe40: 3fff7058 00000001 40238d41 3fff6ff0
29+
3ffffe50: 3fff6f50 00000010 60000600 00000020
30+
3ffffe60: 402301a8 3fff7098 3fff7014 40238c77
31+
3ffffe70: 4022fb6c 40230ebe 3fff1a5b 3fff6f00
32+
3ffffe80: 3ffffec8 00000010 40231061 3fff0f90
33+
3ffffe90: 3fff6848 3ffed0c0 60000600 3fff6ae0
34+
3ffffea0: 3fff0f90 3fff0f90 3fff6848 3fff6d40
35+
3ffffeb0: 3fff28e8 40101233 d634fe1a fffeffff
36+
3ffffec0: 00000001 00000000 4022d5d6 3fff6848
37+
3ffffed0: 00000002 4000410f 3fff2394 3fff6848
38+
3ffffee0: 3fffc718 40004a3c 000003fd 3fff7188
39+
3ffffef0: 3fffc718 40101510 00000378 3fff1a5b
40+
3fffff00: 000003fd 4021d2e7 00000378 000003ff
41+
3fffff10: 00001000 4021d37d 3fff2564 000003ff
42+
3fffff20: 000003fd 60000600 003fd000 3fff2564
43+
3fffff30: ffffff00 55aa55aa 00000312 0000001c
44+
3fffff40: 0000001c 0000008a 0000006d 000003ff
45+
3fffff50: 4021d224 3ffecf90 00000000 3ffed0c0
46+
3fffff60: 00000001 4021c2e9 00000003 3fff1238
47+
3fffff70: 4021c071 3ffecf84 3ffecf30 0026a2b0
48+
3fffff80: 4021c0b6 3fffdab0 00000000 3fffdcb0
49+
3fffff90: 3ffecf40 3fffdab0 00000000 3fffdcc0
50+
3fffffa0: 40000f49 40000f49 3fffdab0 40000f49
51+
<<<stack<<<
52+
53+
The first number after ``Exception`` gives the cause of the reset. a
54+
full ist of all causes can be found `here <../exception_causes.md>`__
55+
the hex after are the stack dump.
56+
57+
Decode
58+
~~~~~~
59+
60+
It's possible to decode the Stack to readable information. For more info see the `Esp Exception Decoder <https://github.com/me-no-dev/EspExceptionDecoder>`__ tool.
61+
62+
.. figure:: ESP_Exception_Decoderp.png
63+
:alt: ESP Exception Decoder
64+
65+
ESP Exception Decoder

0 commit comments

Comments
 (0)