Skip to content

Commit f87844f

Browse files
Update conf.py from git tag, fix sphinx warnings
Fixes esp8266#5671 Implements https://protips.readthedocs.io/git-tag-version.html Fix a myriad of minor Sphinx warnings generated in the docs.
1 parent 56268b1 commit f87844f

10 files changed

+58
-60
lines changed

doc/boards.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -336,22 +336,22 @@ LOLIN(WEMOS) D1 mini Lite
336336
-------------------------
337337

338338
Parameters in Arduino IDE:
339-
~~~~~~~~~~~~~~~~~~~~~~~~~
339+
~~~~~~~~~~~~~~~~~~~~~~~~~~
340340

341341
- Card: "WEMOS D1 Mini Lite"
342342
- Flash Size: "1M (512K SPIFFS)"
343343
- CPU Frequency: "80 Mhz"
344344
- Upload Speed: "230400"
345345

346346
Power:
347-
~~~~~
347+
~~~~~~
348348

349349
- 5V pin : 4.7V 500mA output when the board is powered by USB ; 3.5V-6V input
350350
- 3V3 pin : 3.3V 500mA regulated output
351351
- Digital pins : 3.3V 30mA.
352352

353353
links:
354-
~~~~~
354+
~~~~~~
355355

356356
- Product page: https://www.wemos.cc/
357357
- Board schematic: https://wiki.wemos.cc/_media/products:d1:sch_d1_mini_lite_v1.0.0.pdf

doc/conf.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
# add these directories to sys.path here. If the directory is relative to the
1717
# documentation root, use os.path.abspath to make it absolute, like shown here.
1818
#
19+
import re
1920
import os
2021
import sys
2122
# sys.path.insert(0, os.path.abspath('.'))
@@ -55,10 +56,10 @@
5556
# |version| and |release|, also used in various other places throughout the
5657
# built documents.
5758
#
59+
# Tip from https://protips.readthedocs.io/git-tag-version.html to get version from tag
60+
release = re.sub('^v', '', os.popen('git describe').read().strip())
5861
# The short X.Y version.
59-
version = u'2.5.0-beta3'
60-
# The full version, including alpha/beta/rc tags.
61-
release = u'2.5.0-beta3'
62+
version = release
6263

6364
# The language for content autogenerated by Sphinx. Refer to documentation
6465
# for a list of supported languages.

doc/esp8266wifi/bearssl-client-secure-class.rst

+10-10
Original file line numberDiff line numberDiff line change
@@ -125,22 +125,22 @@ Prior to connecting to a server, the `BearSSL::WiFiClientSecure` needs to be tol
125125
There are multiple modes to tell BearSSL how to verify the identity of the remote server. See the `BearSSL_Validation` example for real uses of the following methods:
126126

127127
setInsecure()
128-
^^^^^^^^^^^^^^^
128+
^^^^^^^^^^^^^
129129

130130
Don't verify any X509 certificates. There is no guarantee that the server connected to is the one you think it is in this case, but this call will mimic the behavior of the deprecated axTLS code.
131131

132-
setKnownKey(const BearSSL::PublicKey *pk)
133-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
132+
setKnownKey(const BearSSL::PublicKey \*pk)
133+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
134134

135135
Assume the server is using the specific public key. This does not verify the identity of the server or the X509 certificate it sends, it simply assumes that its public key is the one given. If the server updates its public key at a later point then connections will fail.
136136

137-
setFingerprint(const uint8_t fp[20]) / setFingerprint(const char *fpStr)
138-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
137+
setFingerprint(const uint8_t fp[20]) / setFingerprint(const char \*fpStr)
138+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
139139

140140
Verify the SHA1 fingerprint of the certificate returned matches this one. If the server certificate changes, it will fail. If an array of 20 bytes are sent in, it is assumed they are the binary SHA1 values. If a `char*` string is passed in, it is parsed as a series of human-readable hex values separated by spaces or colons (e.g. `setFingerprint("00:01:02:03:...:1f");`)
141141

142-
setTrustAnchors(BearSSL::X509List *ta)
143-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
142+
setTrustAnchors(BearSSL::X509List \*ta)
143+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
144144

