Skip to content

Commit 9592c2b

Browse files
authored
Doc - cleanup (#9253)
mention esptool.FatalError & syntax corrections un-orphan FAQ and toctree glob inclusion
1 parent 0ecb6f0 commit 9592c2b

8 files changed

+138
-37
lines changed

doc/faq/readme.rst renamed to doc/faq.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ Please feel free to contribute if you believe that some frequent issues
1313
are not covered below.
1414

1515

16-
I am getting "espcomm\_sync failed" error when trying to upload my ESP. How to resolve this issue?
17-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16+
I am getting "espcomm\_sync failed", "esptool.FatalError", etc. How to resolve this issue?
17+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1818

1919
This message indicates issue with uploading ESP module over a serial
2020
connection. There are couple of possible causes, that depend on the type
2121
of your module, if you use separate USB to serial converter.
2222

23-
`Read more <a01-espcomm_sync-failed.rst>`__.
23+
`Read more <faq/a01-upload-failed.rst>`__.
2424

2525
Why esptool is not listed in "Programmer" menu? How do I upload ESP without it?
2626
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -38,7 +38,7 @@ My ESP crashes running some code. How to troubleshoot it?
3838
The code may crash because of s/w bug or issue with your h/w. Before
3939
entering an issue report, please perform initial troubleshooting.
4040

41-
`Read more <a02-my-esp-crashes.rst>`__.
41+
`Read more <faq/a02-my-esp-crashes.rst>`__.
4242

4343
How can I get some extra KBs in flash ?
4444
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -50,7 +50,7 @@ How can I get some extra KBs in flash ?
5050

5151
* Use the debug level option ``NoAssert-NDEBUG`` (in the Tools menu)
5252

53-
`Read more <a05-board-generator.rst>`__.
53+
`Read more <faq/a05-board-generator.rst>`__.
5454

5555
About WPS
5656
~~~~~~~~~
@@ -63,7 +63,7 @@ required to enable it:
6363

6464
``./tools/boards.txt.py --allowWPS --boardsgen``
6565

66-
`Read more <a05-board-generator.rst>`__.
66+
`Read more <faq/a05-board-generator.rst>`__.
6767

6868
For platformIO (and maybe other build environments), you will also need to add the build flag: -D NO_EXTRA_4K_HEAP
6969

@@ -77,7 +77,7 @@ This Arduino library doesn't work on ESP. How do I make it work?
7777
You would like to use this Arduino library with ESP8266 and it does not
7878
perform. It is not listed among libraries verified to work with ESP8266.
7979

80-
`Read more <a03-library-does-not-work.rst>`__.
80+
`Read more <faq/a03-library-does-not-work.rst>`__.
8181

8282
In the IDE, for ESP-12E that has 4M flash, I can choose 4M (1M FS) or 4M (3M FS). No matter what I select, the IDE tells me the maximum code space is about 1M. Where does my flash go?
8383
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -118,7 +118,7 @@ This error may pop up after switching between
118118
`staging <https://github.com/esp8266/Arduino#staging-version->`__ and
119119
`stable <https://github.com/esp8266/Arduino#stable-version->`__ esp8266
120120
/ Arduino package installations, or after upgrading the package version
121-
`Read more <a04-board-generic-is-unknown.rst>`__.
121+
`Read more <faq/a04-board-generic-is-unknown.rst>`__.
122122

123123

124124
How to clear TCP PCBs in time-wait state ?
@@ -199,4 +199,4 @@ By using a uniquely named `.h` file, macro definitions can be created and
199199
globally used. Additionally, compiler command-line options can be embedded in
200200
this file as a unique block comment.
201201

202-
`Read more <a06-global-build-options.rst>`__.
202+
`Read more <faq/a06-global-build-options.rst>`__.

doc/faq/a01-espcomm_sync-failed.rst renamed to doc/faq/a01-upload-failed.rst

Lines changed: 109 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
:orphan:
2-
3-
I am getting "espcomm\_sync failed" error when trying to upload my ESP. How to resolve this issue?
4-
--------------------------------------------------------------------------------------------------
1+
Why I am getting errors when trying to upload to my ESP?
2+
--------------------------------------------------------
53

64
- `Introduction <#introduction>`__
75
- `Initial Checks <#initial-checks>`__
@@ -15,14 +13,24 @@ I am getting "espcomm\_sync failed" error when trying to upload my ESP. How to r
1513
Introduction
1614
~~~~~~~~~~~~
1715

18-
This message indicates issue with uploading ESP module over a serial
16+
Messages like
17+
18+
* ``espcomm_sync failed``
19+
20+
* ``esptool.FatalError: Failed to connect to ESP8266: Invalid head of packet (0xF0)``
21+
22+
* ``esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header``
23+
24+
indicate issue with with uploading ESP module over a serial
1925
connection. There are couple of possible causes, that depend on the type
2026
of module, if you use separate USB to serial converter, what parameters
2127
are selected for upload, etc. As result there is no single answer on the
2228
root cause. To find it out you may need to complete couple of
2329
troubleshooting steps.
2430

25-
Note: If you are just starting with ESP, to reduce potential issues
31+
.. note::
32+
33+
If you are just starting with ESP, to reduce potential issues
2634
with uploading, select ESP board with integrated USB to serial
2735
converter. This will considerably reduce number of user depended
2836
factors or configuration settings that influence upload process.
@@ -167,7 +175,93 @@ loading <../boards.rst#minimal-hardware-setup-for-bootloading-only>`__
167175
during: upload* and try uploading again. For successful upload this
168176
log should look similar to example shown below:
169177

170-
``C:\Users\Krzysztof\AppData\Local\Arduino15\packages\esp8266\tools\esptool\0.4.8/esptool.exe -vv -cd ck -cb 115200 -cp COM3 -ca 0x00000 -cf C:\Users\KRZYSZ~1\AppData\Local\Temp\build7e44b372385012e74d64fb272d24b802.tmp/Blink.ino.bin esptool v0.4.8 - (c) 2014 Ch. Klippel <[email protected]> setting board to ck setting baudrate from 115200 to 115200 setting port from COM1 to COM3 setting address from 0x00000000 to 0x00000000 espcomm_upload_file espcomm_upload_mem setting serial port timeouts to 1000 ms opening bootloader resetting board trying to connect flush start setting serial port timeouts to 1 ms setting serial port timeouts to 1000 ms flush complete espcomm_send_command: sending command header espcomm_send_command: sending command payload read 0, requested 1 trying to connect flush start setting serial port timeouts to 1 ms setting serial port timeouts to 1000 ms flush complete espcomm_send_command: sending command header espcomm_send_command: sending command payload espcomm_send_command: receiving 2 bytes of data espcomm_send_command: receiving 2 bytes of data espcomm_send_command: receiving 2 bytes of data espcomm_send_command: receiving 2 bytes of data espcomm_send_command: receiving 2 bytes of data espcomm_send_command: receiving 2 bytes of data espcomm_send_command: receiving 2 bytes of data espcomm_send_command: receiving 2 bytes of data Uploading 226368 bytes from to flash at 0x00000000 erasing flash size: 037440 address: 000000 first_sector_index: 0 total_sector_count: 56 head_sector_count: 16 adjusted_sector_count: 40 erase_size: 028000 espcomm_send_command: sending command header espcomm_send_command: sending command payload setting serial port timeouts to 15000 ms setting serial port timeouts to 1000 ms espcomm_send_command: receiving 2 bytes of data writing flash .............................................................................................................................................................................................................................. starting app without reboot espcomm_send_command: sending command header espcomm_send_command: sending command payload espcomm_send_command: receiving 2 bytes of data closing bootloader flush start setting serial port timeouts to 1 ms setting serial port timeouts to 1000 ms flush complete``
178+
For example, uploading using esptool.py and esptool
179+
180+
.. code-block:: console
181+
182+
$ esptool.py --after no_reset --chip esp8266 --baud 460800 write_flash 0x0 d1-mini-firmware.bin
183+
esptool.py v4.5.1
184+
Found 1 serial ports
185+
Serial port /dev/ttyUSB0
186+
Connecting....
187+
Chip is ESP8266EX
188+
Features: WiFi
189+
Crystal is 26MHz
190+
MAC: 11:22:33:44:55:66
191+
Uploading stub...
192+
Running stub...
193+
Stub running...
194+
Changing baud rate to 460800
195+
Changed.
196+
Configuring flash size...
197+
Flash will be erased from 0x00000000 to 0x0004efff...
198+
Compressed 321440 bytes to 221714...
199+
Wrote 321440 bytes (221714 compressed) at 0x00000000 in 5.0 seconds (effective 511.4 kbit/s)...
200+
Hash of data verified.
201+
202+
Leaving...
203+
Staying in bootloader.
204+
205+
206+
.. code-block:: console
207+
208+
> C:\Users\Krzysztof\AppData\Local\Arduino15\packages\esp8266\tools\esptool\0.4.8/esptool.exe -vv -cd ck -cb 115200 -cp COM3 -ca 0x00000 -cf C:\Users\KRZYSZ~1\AppData\Local\Temp\build7e44b372385012e74d64fb272d24b802.tmp/Blink.ino.bin
209+
esptool v0.4.8 - (c) 2014 Ch. Klippel <[email protected]>
210+
setting board to ck
211+
setting baudrate from 115200 to 115200
212+
setting port from COM1 to COM3
213+
setting address from 0x00000000 to 0x00000000
214+
espcomm_upload_file
215+
espcomm_upload_mem
216+
setting serial port timeouts to 1000 ms
217+
opening bootloader
218+
resetting board
219+
trying to connect
220+
flush start
221+
setting serial port timeouts to 1 ms
222+
setting serial port timeouts to 1000 ms
223+
flush complete
224+
espcomm_send_command: sending command header
225+
espcomm_send_command: sending command payload
226+
read 0, requested 1
227+
trying to connect
228+
flush start
229+
setting serial port timeouts to 1 ms
230+
setting serial port timeouts to 1000 ms
231+
flush complete
232+
espcomm_send_command: sending command header
233+
espcomm_send_command: sending command payload
234+
espcomm_send_command: receiving 2 bytes of data
235+
espcomm_send_command: receiving 2 bytes of data
236+
espcomm_send_command: receiving 2 bytes of data
237+
espcomm_send_command: receiving 2 bytes of data
238+
espcomm_send_command: receiving 2 bytes of data
239+
espcomm_send_command: receiving 2 bytes of data
240+
espcomm_send_command: receiving 2 bytes of data
241+
espcomm_send_command: receiving 2 bytes of data
242+
Uploading 226368 bytes from to flash at 0x00000000
243+
erasing flash
244+
size: 037440 address: 000000
245+
first_sector_index: 0
246+
total_sector_count: 56
247+
head_sector_count: 16
248+
adjusted_sector_count: 40
249+
erase_size: 028000
250+
espcomm_send_command: sending command header
251+
espcomm_send_command: sending command payload
252+
setting serial port timeouts to 15000 ms
253+
setting serial port timeouts to 1000 ms
254+
espcomm_send_command: receiving 2 bytes of data
255+
writing flash ..............................................................................................................................................................................................................................
256+
starting app without reboot
257+
espcomm_send_command: sending command header
258+
espcomm_send_command: sending command payload
259+
espcomm_send_command: receiving 2 bytes of data
260+
closing bootloader
261+
flush start
262+
setting serial port timeouts to 1 ms
263+
setting serial port timeouts to 1000 ms
264+
flush complete
171265
172266
Upload log may be longer depending on number of connection attempts made
173267
by esptool. Analyze it for any anomalies to configuration you have
@@ -177,7 +271,7 @@ rate, etc. Resolve all noted differences.
177271
Reset Methods
178272
~~~~~~~~~~~~~
179273

180-
If you got to this point and still see ``espcomm_sync failed``, then now
274+
If you got to this point and still see uploading error, then now
181275
you need to bring in the heavy guns.
182276

183277
Connect scope or logic analyzer to GPIO0, RST and RXD pins of the ESP to
@@ -238,13 +332,13 @@ Each retry is reported in upload log as follows:
238332

239333
resetting board
240334
trying to connect
241-
flush start
242-
setting serial port timeouts to 1 ms
243-
setting serial port timeouts to 1000 ms
244-
flush complete
245-
espcomm_send_command: sending command header
246-
espcomm_send_command: sending command payload
247-
read 0, requested 1
335+
flush start
336+
setting serial port timeouts to 1 ms
337+
setting serial port timeouts to 1000 ms
338+
flush complete
339+
espcomm_send_command: sending command header
340+
espcomm_send_command: sending command payload
341+
read 0, requested 1
248342

249343
Presented circuit has one important limitation when it comes to work
250344
with Arduino IDE. After opening Serial Monitor (Ctrl-Shift-M), both RTS

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
:orphan:
2-
31
My ESP crashes running some code. How to troubleshoot it?
42
---------------------------------------------------------
53

doc/faq/a03-library-does-not-work.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
:orphan:
2-
31
This Arduino library doesn't work on ESP. How do I make it working?
42
-------------------------------------------------------------------
53

doc/faq/a04-board-generic-is-unknown.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
:orphan:
2-
31
How to resolve "Board generic (platform esp8266, package esp8266) is unknown" error?
42
------------------------------------------------------------------------------------
53

doc/faq/a05-board-generator.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
:orphan:
2-
31
Board generator
42
---------------
53

doc/faq/a06-global-build-options.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
:orphan:
2-
31
How to specify global build defines and options
42
===============================================
53

doc/index.rst

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
Welcome to ESP8266 Arduino Core's documentation!
22
================================================
33

4+
Using ESP8266 Core
5+
==================
6+
47
.. toctree::
58
:maxdepth: 2
6-
:caption: Contents:
79

810
Installing <installing>
911
Arduino IDE options <ideoptions>
@@ -15,11 +17,26 @@ Welcome to ESP8266 Arduino Core's documentation!
1517
PROGMEM <PROGMEM>
1618
Using GDB to debug <gdb>
1719
MMU <mmu>
18-
1920
Boards <boards>
20-
FAQ <faq/readme>
2121

22+
Troubleshooting
23+
===============
24+
.. toctree::
25+
:caption: Troubleshooting
26+
:maxdepth: 2
27+
28+
FAQ <faq>
2229
Exception causes <exception_causes>
2330
Debugging <Troubleshooting/debugging>
2431
Stack Dump <Troubleshooting/stack_dump>
2532
Using with Eclipse <eclipse/eclipse>
33+
34+
FAQ
35+
===
36+
.. toctree::
37+
:caption: FAQ
38+
:maxdepth: 2
39+
:titlesonly:
40+
:glob:
41+
42+
faq/*

0 commit comments

Comments
 (0)