1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-29 05:21:37 +03:00

docs: convert to .rst and add readthedocs

This commit is contained in:
Ivan Grokhotkov
2017-02-19 16:55:37 +08:00
committed by Ivan Grokhotkov
parent 5c7247b0f4
commit 283eb97cd3
81 changed files with 7191 additions and 6324 deletions

View File

@ -1,57 +0,0 @@
# AVR In-System Programming over WiFi for ESP8266
This library allows an ESP8266 module with the HSPI port available to become
an AVR In-System Programmer.
## Hardware
The ESP8266 module connects to the AVR target chip via the standard 6-pin
AVR "Recommended In-System Programming Interface Connector Layout" as seen
in [AVR910](http://www.atmel.com/images/doc0943.pdf) among other places.
If the AVR target is powered by a different Vcc than what powers your ESP8266
chip, you **must provide voltage level shifting** or some other form of buffers.
Exposing the pins of ESP8266 to anything larger than 3.6V will damage it.
Connections are as follows:
ESP8266 | AVR / SPI
--------|------------
GPIO12 | MISO
GPIO13 | MOSI
GPIO14 | SCK
any* | RESET
For RESET use a GPIO other than 0, 2 and 15 (bootselect pins), and apply an
external pullup/down so that the target is normally running.
## Usage
See the included example. In short:
```arduino
// Create the programmer object
ESP8266AVRISP avrprog(PORT, RESET_PIN)
// ... with custom SPI frequency
ESP8266AVRISP avrprog(PORT, RESET_PIN, 4e6)
// Check current connection state, but don't perform any actions
AVRISPState_t state = avrprog.update();
// Serve the pending connection, execute STK500 commands
AVRISPState_t state = avrprog.serve();
```
### License and Authors
This library started off from the source of ArduinoISP "sketch" included with
the Arduino IDE:
ArduinoISP version 04m3
Copyright (c) 2008-2011 Randall Bohn
If you require a license, see
http://www.opensource.org/licenses/bsd-license.php
Support for TCP on ESP8266
Copyright (c) Kiril Zyapkov <kiril@robotev.com>.

View File

@ -0,0 +1,70 @@
AVR In-System Programming over WiFi for ESP8266
===============================================
This library allows an ESP8266 module with the HSPI port available to
become an AVR In-System Programmer.
Hardware
--------
The ESP8266 module connects to the AVR target chip via the standard
6-pin AVR "Recommended In-System Programming Interface Connector Layout"
as seen in `AVR910 <http://www.atmel.com/images/doc0943.pdf>`__ among
other places.
If the AVR target is powered by a different Vcc than what powers your
ESP8266 chip, you **must provide voltage level shifting** or some other
form of buffers. Exposing the pins of ESP8266 to anything larger than
3.6V will damage it.
Connections are as follows:
+-----------+-------------+
| ESP8266 | AVR / SPI |
+===========+=============+
| GPIO12 | MISO |
+-----------+-------------+
| GPIO13 | MOSI |
+-----------+-------------+
| GPIO14 | SCK |
+-----------+-------------+
| any\* | RESET |
+-----------+-------------+
For RESET use a GPIO other than 0, 2 and 15 (bootselect pins), and apply
an external pullup/down so that the target is normally running.
Usage
-----
See the included example. In short:
.. code:: arduino
// Create the programmer object
ESP8266AVRISP avrprog(PORT, RESET_PIN)
// ... with custom SPI frequency
ESP8266AVRISP avrprog(PORT, RESET_PIN, 4e6)
// Check current connection state, but don't perform any actions
AVRISPState_t state = avrprog.update();
// Serve the pending connection, execute STK500 commands
AVRISPState_t state = avrprog.serve();
License and Authors
~~~~~~~~~~~~~~~~~~~
This library started off from the source of ArduinoISP "sketch" included
with the Arduino IDE:
::
ArduinoISP version 04m3
Copyright (c) 2008-2011 Randall Bohn
If you require a license, see
http://www.opensource.org/licenses/bsd-license.php
Support for TCP on ESP8266
Copyright (c) Kiril Zyapkov <kiril@robotev.com>.

View File

@ -1,22 +0,0 @@
ESP8266 Simple Service Discovery
Copyright (c) 2015 Hristo Gochkov
Original (Arduino) version by Filippo Sallemi, July 23, 2014.
Can be found at: https://github.com/nomadnt/uSSDP
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@ -0,0 +1,22 @@
ESP8266 Simple Service Discovery Copyright (c) 2015 Hristo Gochkov
Original (Arduino) version by Filippo Sallemi, July 23, 2014. Can be
found at: https://github.com/nomadnt/uSSDP
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -1,52 +0,0 @@
ESP8266 Multicast DNS
====================
A port of CC3000 Multicast DNS library (version 1.1)
This is a simple implementation of multicast DNS query support for an Arduino
running on ESP8266 chip. Only support for resolving address queries is currently
implemented.
Requirements
------------
- ESP8266WiFi library
- MDNS support in your operating system/client machines:
- For Mac OSX support is built in through Bonjour already.
- For Linux, install [Avahi](http://avahi.org/).
- For Windows, install [Bonjour](http://www.apple.com/support/bonjour/).
Usage
-----
1. Download this repository as a zip (button on the right) and follow [these instructions to install into Arduino](http://arduino.cc/en/Guide/Libraries).
2. Include the ESP8266mDNS library in the sketch.
3. Call MDNS.begin method in the sketch's setup and provide a domain name (without
the '.local' suffix, i.e. just provide 'foo' to resolve 'foo.local'). Optionally provide
the IP address to advertise and time to live (in seconds) for the DNS record -- the default is 1 hour.
4. To advertise DNS-SD services, call MDNS.addService(service, proto, port), where service and proto
are strings with service and protocol name (e.g. "http", "tcp"), and port is an integer port number
for this service (e.g. 80).
See the included MDNS + HTTP server sketch for a full example.
License
-------
Copyright (c) 2013 Tony DiCola (tony@tonydicola.com)
ESP8266 port (c) 2015 Ivan Grokhotkov (ivan@esp8266.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@ -0,0 +1,61 @@
ESP8266 Multicast DNS
=====================
A port of CC3000 Multicast DNS library (version 1.1)
This is a simple implementation of multicast DNS query support for an
Arduino running on ESP8266 chip. Only support for resolving address
queries is currently implemented.
Requirements
------------
- ESP8266WiFi library
- MDNS support in your operating system/client machines:
- For Mac OSX support is built in through Bonjour already.
- For Linux, install `Avahi <http://avahi.org/>`__.
- For Windows, install
`Bonjour <http://www.apple.com/support/bonjour/>`__.
Usage
-----
1. Download this repository as a zip (button on the right) and follow
`these instructions to install into
Arduino <http://arduino.cc/en/Guide/Libraries>`__.
2. Include the ESP8266mDNS library in the sketch.
3. Call MDNS.begin method in the sketch's setup and provide a domain
name (without the '.local' suffix, i.e. just provide 'foo' to resolve
'foo.local'). Optionally provide the IP address to advertise and time
to live (in seconds) for the DNS record -- the default is 1 hour.
4. To advertise DNS-SD services, call MDNS.addService(service, proto,
port), where service and proto are strings with service and protocol
name (e.g. "http", "tcp"), and port is an integer port number for
this service (e.g. 80).
See the included MDNS + HTTP server sketch for a full example.
License
-------
Copyright (c) 2013 Tony DiCola (tony@tonydicola.com) ESP8266 port (c)
2015 Ivan Grokhotkov (ivan@esp8266.com)
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -1,34 +0,0 @@
## Using GDB stub
- Add `#include <GDBStub.h>` to the sketch
- Upload the sketch
- Redirect serial port to TCP port:
```
tcp_serial_redirect.py -p /dev/tty.SLAB_USBtoUART -b 115200 --spy -P 9980 --rts=0 --dtr=0
```
Change port and baud rate as necessary. This command requires python and pyserial.
- Observe serial output:
```
nc localhost 9980
```
- Once crash happens, close nc and start gdb:
```
xtensa-lx106-elf-gdb /path/to/Sketch.cpp.elf -ex "target remote :9980"
```
Or, using the provided gdbcmds file:
```
xtensa-lx106-elf-gdb /path/to/Sketch.cpp.elf -x gdbcmds
```
- Use gdb to inspect program state at the point of an exception.
## Tips and tricks
- To halt the target when software WDT fires, add
```
((int*)0) = 0;
```
at the top of `__wrap_system_restart_local` in core_esp8266_postmortem.c.
## License
Espressif MIT License. See License file.

View File

@ -0,0 +1,49 @@
Using GDB stub
--------------
- Add ``#include <GDBStub.h>`` to the sketch
- Upload the sketch
- Redirect serial port to TCP port:
::
tcp_serial_redirect.py -p /dev/tty.SLAB_USBtoUART -b 115200 --spy -P 9980 --rts=0 --dtr=0
Change port and baud rate as necessary. This command requires python
and pyserial.
- Observe serial output:
::
nc localhost 9980
- Once crash happens, close nc and start gdb:
::
xtensa-lx106-elf-gdb /path/to/Sketch.cpp.elf -ex "target remote :9980"
Or, using the provided gdbcmds file:
::
xtensa-lx106-elf-gdb /path/to/Sketch.cpp.elf -x gdbcmds
- Use gdb to inspect program state at the point of an exception.
Tips and tricks
---------------
- To halt the target when software WDT fires, add
::
((int*)0) = 0;
at the top of ``__wrap_system_restart_local`` in
core\_esp8266\_postmortem.c.
License
-------
Espressif MIT License. See License file.