145145
Use the passed-in certificate(s) as a trust anchor, accepting remote certificates signed by any of these. If you have many trust anchors it may make sense to use a `BearSSL::CertStore` because it will only require RAM for a single trust anchor (while the `setTrustAnchors` call requires memory for all certificates in the list).
146146

@@ -184,7 +184,7 @@ Sessions (Resuming connections fast)
184184
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
185185

186186
setSession(BearSSL::Session &sess)
187-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
187+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
188188

189189
If you are connecting to a server repeatedly in a fixed time period (usually 30 or 60 minutes, but normally configurable at the server), a TLS session can be used to cache crypto settings and speed up connections significantly.
190190

@@ -193,8 +193,8 @@ Errors
193193

194194
BearSSL can fail in many more unique and interesting ways then the deprecated axTLS. Use these calls to get more information when something fails.
195195

196-
getLastSSLError(char *dest = NULL, size_t len = 0)
197-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
196+
getLastSSLError(char \*dest = NULL, size_t len = 0)
197+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
198198

199199
Returns the last BearSSL error code encountered and optionally set a user-allocated buffer to a human-readable form of the error. To only get the last error integer code, just call without any parameters (`int errCode = getLastSSLError();`).
200200

doc/esp8266wifi/bearssl-server-secure-class.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ TLS servers require a certificate identifying itself and containing its public k
1717

1818
This example command will generate a RSA 2048-bit key and certificate:
1919

20-
.. code::
20+
.. code:: bash
2121
2222
openssl req -x509 -nodes -newkey rsa:2048 -keyout key.pem -out cert.pem -days 4096
2323
2424
Again, it is up to the application author to generate this certificate and key and keep the private key safe and **private.**
2525

26-
setRSACert(const BearSSL::X509List *chain, const BearSSL::PrivateKey *sk)
27-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
26+
setRSACert(const BearSSL::X509List \*chain, const BearSSL::PrivateKey \*sk)
27+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2828

2929
Sets a RSA certificate and key to be used by the server when connections are received. Needs to be called before `begin()`
3030

31-
setECCert(const BearSSL::X509List *chain, unsigned cert_issuer_key_type, const BearSSL::PrivateKey *sk)
32-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
31+
setECCert(const BearSSL::X509List \*chain, unsigned cert_issuer_key_type, const BearSSL::PrivateKey \*sk)
32+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3333

3434
Sets an elliptic curve certificate and key for the server. Needs to be called before `begin()`.
3535

@@ -38,7 +38,7 @@ Requiring Client Certificates
3838

3939
TLS servers can request the client to identify itself by transmitting a certificate during handshake. If the client cannot transmit the certificate, the connection will be dropped by the server.
4040

41-
setClientTrustAnchor(const BearSSL::X509List *client_CA_ta)
42-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
41+
setClientTrustAnchor(const BearSSL::X509List \*client_CA_ta)
42+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4343

4444
Sets the trust anchor (normally a self-signing CA) that all received certificates will be verified against. Needs to be called before `begin()`.

doc/esp8266wifi/station-class.rst

-1
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,6 @@ Return the status of Wi-Fi connection.
442442
.. code:: cpp
443443
444444
WiFi.status()
445-
::
446445
447446
Function returns one of the following connection statuses:
448447

doc/faq/a02-my-esp-crashes.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -308,9 +308,9 @@ Memory, memory, memory
308308
Stack
309309
  The amount of stack in the ESP is tiny at only 4KB. For normal developement in large systems, it
310310
is good practice to use and abuse the stack, because it is faster for allocation/deallocation, the scope of the object is well defined, and deallocation automatically happens in reverse order as allocation, which means no mem fragmentation. However, with the tiny amount of stack available in the ESP, that practice is not really viable, at least not for big objects.
311-
* Large objects that have internally managed memory, such as String, std::string, std::vector, etc, are ok on the stack, because they internally allocate their buffers on the heap.
312-
* Large arrays on the stack, such as uint8_t buffer[2048] should be avoided on the stack and be dynamically allocated (consider smart pointers).
313-
* Objects that have large data members, such as large arrays, should be avoided on the stack, and be dynamicaly allocated (consider smart pointers).
311+
* Large objects that have internally managed memory, such as String, std::string, std::vector, etc, are ok on the stack, because they internally allocate their buffers on the heap.
312+
* Large arrays on the stack, such as uint8_t buffer[2048] should be avoided on the stack and be dynamically allocated (consider smart pointers).
313+
* Objects that have large data members, such as large arrays, should be avoided on the stack, and be dynamicaly allocated (consider smart pointers).
314314

