mirror of
https://github.com/esp8266/Arduino.git
synced 2025-08-01 03:47:23 +03:00
Doc - cleanup (#9253)
mention esptool.FatalError & syntax corrections un-orphan FAQ and toctree glob inclusion
This commit is contained in:
@ -13,14 +13,14 @@ Please feel free to contribute if you believe that some frequent issues
|
|||||||
are not covered below.
|
are not covered below.
|
||||||
|
|
||||||
|
|
||||||
I am getting "espcomm\_sync failed" error when trying to upload my ESP. How to resolve this issue?
|
I am getting "espcomm\_sync failed", "esptool.FatalError", etc. How to resolve this issue?
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
This message indicates issue with uploading ESP module over a serial
|
This message indicates issue with uploading ESP module over a serial
|
||||||
connection. There are couple of possible causes, that depend on the type
|
connection. There are couple of possible causes, that depend on the type
|
||||||
of your module, if you use separate USB to serial converter.
|
of your module, if you use separate USB to serial converter.
|
||||||
|
|
||||||
`Read more <a01-espcomm_sync-failed.rst>`__.
|
`Read more <faq/a01-upload-failed.rst>`__.
|
||||||
|
|
||||||
Why esptool is not listed in "Programmer" menu? How do I upload ESP without it?
|
Why esptool is not listed in "Programmer" menu? How do I upload ESP without it?
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
@ -38,7 +38,7 @@ My ESP crashes running some code. How to troubleshoot it?
|
|||||||
The code may crash because of s/w bug or issue with your h/w. Before
|
The code may crash because of s/w bug or issue with your h/w. Before
|
||||||
entering an issue report, please perform initial troubleshooting.
|
entering an issue report, please perform initial troubleshooting.
|
||||||
|
|
||||||
`Read more <a02-my-esp-crashes.rst>`__.
|
`Read more <faq/a02-my-esp-crashes.rst>`__.
|
||||||
|
|
||||||
How can I get some extra KBs in flash ?
|
How can I get some extra KBs in flash ?
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
@ -50,7 +50,7 @@ How can I get some extra KBs in flash ?
|
|||||||
|
|
||||||
* Use the debug level option ``NoAssert-NDEBUG`` (in the Tools menu)
|
* Use the debug level option ``NoAssert-NDEBUG`` (in the Tools menu)
|
||||||
|
|
||||||
`Read more <a05-board-generator.rst>`__.
|
`Read more <faq/a05-board-generator.rst>`__.
|
||||||
|
|
||||||
About WPS
|
About WPS
|
||||||
~~~~~~~~~
|
~~~~~~~~~
|
||||||
@ -63,7 +63,7 @@ required to enable it:
|
|||||||
|
|
||||||
``./tools/boards.txt.py --allowWPS --boardsgen``
|
``./tools/boards.txt.py --allowWPS --boardsgen``
|
||||||
|
|
||||||
`Read more <a05-board-generator.rst>`__.
|
`Read more <faq/a05-board-generator.rst>`__.
|
||||||
|
|
||||||
For platformIO (and maybe other build environments), you will also need to add the build flag: -D NO_EXTRA_4K_HEAP
|
For platformIO (and maybe other build environments), you will also need to add the build flag: -D NO_EXTRA_4K_HEAP
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ This Arduino library doesn't work on ESP. How do I make it work?
|
|||||||
You would like to use this Arduino library with ESP8266 and it does not
|
You would like to use this Arduino library with ESP8266 and it does not
|
||||||
perform. It is not listed among libraries verified to work with ESP8266.
|
perform. It is not listed among libraries verified to work with ESP8266.
|
||||||
|
|
||||||
`Read more <a03-library-does-not-work.rst>`__.
|
`Read more <faq/a03-library-does-not-work.rst>`__.
|
||||||
|
|
||||||
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?
|
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?
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
@ -118,7 +118,7 @@ This error may pop up after switching between
|
|||||||
`staging <https://github.com/esp8266/Arduino#staging-version->`__ and
|
`staging <https://github.com/esp8266/Arduino#staging-version->`__ and
|
||||||
`stable <https://github.com/esp8266/Arduino#stable-version->`__ esp8266
|
`stable <https://github.com/esp8266/Arduino#stable-version->`__ esp8266
|
||||||
/ Arduino package installations, or after upgrading the package version
|
/ Arduino package installations, or after upgrading the package version
|
||||||
`Read more <a04-board-generic-is-unknown.rst>`__.
|
`Read more <faq/a04-board-generic-is-unknown.rst>`__.
|
||||||
|
|
||||||
|
|
||||||
How to clear TCP PCBs in time-wait state ?
|
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
|
|||||||
globally used. Additionally, compiler command-line options can be embedded in
|
globally used. Additionally, compiler command-line options can be embedded in
|
||||||
this file as a unique block comment.
|
this file as a unique block comment.
|
||||||
|
|
||||||
`Read more <a06-global-build-options.rst>`__.
|
`Read more <faq/a06-global-build-options.rst>`__.
|
@ -1,7 +1,5 @@
|
|||||||
:orphan:
|
Why I am getting errors when trying to upload to my ESP?
|
||||||
|
--------------------------------------------------------
|
||||||
I am getting "espcomm\_sync failed" error when trying to upload my ESP. How to resolve this issue?
|
|
||||||
--------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
- `Introduction <#introduction>`__
|
- `Introduction <#introduction>`__
|
||||||
- `Initial Checks <#initial-checks>`__
|
- `Initial Checks <#initial-checks>`__
|
||||||
@ -15,14 +13,24 @@ I am getting "espcomm\_sync failed" error when trying to upload my ESP. How to r
|
|||||||
Introduction
|
Introduction
|
||||||
~~~~~~~~~~~~
|
~~~~~~~~~~~~
|
||||||
|
|
||||||
This message indicates issue with uploading ESP module over a serial
|
Messages like
|
||||||
|
|
||||||
|
* ``espcomm_sync failed``
|
||||||
|
|
||||||
|
* ``esptool.FatalError: Failed to connect to ESP8266: Invalid head of packet (0xF0)``
|
||||||
|
|
||||||
|
* ``esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header``
|
||||||
|
|
||||||
|
indicate issue with with uploading ESP module over a serial
|
||||||
connection. There are couple of possible causes, that depend on the type
|
connection. There are couple of possible causes, that depend on the type
|
||||||
of module, if you use separate USB to serial converter, what parameters
|
of module, if you use separate USB to serial converter, what parameters
|
||||||
are selected for upload, etc. As result there is no single answer on the
|
are selected for upload, etc. As result there is no single answer on the
|
||||||
root cause. To find it out you may need to complete couple of
|
root cause. To find it out you may need to complete couple of
|
||||||
troubleshooting steps.
|
troubleshooting steps.
|
||||||
|
|
||||||
Note: If you are just starting with ESP, to reduce potential issues
|
.. note::
|
||||||
|
|
||||||
|
If you are just starting with ESP, to reduce potential issues
|
||||||
with uploading, select ESP board with integrated USB to serial
|
with uploading, select ESP board with integrated USB to serial
|
||||||
converter. This will considerably reduce number of user depended
|
converter. This will considerably reduce number of user depended
|
||||||
factors or configuration settings that influence upload process.
|
factors or configuration settings that influence upload process.
|
||||||
@ -167,7 +175,93 @@ loading <../boards.rst#minimal-hardware-setup-for-bootloading-only>`__
|
|||||||
during: upload* and try uploading again. For successful upload this
|
during: upload* and try uploading again. For successful upload this
|
||||||
log should look similar to example shown below:
|
log should look similar to example shown below:
|
||||||
|
|
||||||
``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 <ck@atelier-klippel.de> 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``
|
For example, uploading using esptool.py and esptool
|
||||||
|
|
||||||
|
.. code-block:: console
|
||||||
|
|
||||||
|
$ esptool.py --after no_reset --chip esp8266 --baud 460800 write_flash 0x0 d1-mini-firmware.bin
|
||||||
|
esptool.py v4.5.1
|
||||||
|
Found 1 serial ports
|
||||||
|
Serial port /dev/ttyUSB0
|
||||||
|
Connecting....
|
||||||
|
Chip is ESP8266EX
|
||||||
|
Features: WiFi
|
||||||
|
Crystal is 26MHz
|
||||||
|
MAC: 11:22:33:44:55:66
|
||||||
|
Uploading stub...
|
||||||
|
Running stub...
|
||||||
|
Stub running...
|
||||||
|
Changing baud rate to 460800
|
||||||
|
Changed.
|
||||||
|
Configuring flash size...
|
||||||
|
Flash will be erased from 0x00000000 to 0x0004efff...
|
||||||
|
Compressed 321440 bytes to 221714...
|
||||||
|
Wrote 321440 bytes (221714 compressed) at 0x00000000 in 5.0 seconds (effective 511.4 kbit/s)...
|
||||||
|
Hash of data verified.
|
||||||
|
|
||||||
|
Leaving...
|
||||||
|
Staying in bootloader.
|
||||||
|
|
||||||
|
|
||||||
|
.. code-block:: console
|
||||||
|
|
||||||
|
> 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 <ck@atelier-klippel.de>
|
||||||
|
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
|
||||||
|
|
||||||
Upload log may be longer depending on number of connection attempts made
|
Upload log may be longer depending on number of connection attempts made
|
||||||
by esptool. Analyze it for any anomalies to configuration you have
|
by esptool. Analyze it for any anomalies to configuration you have
|
||||||
@ -177,7 +271,7 @@ rate, etc. Resolve all noted differences.
|
|||||||
Reset Methods
|
Reset Methods
|
||||||
~~~~~~~~~~~~~
|
~~~~~~~~~~~~~
|
||||||
|
|
||||||
If you got to this point and still see ``espcomm_sync failed``, then now
|
If you got to this point and still see uploading error, then now
|
||||||
you need to bring in the heavy guns.
|
you need to bring in the heavy guns.
|
||||||
|
|
||||||
Connect scope or logic analyzer to GPIO0, RST and RXD pins of the ESP to
|
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:
|
|||||||
|
|
||||||
resetting board
|
resetting board
|
||||||
trying to connect
|
trying to connect
|
||||||
flush start
|
flush start
|
||||||
setting serial port timeouts to 1 ms
|
setting serial port timeouts to 1 ms
|
||||||
setting serial port timeouts to 1000 ms
|
setting serial port timeouts to 1000 ms
|
||||||
flush complete
|
flush complete
|
||||||
espcomm_send_command: sending command header
|
espcomm_send_command: sending command header
|
||||||
espcomm_send_command: sending command payload
|
espcomm_send_command: sending command payload
|
||||||
read 0, requested 1
|
read 0, requested 1
|
||||||
|
|
||||||
Presented circuit has one important limitation when it comes to work
|
Presented circuit has one important limitation when it comes to work
|
||||||
with Arduino IDE. After opening Serial Monitor (Ctrl-Shift-M), both RTS
|
with Arduino IDE. After opening Serial Monitor (Ctrl-Shift-M), both RTS
|
@ -1,5 +1,3 @@
|
|||||||
:orphan:
|
|
||||||
|
|
||||||
My ESP crashes running some code. How to troubleshoot it?
|
My ESP crashes running some code. How to troubleshoot it?
|
||||||
---------------------------------------------------------
|
---------------------------------------------------------
|
||||||
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
:orphan:
|
|
||||||
|
|
||||||
This Arduino library doesn't work on ESP. How do I make it working?
|
This Arduino library doesn't work on ESP. How do I make it working?
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
:orphan:
|
|
||||||
|
|
||||||
How to resolve "Board generic (platform esp8266, package esp8266) is unknown" error?
|
How to resolve "Board generic (platform esp8266, package esp8266) is unknown" error?
|
||||||
------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
:orphan:
|
|
||||||
|
|
||||||
Board generator
|
Board generator
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
:orphan:
|
|
||||||
|
|
||||||
How to specify global build defines and options
|
How to specify global build defines and options
|
||||||
===============================================
|
===============================================
|
||||||
|
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
Welcome to ESP8266 Arduino Core's documentation!
|
Welcome to ESP8266 Arduino Core's documentation!
|
||||||
================================================
|
================================================
|
||||||
|
|
||||||
|
Using ESP8266 Core
|
||||||
|
==================
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
:caption: Contents:
|
|
||||||
|
|
||||||
Installing <installing>
|
Installing <installing>
|
||||||
Arduino IDE options <ideoptions>
|
Arduino IDE options <ideoptions>
|
||||||
@ -15,11 +17,26 @@ Welcome to ESP8266 Arduino Core's documentation!
|
|||||||
PROGMEM <PROGMEM>
|
PROGMEM <PROGMEM>
|
||||||
Using GDB to debug <gdb>
|
Using GDB to debug <gdb>
|
||||||
MMU <mmu>
|
MMU <mmu>
|
||||||
|
|
||||||
Boards <boards>
|
Boards <boards>
|
||||||
FAQ <faq/readme>
|
|
||||||
|
|
||||||
|
Troubleshooting
|
||||||
|
===============
|
||||||
|
.. toctree::
|
||||||
|
:caption: Troubleshooting
|
||||||
|
:maxdepth: 2
|
||||||
|
|
||||||
|
FAQ <faq>
|
||||||
Exception causes <exception_causes>
|
Exception causes <exception_causes>
|
||||||
Debugging <Troubleshooting/debugging>
|
Debugging <Troubleshooting/debugging>
|
||||||
Stack Dump <Troubleshooting/stack_dump>
|
Stack Dump <Troubleshooting/stack_dump>
|
||||||
Using with Eclipse <eclipse/eclipse>
|
Using with Eclipse <eclipse/eclipse>
|
||||||
|
|
||||||
|
FAQ
|
||||||
|
===
|
||||||
|
.. toctree::
|
||||||
|
:caption: FAQ
|
||||||
|
:maxdepth: 2
|
||||||
|
:titlesonly:
|
||||||
|
:glob:
|
||||||
|
|
||||||
|
faq/*
|
||||||
|
Reference in New Issue
Block a user