315315

316316
If at the Wall, Enter an Issue Report

doc/gdb.rst

+24-22
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ ELF format version of it (which includes needed debug symbols).
7676

7777
Under Linux these files are stored in ``/tmp/arduino_build_*`` and the following command will help locate the right file for your app:
7878

79-
.. code:: cpp
79+
.. code:: bash
8080
8181
find /tmp -name "*.elf" -print
8282
8383
Under Windows these files are stored in ``%userprofile%\AppData\Local\Temp\arduino_build_*`` and the following command will help locate the right file for your app:
8484

85-
.. code:: cpp
85+
.. code:: bash
8686
8787
dir %userprofile%\appdata\*.elf /s/b
8888
@@ -98,19 +98,19 @@ directory.
9898

9999
Linux
100100

101-
.. code:: cpp
101+
.. code:: bash
102102
103103
~/.arduino15/packages/esp8266/hardware/xtensa-lx106-elf/bin/xtensa-lx106-elf-gdb
104104
105105
Windows (Using Board Manager version)
106106

107-
.. code:: cpp
107+
.. code:: bash
108108
109109
%userprofile%\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\2.5.0-3-20ed2b9\bin\xtensa-lx106-elf-gdb.exe
110110
111111
Windows (Using Git version)
112112

113-
.. code:: cpp
113+
.. code:: bash
114114
115115
%userprofile%\Documents\Arduino\hardware\esp8266com\esp8266\tools\xtensa-lx106-elf\bin\xtensa-lx106-elf-gdb.exe
116116
@@ -124,7 +124,7 @@ Apply the GDB Configurations
124124
At the ``(gdb)`` prompt, enter the following options to configure GDB for the
125125
ESP8266 memory map and configuration:
126126

127-
.. code:: cpp
127+
.. code:: bash
128128
129129
set remote hardware-breakpoint-limit 1
130130
set remote hardware-watchpoint-limit 1
@@ -142,7 +142,7 @@ ESP8266 memory map and configuration:
142142
143143
Now tell GDB where your compiled ELF file is located:
144144

145-
.. code:: cpp
145+
.. code:: bash
146146
147147
file /tmp/arduino_build_257110/sketch_dec26a.ino.elf
148148
@@ -153,13 +153,13 @@ Once GDB has been configured properly and loaded your debugging symbols, connect
153153
it to the ESP with the command (replace the ttyUSB0 or COM9 with your ESP's serial
154154
port):
155155

156-
.. code:: cpp
156+
.. code:: bash
157157
158158
target remote /dev/ttyUSB0
159159
160160
or
161161

162-
.. code:: cpp
162+
.. code:: bash
163163
164164
target remote \\.\COM9
165165
@@ -191,7 +191,7 @@ Create a new sketch and paste the following code into it:
191191
Save it and then build and upload to your ESP8266. On the Serial monitor you
192192
should see something like
193193

194-
.. code:: cpp
194+
.. code:: bash
195195
196196
1
197197
2
@@ -203,7 +203,7 @@ Now close the Serial Monitor.
203203

204204
Open a command prompt and find the ELF file:
205205

206-
.. code:: cpp
206+
.. code:: bash
207207
208208
earle@server:~$ find /tmp -name "*.elf" -print
209209
/tmp/arduino_build_257110/testgdb.ino.elf
@@ -215,7 +215,7 @@ the one we just built, ``testgdb.ino.elf``.
215215

216216
Open up the proper ESP8266-specific GDB
217217

218-
.. code:: cpp
218+
.. code:: bash
219219
220220
earle@server:~$ ~/.arduino15/packages/esp8266/hardware/xtensa-lx106-elf/bin/xtensa-lx106-elf-gdb
221221
GNU gdb (GDB) 8.2.50.20180723-git
@@ -238,7 +238,7 @@ Open up the proper ESP8266-specific GDB
238238
We're now at the GDB prompt, but nothing has been set up for the ESP8266
239239
and no debug information has been loaded. Cut-and-paste the setup options:
240240

241-
.. code:: cpp
241+
.. code:: bash
242242
243243
(gdb) set remote hardware-breakpoint-limit 1
244244
(gdb) set remote hardware-watchpoint-limit 1
@@ -257,14 +257,14 @@ and no debug information has been loaded. Cut-and-paste the setup options:
257257
258258
And tell GDB where the debugging info ELF file is located:
259259

260-
.. code:: cpp
260+
.. code:: bash
261261
262262
(gdb) file /tmp/arduino_build_257110/testgdb.ino.elf
263263
Reading symbols from /tmp/arduino_build_257110/testgdb.ino.elf...done.
264264
265265
Now, connect to the running ESP8266:
266266

267-
.. code:: cpp
267+
.. code:: bash
268268
269269
(gdb) target remote /dev/ttyUSB0
270270
Remote debugging using /dev/ttyUSB0
@@ -279,7 +279,7 @@ output will be displayed on the GDB console..
279279

280280
Continue the running app to see the serial output:
281281

282-
.. code:: cpp
282+
.. code:: bash
283283
284284
(gdb) cont
285285
Continuing.
@@ -291,7 +291,8 @@ Continue the running app to see the serial output:
291291
292292
The app is back running and we can stop it at any time using ``Ctrl-C``:
293293

294-
.. code:: cpp
294+
.. code:: bash
295+
295296
113
296297
^C
297298
Program received signal SIGINT, Interrupt.
@@ -301,7 +302,7 @@ The app is back running and we can stop it at any time using ``Ctrl-C``:
301302
At this point we can set a breakpoint on the main ``loop()`` and restart
302303
to get into our own code:
303304

304-
.. code:: cpp
305+
.. code:: bash
305306
306307
(gdb) break loop
307308
Breakpoint 1 at 0x40202e33: file /home/earle/Arduino/sketch_dec26a/sketch_dec26a.ino, line 10.
@@ -316,7 +317,8 @@ to get into our own code:
316317
317318
Let's examine the local variable:
318319

319-
.. code:: cpp
320+
.. code:: bash
321+
320322
(gdb) next
321323
loop () at /home/earle/Arduino/sketch_dec26a/sketch_dec26a.ino:13
322324
13 Serial.printf("%d\n", cnt++);
@@ -326,7 +328,7 @@ Let's examine the local variable:
326328
327329
And change it:
328330

329-
.. code:: cpp
331+
.. code:: bash
330332
331333
$2 = 114
332334
(gdb) set cnt = 2000
@@ -336,7 +338,7 @@ And change it:
336338
337339
And restart the app and see our changes take effect:
338340

339-
.. code:: cpp
341+
.. code:: bash
340342
341343
(gdb) cont
342344
Continuing.
@@ -352,7 +354,7 @@ And restart the app and see our changes take effect:
352354
353355
Looks like we left the breakpoint on loop(), let's get rid of it and try again:
354356
355-
.. code:: cpp
357+
.. code:: bash
356358
357359
(gdb) delete
358360
Delete all breakpoints? (y or n) y

doc/installing.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ Prerequisites
4848

4949
- Arduino 1.6.8 (or newer, current working version is 1.8.5)
5050
- git
51-
- Python_ 2.7 (http://python.org)
51+
- Python 2.7 (http://python.org)
5252
- terminal, console, or command prompt (depending on your OS)
5353
- Internet connection
5454

5555
Instructions - Windows 10
56-
~~~~~~~~~~~~
56+
~~~~~~~~~~~~~~~~~~~~~~~~~
5757
- First, make sure you don't already have the ESP8266 library installed using the Board Manager (see above)
5858

5959
- Install git for Windows (if not already; see https://git-scm.com/download/win)
@@ -133,7 +133,7 @@ Note that you could, in theory install in ``C:\Program Files (x86)\Arduino\hardw
133133
134134
135135
Instructions - Other OS
136-
~~~~~~~~~~~~
136+
~~~~~~~~~~~~~~~~~~~~~~~
137137
138138
- Open the console and go to Arduino directory. This can be either your
139139
*sketchbook* directory (usually ``<Documents>/Arduino``), or the

0 commit comments

Comments
 (0)