diff --git a/docs/Doxyfile b/docs/Doxyfile
new file mode 100644
index 00000000..3306fbc0
--- /dev/null
+++ b/docs/Doxyfile
@@ -0,0 +1,251 @@
+# This is Doxygen configuration file
+#
+# Doxygen provides over 260 configuration statements
+# To make this file easier to follow,
+# it contains only statements that are non-default
+#
+# NOTE:
+# It is recommended not to change defaults unless specifically required
+# Test any changes how they affect generated documentation
+# Make sure that correct warnings are generated to flag issues with documented code
+#
+# For the complete list of configuration statements see:
+# https://www.stack.nl/~dimitri/doxygen/manual/config.html
+
+
+PROJECT_NAME = "ESP32 Programming Guide"
+
+## The 'INPUT' statement below is used as input by script 'gen-df-input.py'
+## to automatically generate API reference list files heder_file.inc
+## These files are placed in '_inc' directory
+## and used to include in API reference documentation
+
+INPUT = \
+ ##
+ ## Wi-Fi - API Reference
+ ##
+ ../../components/esp32/include/esp_wifi.h \
+ ../../components/esp32/include/esp_wifi_types.h \
+ ../../components/esp32/include/esp_smartconfig.h \
+ ../../components/esp32/include/esp_now.h \
+ ## Mesh - API Reference
+ ../../components/esp32/include/esp_mesh.h \
+ ## Bluetooth - API Reference
+ ## Controller && VHCI
+ ../../components/bt/include/esp_bt.h \
+ ## Bluetooth COMMON
+ ## Issue with __attribute__
+ ../../components/bt/bluedroid/api/include/api/esp_bt_defs.h \
+ ../../components/bt/bluedroid/api/include/api/esp_bt_main.h \
+ ../../components/bt/bluedroid/api/include/api/esp_bt_device.h \
+ ## Bluetooth LE
+ ../../components/bt/bluedroid/api/include/api/esp_gap_ble_api.h \
+ ## Issue with __attribute__
+ ../../components/bt/bluedroid/api/include/api/esp_gatt_defs.h \
+ ../../components/bt/bluedroid/api/include/api/esp_gatts_api.h \
+ ../../components/bt/bluedroid/api/include/api/esp_gattc_api.h \
+ ../../components/bt/bluedroid/api/include/api/esp_blufi_api.h \
+ ## Bluetooth Classic
+ ../../components/bt/bluedroid/api/include/api/esp_gap_bt_api.h \
+ ## Issue with __attribute__
+ ../../components/bt/bluedroid/api/include/api/esp_a2dp_api.h \
+ ../../components/bt/bluedroid/api/include/api/esp_avrc_api.h \
+ ../../components/bt/bluedroid/api/include/api/esp_spp_api.h \
+ ../../components/bt/bluedroid/api/include/api/esp_hf_defs.h \
+ ../../components/bt/bluedroid/api/include/api/esp_hf_client_api.h \
+ ##
+ ## Ethernet - API Reference
+ ##
+ ../../components/ethernet/include/esp_eth.h \
+ ../../components/ethernet/include/eth_phy/phy.h \
+ ../../components/ethernet/include/eth_phy/phy_tlk110.h \
+ ../../components/ethernet/include/eth_phy/phy_lan8720.h \
+ ##
+ ## Peripherals - API Reference
+ ##
+ ../../components/driver/include/driver/adc.h \
+ ../../components/driver/include/driver/can.h \
+ ../../components/driver/include/driver/dac.h \
+ ../../components/driver/include/driver/gpio.h \
+ ../../components/driver/include/driver/rtc_io.h \
+ ../../components/driver/include/driver/i2c.h \
+ ../../components/driver/include/driver/i2s.h \
+ ../../components/driver/include/driver/ledc.h \
+ ../../components/driver/include/driver/mcpwm.h \
+ ../../components/driver/include/driver/pcnt.h \
+ ../../components/driver/include/driver/rmt.h \
+ ../../components/driver/include/driver/sigmadelta.h \
+ ../../components/driver/include/driver/spi_common.h \
+ ../../components/driver/include/driver/spi_master.h \
+ ../../components/driver/include/driver/spi_slave.h \
+ ../../components/driver/include/driver/timer.h \
+ ../../components/driver/include/driver/touch_pad.h \
+ ../../components/driver/include/driver/uart.h \
+ ../../components/esp_adc_cal/include/esp_adc_cal.h \
+ ../../components/soc/esp32/include/soc/adc_channel.h \
+ ../../components/soc/esp32/include/soc/dac_channel.h \
+ ../../components/soc/esp32/include/soc/touch_channel.h \
+ ../../components/soc/esp32/include/soc/uart_channel.h \
+ ../../components/soc/esp32/include/soc/rtc_gpio_channel.h \
+ ##
+ ## Protocols - API Reference
+ ##
+ ## ESP-TLS
+ ../../components/esp-tls/esp_tls.h \
+ ## MQTT
+ ../../components/mqtt/esp-mqtt/include/mqtt_client.h \
+ ## mDNS
+ ../../components/mdns/include/mdns.h \
+ ../../components/esp_http_client/include/esp_http_client.h \
+ ../../components/esp_http_server/include/esp_http_server.h \
+ ##
+ ## Provisioning - API Reference
+ ##
+ ## Protocol Communication
+ ../../components/protocomm/include/common/protocomm.h \
+ ../../components/protocomm/include/security/protocomm_security.h \
+ ../../components/protocomm/include/security/protocomm_security0.h \
+ ../../components/protocomm/include/security/protocomm_security1.h \
+ ../../components/protocomm/include/transports/protocomm_ble.h \
+ ../../components/protocomm/include/transports/protocomm_console.h \
+ ../../components/protocomm/include/transports/protocomm_httpd.h \
+ ## WiFi Provisioning
+ ../../components/wifi_provisioning/include/wifi_provisioning/wifi_config.h \
+ ##
+ ## Storage - API Reference
+ ##
+ ## SPI Flash and Partition APIs
+ ../../components/spi_flash/include/esp_spi_flash.h \
+ ../../components/spi_flash/include/esp_partition.h \
+ ../../components/bootloader_support/include/esp_flash_encrypt.h \
+ ## SPIFFS
+ ../../components/spiffs/include/esp_spiffs.h \
+ ## SD/MMC Card Host
+ ../../components/sdmmc/include/sdmmc_cmd.h \
+ ../../components/driver/include/driver/sdmmc_host.h \
+ ../../components/driver/include/driver/sdmmc_types.h \
+ ../../components/driver/include/driver/sdspi_host.h \
+ ## SDIO slave
+ ../../components/driver/include/driver/sdio_slave.h \
+ ## Non-Volatile Storage
+ ../../components/nvs_flash/include/nvs.h \
+ ../../components/nvs_flash/include/nvs_flash.h \
+ ## Virtual Filesystem
+ ../../components/vfs/include/esp_vfs.h \
+ ../../components/vfs/include/esp_vfs_dev.h \
+ ## FAT Filesystem
+ ## NOTE: for two lines below header_file.inc is not used
+ ../../components/fatfs/src/esp_vfs_fat.h \
+ ../../components/fatfs/src/diskio.h \
+ ## Wear Levelling
+ ../../components/wear_levelling/include/wear_levelling.h \
+ ##
+ ## System - API Reference
+ ##
+ ## Memory Allocation #
+ ../../components/heap/include/esp_heap_caps.h \
+ ../../components/heap/include/esp_heap_trace.h \
+ ../../components/heap/include/esp_heap_caps_init.h \
+ ../../components/heap/include/multi_heap.h \
+ ## Himem
+ ../../components/esp32/include/esp_himem.h \
+ ## Interrupt Allocation
+ ../../components/esp32/include/esp_intr_alloc.h \
+ ## Watchdogs
+ ## NOTE: for two lines below header_file.inc is not used
+ ../../components/esp32/include/esp_int_wdt.h \
+ ../../components/esp32/include/esp_task_wdt.h \
+ ## Hooks
+ ../../components/esp32/include/esp_freertos_hooks.h \
+ ## Inter-Processor Call
+ ../../components/esp32/include/esp_ipc.h \
+ ## Over The Air Updates (OTA)
+ ../../components/app_update/include/esp_ota_ops.h \
+ ## ESP HTTPS OTA
+ ../../components/esp_https_ota/include/esp_https_ota.h \
+ ## Sleep
+ ../../components/esp32/include/esp_sleep.h \
+ ## Logging
+ ../../components/log/include/esp_log.h \
+ ## Base MAC address
+ ## NOTE: for line below header_file.inc is not used
+ ../../components/esp32/include/esp_system.h \
+ ##
+ ## ULP Coprocessor - API Guides
+ ##
+ ## NOTE: for line below header_file.inc is not used
+ ../../components/ulp/include/esp32/ulp.h \
+ ##
+ ## Application Level Tracing - API Reference
+ ##
+ ../../components/app_trace/include/esp_app_trace.h \
+ ### Power management
+ ../../components/esp32/include/esp_pm.h \
+ ../../components/esp32/include/esp32/pm.h \
+ ### esp_timer, High Resolution Timer
+ ../../components/esp32/include/esp_timer.h \
+ ### esp_event, Event Loop Library
+ ../../components/esp_event/include/esp_event.h \
+ ../../components/esp_event/include/esp_event_base.h \
+ ### ESP Pthread parameters
+ ../../components/pthread/include/esp_pthread.h \
+ ###
+ ### FreeRTOS
+ ###
+ ../../components/freertos/include/freertos/task.h \
+ ../../components/freertos/include/freertos/queue.h \
+ ../../components/freertos/include/freertos/semphr.h \
+ ../../components/freertos/include/freertos/timers.h \
+ ../../components/freertos/include/freertos/event_groups.h \
+ ### Ringbuffer
+ ../../components/esp_ringbuf/include/freertos/ringbuf.h \
+ ### Helper functions for error codes
+ ../../components/esp32/include/esp_err.h \
+ ### System APIs
+ ../../components/esp32/include/esp_system.h \
+ ### Modbus controller component header file
+ ../../components/freemodbus/modbus_controller/mbcontroller.h
+
+## Get warnings for functions that have no documentation for their parameters or return value
+##
+WARN_NO_PARAMDOC = YES
+
+## Enable preprocessing and remove __attribute__(...) expressions from the INPUT files
+##
+ENABLE_PREPROCESSING = YES
+MACRO_EXPANSION = YES
+EXPAND_ONLY_PREDEF = YES
+PREDEFINED = \
+ __attribute__(x)= \
+ IRAM_ATTR= \
+ configSUPPORT_DYNAMIC_ALLOCATION=1 \
+ configSUPPORT_STATIC_ALLOCATION=1 \
+ configQUEUE_REGISTRY_SIZE=1 \
+ configUSE_RECURSIVE_MUTEXES=1 \
+ configTHREAD_LOCAL_STORAGE_DELETE_CALLBACKS=1 \
+ configNUM_THREAD_LOCAL_STORAGE_POINTERS=1 \
+ configUSE_APPLICATION_TASK_TAG=1 \
+ configTASKLIST_INCLUDE_COREID=1
+
+## Do not complain about not having dot
+##
+HAVE_DOT = NO
+
+## Generate XML that is required for Breathe
+##
+GENERATE_XML = YES
+XML_OUTPUT = xml
+
+GENERATE_HTML = NO
+HAVE_DOT = NO
+GENERATE_LATEX = NO
+GENERATE_MAN = YES
+GENERATE_RTF = NO
+
+## Skip distracting progress messages
+##
+QUIET = YES
+## Log warnings in a file for further review
+##
+WARN_LOGFILE = "doxygen-warning-log.txt"
+
diff --git a/docs/_static/api-guides.gif b/docs/_static/api-guides.gif
new file mode 100644
index 00000000..bc9dd36d
Binary files /dev/null and b/docs/_static/api-guides.gif differ
diff --git a/docs/_static/api-reference.gif b/docs/_static/api-reference.gif
new file mode 100644
index 00000000..7fd81755
Binary files /dev/null and b/docs/_static/api-reference.gif differ
diff --git a/docs/_static/espressif-logo.svg b/docs/_static/espressif-logo.svg
new file mode 100644
index 00000000..5fccc316
--- /dev/null
+++ b/docs/_static/espressif-logo.svg
@@ -0,0 +1,77 @@
+
+
+
diff --git a/docs/_static/get-started.gif b/docs/_static/get-started.gif
new file mode 100644
index 00000000..7a7a8023
Binary files /dev/null and b/docs/_static/get-started.gif differ
diff --git a/docs/_static/linux-logo.png b/docs/_static/linux-logo.png
new file mode 100644
index 00000000..1112db65
Binary files /dev/null and b/docs/_static/linux-logo.png differ
diff --git a/docs/_static/macos-logo.png b/docs/_static/macos-logo.png
new file mode 100644
index 00000000..289d1f60
Binary files /dev/null and b/docs/_static/macos-logo.png differ
diff --git a/docs/_static/msys2-terminal-window.png b/docs/_static/msys2-terminal-window.png
new file mode 100644
index 00000000..e90a22be
Binary files /dev/null and b/docs/_static/msys2-terminal-window.png differ
diff --git a/docs/_static/project-configuration.png b/docs/_static/project-configuration.png
new file mode 100644
index 00000000..e724556c
Binary files /dev/null and b/docs/_static/project-configuration.png differ
diff --git a/docs/_static/what-you-need.png b/docs/_static/what-you-need.png
new file mode 100644
index 00000000..328c277c
Binary files /dev/null and b/docs/_static/what-you-need.png differ
diff --git a/docs/_static/windows-logo.png b/docs/_static/windows-logo.png
new file mode 100644
index 00000000..122f53a2
Binary files /dev/null and b/docs/_static/windows-logo.png differ
diff --git a/docs/conf_common.py b/docs/conf_common.py
new file mode 100644
index 00000000..8ffd0b3e
--- /dev/null
+++ b/docs/conf_common.py
@@ -0,0 +1,384 @@
+# -*- coding: utf-8 -*-
+#
+# Common (non-language-specific) configuration for Read The Docs & Sphinx
+#
+# Based on a Read the Docs Template documentation build configuration file,
+# created by sphinx-quickstart on Tue Aug 26 14:19:49 2014.
+#
+# This file is imported from a language-specific conf.py (ie en/conf.py or
+# zh_CN/conf.py)
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+from __future__ import print_function
+from __future__ import unicode_literals
+import sys, os
+import re
+import subprocess
+import shlex
+
+# Note: If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute
+
+from local_util import run_cmd_get_output, copy_if_modified
+
+# build_docs on the CI server sometimes fails under Python3. This is a workaround:
+sys.setrecursionlimit(3500)
+
+try:
+ builddir = os.environ['BUILDDIR']
+except KeyError:
+ builddir = '_build'
+
+# Fill in a default IDF_PATH if it's missing (ie when Read The Docs is building the docs)
+try:
+ idf_path = os.environ['IDF_PATH']
+except KeyError:
+ idf_path = os.path.realpath(os.path.join(os.path.dirname(__file__), '..'))
+
+def call_with_python(cmd):
+ # using sys.executable ensures that the scripts are called with the same Python interpreter
+ if os.system('{} {}'.format(sys.executable, cmd)) != 0:
+ raise RuntimeError('{} failed'.format(cmd))
+
+# Call Doxygen to get XML files from the header files
+print("Calling Doxygen to generate latest XML files")
+if os.system("doxygen ../Doxyfile") != 0:
+ raise RuntimeError('Doxygen call failed')
+
+# Doxygen has generated XML files in 'xml' directory.
+# Copy them to 'xml_in', only touching the files which have changed.
+copy_if_modified('xml/', 'xml_in/')
+
+# Generate 'api_name.inc' files using the XML files by Doxygen
+call_with_python('../gen-dxd.py')
+
+# Generate 'kconfig.inc' file from components' Kconfig files
+print("Generating kconfig.inc from kconfig contents")
+kconfig_inc_path = '{}/inc/kconfig.inc'.format(builddir)
+temp_sdkconfig_path = '{}/sdkconfig.tmp'.format(builddir)
+# note: trimming "examples" dir from KConfig/KConfig.projbuild as MQTT submodule
+# has its own examples in the submodule.
+kconfigs = subprocess.check_output(["find", "../../components",
+ "-name", "examples", "-prune",
+ "-o", "-name", "Kconfig", "-print"]).decode()
+kconfig_projbuilds = subprocess.check_output(["find", "../../components",
+ "-name", "examples", "-prune",
+ "-o", "-name", "Kconfig.projbuild", "-print"]).decode()
+confgen_args = [sys.executable,
+ "../../tools/kconfig_new/confgen.py",
+ "--kconfig", "../../Kconfig",
+ "--config", temp_sdkconfig_path,
+ "--create-config-if-missing",
+ "--env", "COMPONENT_KCONFIGS={}".format(kconfigs),
+ "--env", "COMPONENT_KCONFIGS_PROJBUILD={}".format(kconfig_projbuilds),
+ "--env", "IDF_PATH={}".format(idf_path),
+ "--output", "docs", kconfig_inc_path + '.in'
+]
+subprocess.check_call(confgen_args)
+copy_if_modified(kconfig_inc_path + '.in', kconfig_inc_path)
+
+# Generate 'esp_err_defs.inc' file with ESP_ERR_ error code definitions
+esp_err_inc_path = '{}/inc/esp_err_defs.inc'.format(builddir)
+call_with_python('../../tools/gen_esp_err_to_name.py --rst_output ' + esp_err_inc_path + '.in')
+copy_if_modified(esp_err_inc_path + '.in', esp_err_inc_path)
+
+# Generate version-related includes
+#
+# (Note: this is in a function as it needs to access configuration to get the language)
+def generate_version_specific_includes(app):
+ print("Generating version-specific includes...")
+ version_tmpdir = '{}/version_inc'.format(builddir)
+ call_with_python('../gen-version-specific-includes.py {} {}'.format(app.config.language, version_tmpdir))
+ copy_if_modified(version_tmpdir, '{}/inc'.format(builddir))
+
+# Generate toolchain download links
+print("Generating toolchain download links")
+base_url = 'https://dl.espressif.com/dl/'
+toolchain_tmpdir = '{}/toolchain_inc'.format(builddir)
+call_with_python('../gen-toolchain-links.py ../../tools/toolchain_versions.mk {} {}'.format(base_url, toolchain_tmpdir))
+copy_if_modified(toolchain_tmpdir, '{}/inc'.format(builddir))
+
+# http://stackoverflow.com/questions/12772927/specifying-an-online-image-in-sphinx-restructuredtext-format
+#
+suppress_warnings = ['image.nonlocal_uri']
+
+# -- General configuration ------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+extensions = ['breathe',
+ 'link-roles',
+ 'sphinxcontrib.blockdiag',
+ 'sphinxcontrib.seqdiag',
+ 'sphinxcontrib.actdiag',
+ 'sphinxcontrib.nwdiag',
+ 'sphinxcontrib.rackdiag',
+ 'sphinxcontrib.packetdiag'
+ ]
+
+# Set up font for blockdiag, nwdiag, rackdiag and packetdiag
+blockdiag_fontpath = '../_static/DejaVuSans.ttf'
+seqdiag_fontpath = '../_static/DejaVuSans.ttf'
+actdiag_fontpath = '../_static/DejaVuSans.ttf'
+nwdiag_fontpath = '../_static/DejaVuSans.ttf'
+rackdiag_fontpath = '../_static/DejaVuSans.ttf'
+packetdiag_fontpath = '../_static/DejaVuSans.ttf'
+
+# Enabling this fixes cropping of blockdiag edge labels
+seqdiag_antialias = True
+
+# Breathe extension variables
+
+# Doxygen regenerates files in 'xml/' directory every time,
+# but we copy files to 'xml_in/' only when they change, to speed up
+# incremental builds.
+breathe_projects = { "esp32-idf": "xml_in/" }
+breathe_default_project = "esp32-idf"
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = ['.rst', '.md']
+
+source_parsers = {
+ '.md': 'recommonmark.parser.CommonMarkParser',
+ }
+
+# The encoding of source files.
+#source_encoding = 'utf-8-sig'
+
+# The master toctree document.
+master_doc = 'index'
+
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+
+# Readthedocs largely ignores 'version' and 'release', and displays one of
+# 'latest', tag name, or branch name, depending on the build type.
+# Still, this is useful for non-RTD builds.
+# This is supposed to be "the short X.Y version", but it's the only version
+# visible when you open index.html.
+# Display full version to make things less confusing.
+version = run_cmd_get_output('git describe')
+# The full version, including alpha/beta/rc tags.
+# If needed, nearest tag is returned by 'git describe --abbrev=0'.
+release = version
+print('Version: {0} Release: {1}'.format(version, release))
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = ['_build','README.md']
+
+# The reST default role (used for this markup: `text`) to use for all
+# documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+# If true, keep warnings as "system message" paragraphs in the built documents.
+#keep_warnings = False
+
+
+# -- Options for HTML output ----------------------------------------------
+
+# The theme to use for HTML and HTML Help pages. See the documentation for
+# a list of builtin themes.
+html_theme = 'sphinx_rtd_theme'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further. For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# The name for this set of Sphinx documents. If None, it defaults to
+# " v documentation".
+#html_title = None
+
+# A shorter title for the navigation bar. Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+html_logo = "../_static/espressif-logo.svg"
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['../_static']
+
+# Add any extra paths that contain custom files (such as robots.txt or
+# .htaccess) here, relative to this directory. These files are copied
+# directly to the root of the documentation.
+#html_extra_path = []
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_domain_indices = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+#html_show_sourcelink = True
+
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+#html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+#html_show_copyright = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a tag referring to it. The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = None
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'ReadtheDocsTemplatedoc'
+
+
+# -- Options for LaTeX output ---------------------------------------------
+
+latex_elements = {
+# The paper size ('letterpaper' or 'a4paper').
+#'papersize': 'letterpaper',
+
+# The font size ('10pt', '11pt' or '12pt').
+#'pointsize': '10pt',
+
+# Additional stuff for the LaTeX preamble.
+#'preamble': '',
+}
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title,
+# author, documentclass [howto, manual, or own class]).
+latex_documents = [
+ ('index', 'ReadtheDocsTemplate.tex', u'Read the Docs Template Documentation',
+ u'Read the Docs', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# If true, show page references after internal links.
+#latex_show_pagerefs = False
+
+# If true, show URL addresses after external links.
+#latex_show_urls = False
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_domain_indices = True
+
+
+# -- Options for manual page output ---------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+ ('index', 'readthedocstemplate', u'Read the Docs Template Documentation',
+ [u'Read the Docs'], 1)
+]
+
+# If true, show URL addresses after external links.
+#man_show_urls = False
+
+
+# -- Options for Texinfo output -------------------------------------------
+
+# Grouping the document tree into Texinfo files. List of tuples
+# (source start file, target name, title, author,
+# dir menu entry, description, category)
+texinfo_documents = [
+ ('index', 'ReadtheDocsTemplate', u'Read the Docs Template Documentation',
+ u'Read the Docs', 'ReadtheDocsTemplate', 'One line description of project.',
+ 'Miscellaneous'),
+]
+
+# Documents to append as an appendix to all manuals.
+#texinfo_appendices = []
+
+# If false, no module index is generated.
+#texinfo_domain_indices = True
+
+# How to display URL addresses: 'footnote', 'no', or 'inline'.
+#texinfo_show_urls = 'footnote'
+
+# If true, do not generate a @detailmenu in the "Top" node's menu.
+#texinfo_no_detailmenu = False
+
+# Override RTD CSS theme to introduce the theme corrections
+# https://github.com/rtfd/sphinx_rtd_theme/pull/432
+def setup(app):
+ app.add_stylesheet('theme_overrides.css')
+ generate_version_specific_includes(app)
diff --git a/docs/docs_common.mk b/docs/docs_common.mk
new file mode 100644
index 00000000..7a77b572
--- /dev/null
+++ b/docs/docs_common.mk
@@ -0,0 +1,216 @@
+# "Common" Makefile for Sphinx documentation
+#
+# (included from en/Makefile & zh_CN/Makefile
+#
+# NOTE: This makefile runs with cwd=either en or zh_CN subfolder, so this
+# (docs/) directory is '..' relative to it.
+
+# ************ IMPORTANT *****************
+#
+# ReadTheDocs DOES NOT USE THIS MAKEFILE,
+# so any behaviour additions must be
+# done via Sphinx Config not here
+#
+# ****************************************
+
+# You can set these variables from the command line.
+SPHINXOPTS =
+# note: this is changed from sphinx-build so it depends on default python interpreter, not on /bin/sphinx-build
+# (which will be the most recently installed version of sphinx and may not match)
+SPHINXBUILD = python -m sphinx
+PAPER =
+BUILDDIR = _build
+
+# Internal variables.
+PAPEROPT_a4 = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) -w sphinx-warning-log.txt .
+# the i18n builder cannot share the environment and doctrees with the others
+I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext dependencies version-specific-includes check_python_packages
+
+help:
+ @echo "Please use \`make \' where is one of"
+ @echo " html to make standalone HTML files"
+ @echo " dirhtml to make HTML files named index.html in directories"
+ @echo " singlehtml to make a single large HTML file"
+ @echo " pickle to make pickle files"
+ @echo " json to make JSON files"
+ @echo " htmlhelp to make HTML files and a HTML help project"
+ @echo " qthelp to make HTML files and a qthelp project"
+ @echo " devhelp to make HTML files and a Devhelp project"
+ @echo " epub to make an epub"
+ @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+ @echo " latexpdf to make LaTeX files and run them through pdflatex"
+ @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
+ @echo " text to make text files"
+ @echo " man to make manual pages"
+ @echo " texinfo to make Texinfo files"
+ @echo " info to make Texinfo files and run them through makeinfo"
+ @echo " gettext to make PO message catalogs"
+ @echo " changes to make an overview of all changed/added/deprecated items"
+ @echo " xml to make Docutils-native XML files"
+ @echo " pseudoxml to make pseudoxml-XML files for display purposes"
+ @echo " linkcheck to check all external links for integrity"
+ @echo " doctest to run all doctests embedded in the documentation (if enabled) "
+
+clean:
+ rm -rf $(BUILDDIR)/*
+
+# Notify users when some of the required python packages are not installed.
+# Note: This is intended to help developers who generate the documentation on their local machine. Read The Docs uses
+# the requirements.txt file directly and calls sphinx also directly without the use of the makefile!
+check_python_packages:
+ $(IDF_PATH)/tools/check_python_dependencies.py -r $(IDF_PATH)/docs/requirements.txt
+
+html: | check_python_packages
+ $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+ @echo
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+dirhtml: | check_python_packages
+ $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+ @echo
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+singlehtml: | check_python_packages
+ $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
+ @echo
+ @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
+
+pickle: | check_python_packages
+ $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+ @echo
+ @echo "Build finished; now you can process the pickle files."
+
+json: | check_python_packages
+ $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+ @echo
+ @echo "Build finished; now you can process the JSON files."
+
+htmlhelp: | check_python_packages
+ $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+ @echo
+ @echo "Build finished; now you can run HTML Help Workshop with the" \
+ ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+qthelp: | check_python_packages
+ $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+ @echo
+ @echo "Build finished; now you can run "qcollectiongenerator" with the" \
+ ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+ @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/ReadtheDocsTemplate.qhcp"
+ @echo "To view the help file:"
+ @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/ReadtheDocsTemplate.qhc"
+
+devhelp: | check_python_packages
+ $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
+ @echo
+ @echo "Build finished."
+ @echo "To view the help file:"
+ @echo "# mkdir -p $$HOME/.local/share/devhelp/ReadtheDocsTemplate"
+ @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/ReadtheDocsTemplate"
+ @echo "# devhelp"
+
+epub: | check_python_packages
+ $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
+ @echo
+ @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
+
+latex: | check_python_packages
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo
+ @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+ @echo "Run \`make' in that directory to run these through (pdf)latex" \
+ "(use \`make latexpdf' here to do that automatically)."
+
+latexpdf: | check_python_packages
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo "Running LaTeX files through pdflatex..."
+ $(MAKE) -C $(BUILDDIR)/latex all-pdf
+ @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+latexpdfja: | check_python_packages
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo "Running LaTeX files through platex and dvipdfmx..."
+ $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
+ @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+text: | check_python_packages
+ $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
+ @echo
+ @echo "Build finished. The text files are in $(BUILDDIR)/text."
+
+man: | check_python_packages
+ $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
+ @echo
+ @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
+
+texinfo: | check_python_packages
+ $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+ @echo
+ @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
+ @echo "Run \`make' in that directory to run these through makeinfo" \
+ "(use \`make info' here to do that automatically)."
+
+info: | check_python_packages
+ $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+ @echo "Running Texinfo files through makeinfo..."
+ make -C $(BUILDDIR)/texinfo info
+ @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
+
+gettext: | check_python_packages
+ $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
+ @echo
+ @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
+
+changes: | check_python_packages
+ $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+ @echo
+ @echo "The overview file is in $(BUILDDIR)/changes."
+
+linkcheck: | check_python_packages
+ $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+ @echo
+ @echo "Link check complete; look for any errors in the above output " \
+ "or in $(BUILDDIR)/linkcheck/output.txt."
+
+gh-linkcheck: | check_python_packages
+ @echo "Checking for hardcoded GitHub links"
+ @if (find ../ -name '*.rst' | xargs grep \
+ 'https://github.com/espressif/esp-idf/tree\|https://github.com/espressif/esp-idf/blob\|https://github.com/espressif/esp-idf/raw'\
+ ); \
+ then \
+ echo "WARNINIG: Some .rst files contain hardcoded Github links."; \
+ echo "Please check above output and replace links with one of the following:"; \
+ echo "- :idf:\`dir\` - points to directory inside ESP-IDF"; \
+ echo "- :idf_file:\`file\` - points to file inside ESP-IDF"; \
+ echo "- :idf_raw:\`file\` - points to raw view of the file inside ESP-IDF"; \
+ echo "- :component:\`dir\` - points to directory inside ESP-IDF components dir"; \
+ echo "- :component_file:\`file\` - points to file inside ESP-IDF components dir"; \
+ echo "- :component_raw:\`file\` - points to raw view of the file inside ESP-IDF"; \
+ echo " components dir"; \
+ echo "- :example:\`dir\` - points to directory inside ESP-IDF examples dir"; \
+ echo "- :example_file:\`file\` - points to file inside ESP-IDF examples dir"; \
+ echo "- :example_raw:\`file\` - points to raw view of the file inside ESP-IDF"; \
+ echo " examples dir"; \
+ echo "These link types will point to the correct GitHub version automatically"; \
+ exit 1; \
+ fi
+ @echo "No hardcoded links found"
+
+doctest: | check_python_packages
+ $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
+ @echo "Testing of doctests in the sources finished, look at the " \
+ "results in $(BUILDDIR)/doctest/output.txt."
+
+xml: | check_python_packages
+ $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
+ @echo
+ @echo "Build finished. The XML files are in $(BUILDDIR)/xml."
+
+pseudoxml: | check_python_packages
+ $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
+ @echo
+ @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
diff --git a/docs/en/Makefile b/docs/en/Makefile
new file mode 100644
index 00000000..281b7201
--- /dev/null
+++ b/docs/en/Makefile
@@ -0,0 +1,2 @@
+LANGUAGE=en
+include ../docs_common.mk
diff --git a/docs/en/api-guides/index.rst b/docs/en/api-guides/index.rst
new file mode 100644
index 00000000..cf104468
--- /dev/null
+++ b/docs/en/api-guides/index.rst
@@ -0,0 +1,32 @@
+API Guides
+**********
+
+.. toctree::
+ :maxdepth: 1
+
+ General Notes
+ Build System
+ Build System (CMake)
+ Error Handling
+ Fatal Errors
+ Deep Sleep Wake Stubs
+ ESP32 Core Dump
+ Flash Encryption <../security/flash-encryption>
+ FreeRTOS SMP Changes
+ Thread Local Storage
+ High Level Interrupts
+ JTAG Debugging
+ Bootloader
+ Partition Tables
+ Secure Boot <../security/secure-boot>
+ ULP Coprocessor
+ ULP Coprocessor (CMake)
+ Unit Testing
+ Unit Testing (CMake)
+ Application Level Tracing
+ Console Component
+ ROM debug console
+ WiFi Driver
+ ESP-MESH
+ BluFi
+ External SPI-connected RAM
diff --git a/docs/en/api-reference/index.rst b/docs/en/api-reference/index.rst
new file mode 100644
index 00000000..0de5c5ae
--- /dev/null
+++ b/docs/en/api-reference/index.rst
@@ -0,0 +1,19 @@
+*************
+API Reference
+*************
+
+.. toctree::
+ :maxdepth: 2
+
+ Wi-Fi
+ Mesh
+ Bluetooth
+ Ethernet
+ Peripherals
+ Protocols
+ Provisioning
+ Storage
+ System
+ Configuration Options
+ Error Codes Reference
+
diff --git a/docs/en/api-reference/wifi/esp_smartconfig.rst b/docs/en/api-reference/wifi/esp_smartconfig.rst
new file mode 100644
index 00000000..7ad26f5f
--- /dev/null
+++ b/docs/en/api-reference/wifi/esp_smartconfig.rst
@@ -0,0 +1,7 @@
+Smart Config
+============
+
+API Reference
+-------------
+
+.. include:: /_build/inc/esp_smartconfig.inc
diff --git a/docs/en/api-reference/wifi/esp_wifi.rst b/docs/en/api-reference/wifi/esp_wifi.rst
new file mode 100644
index 00000000..c8091e00
--- /dev/null
+++ b/docs/en/api-reference/wifi/esp_wifi.rst
@@ -0,0 +1,33 @@
+Wi-Fi
+=====
+
+Introduction
+------------
+
+The WiFi libraries provide support for configuring and monitoring the ESP32 WiFi networking functionality. This includes configuration for:
+
+- Station mode (aka STA mode or WiFi client mode). ESP32 connects to an access point.
+- AP mode (aka Soft-AP mode or Access Point mode). Stations connect to the ESP32.
+- Combined AP-STA mode (ESP32 is concurrently an access point and a station connected to another access point).
+
+- Various security modes for the above (WPA, WPA2, WEP, etc.)
+- Scanning for access points (active & passive scanning).
+- Promiscuous mode monitoring of IEEE802.11 WiFi packets.
+
+Application Examples
+--------------------
+
+See :example:`wifi` directory of ESP-IDF examples that contains the following applications:
+
+* Simple application showing how to connect ESP32 module to an Access Point - `esp-idf-template `_.
+
+* Using power save mode of Wi-Fi - :example:`wifi/power_save`.
+
+
+API Reference
+-------------
+
+.. include:: /_build/inc/esp_wifi.inc
+.. include:: /_build/inc/esp_wifi_types.inc
+
+
diff --git a/docs/en/api-reference/wifi/index.rst b/docs/en/api-reference/wifi/index.rst
new file mode 100644
index 00000000..1553d359
--- /dev/null
+++ b/docs/en/api-reference/wifi/index.rst
@@ -0,0 +1,12 @@
+Wi-Fi API
+*********
+
+.. toctree::
+ :maxdepth: 1
+
+ Wi-Fi
+ Smart Config
+ ESPNOW
+
+
+Example code for this API section is provided in :example:`wifi` directory of ESP-IDF examples.
diff --git a/docs/en/conf.py b/docs/en/conf.py
new file mode 100644
index 00000000..a7dde4b1
--- /dev/null
+++ b/docs/en/conf.py
@@ -0,0 +1,19 @@
+# -*- coding: utf-8 -*-
+#
+# English Language RTD & Sphinx config file
+#
+# Uses ../conf_common.py for most non-language-specific settings.
+
+# Importing conf_common adds all the non-language-specific
+# parts to this conf module
+import sys, os
+sys.path.insert(0, os.path.abspath('..'))
+from conf_common import *
+
+# General information about the project.
+project = u'ESP-IDF Programming Guide'
+copyright = u'2016 - 2018, Espressif Systems (Shanghai) PTE LTD'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+language = 'en'
diff --git a/docs/en/get-started/eclipse-setup-windows.rst b/docs/en/get-started/eclipse-setup-windows.rst
new file mode 100644
index 00000000..3e128a09
--- /dev/null
+++ b/docs/en/get-started/eclipse-setup-windows.rst
@@ -0,0 +1,90 @@
+**********************
+Eclipse IDE on Windows
+**********************
+:link_to_translation:`zh_CN:[中文]`
+
+Configuring Eclipse on Windows requires some different steps. The full configuration steps for Windows are shown below.
+
+(For OS X and Linux instructions, see the :doc:`Eclipse IDE page `.)
+
+Installing Eclipse IDE
+======================
+
+Follow the steps under :ref:`Installing Eclipse IDE ` for all platforms.
+
+.. _eclipse-windows-setup:
+
+Setting up Eclipse on Windows
+=============================
+
+Once your new Eclipse installation launches, follow these steps:
+
+Import New Project
+------------------
+
+* Eclipse makes use of the Makefile support in ESP-IDF. This means you need to start by creating an ESP-IDF project. You can use the idf-template project from github, or open one of the examples in the esp-idf examples subdirectory.
+
+* Once Eclipse is running, choose File -> Import...
+
+* In the dialog that pops up, choose "C/C++" -> "Existing Code as Makefile Project" and click Next.
+
+* On the next page, enter "Existing Code Location" to be the directory of your IDF project. Don't specify the path to the ESP-IDF directory itself (that comes later). The directory you specify should contain a file named "Makefile" (the project Makefile).
+
+* On the same page, under "Toolchain for Indexer Settings" uncheck "Show only available toolchains that support this platform".
+
+* On the extended list that appears, choose "Cygwin GCC". Then click Finish.
+
+*Note: you may see warnings in the UI that Cygwin GCC Toolchain could not be found. This is OK, we're going to reconfigure Eclipse to find our toolchain.*
+
+Project Properties
+------------------
+
+* The new project will appear under Project Explorer. Right-click the project and choose Properties from the context menu.
+
+* Click on the "C/C++ Build" properties page (top-level):
+
+ * Uncheck "Use default build command" and enter this for the custom build command: ``python ${IDF_PATH}/tools/windows/eclipse_make.py``
+
+* Click on the "Environment" properties page under "C/C++ Build":
+
+ * Click "Add..." and enter name ``BATCH_BUILD`` and value ``1``.
+
+ * Click "Add..." again, and enter name ``IDF_PATH``. The value should be the full path where ESP-IDF is installed. The IDF_PATH directory should be specified using forwards slashes not backslashes, ie *C:/Users/user-name/Development/esp-idf*.
+
+ * Edit the PATH environment variable. Delete the existing value and replace it with ``C:\msys32\usr\bin;C:\msys32\mingw32\bin;C:\msys32\opt\xtensa-esp32-elf\bin`` (If you installed msys32 to a different directory then you'll need to change these paths to match).
+
+* Click on "C/C++ General" -> "Preprocessor Include Paths, Macros, etc." property page:
+
+ * Click the "Providers" tab
+
+ * In the list of providers, click "CDT Cross GCC Built-in Compiler Settings". Change "Command to get compiler specs" to ``xtensa-esp32-elf-gcc ${FLAGS} -std=c++11 -E -P -v -dD "${INPUTS}"``.
+
+ * In the list of providers, click "CDT GCC Build Output Parser" and change the "Compiler command pattern" to ``xtensa-esp32-elf-(gcc|g\+\+|c\+\+|cc|cpp|clang)``
+
+Navigate to "C/C++ General" -> "Indexer" property page:
+
+* Check "Enable project specific settings" to enable the rest of the settings on this page.
+
+* Uncheck "Allow heuristic resolution of includes". When this option is enabled Eclipse sometimes fails to find correct header directories.
+
+Navigate to "C/C++ Build" -> "Behavior" property page:
+
+* Check "Enable parallel build" to enable multiple build jobs in parallel.
+
+* Setting the number of jobs slightly higher than the "optimal" may give the absolute fastest builds under Windows, depending on the specific hardware being used.
+
+Building in Eclipse
+-------------------
+
+Continue from :ref:`Building in Eclipse ` for all platforms.
+
+Technical Details
+=================
+
+**Of interest to Windows gurus or very curious parties, only.**
+
+Explanations of the technical reasons for some of these steps. You don't need to know this to use esp-idf with Eclipse on Windows, but it may be helpful background knowledge if you plan to do dig into the Eclipse support:
+
+* The xtensa-esp32-elf-gcc cross-compiler is *not* a Cygwin toolchain, even though we tell Eclipse that it is one. This is because msys2 uses Cygwin and supports Unix-style paths (of the type ``/c/blah`` instead of ``c:/blah`` or ``c:\\blah``). In particular, xtensa-esp32-elf-gcc reports to the Eclipse "built-in compiler settings" function that its built-in include directories are all under ``/usr/``, which is a Unix/Cygwin-style path that Eclipse otherwise can't resolve. By telling Eclipse the compiler is Cygwin, it resolves these paths internally using the ``cygpath`` utility.
+
+* The same problem occurs when parsing make output from esp-idf. Eclipse parses this output to find header directories, but it can't resolve include directories of the form ``/c/blah`` without using ``cygpath``. There is a heuristic that Eclipse Build Output Parser uses to determine whether it should call ``cygpath``, but for currently unknown reasons the esp-idf configuration doesn't trigger it. For this reason, the ``eclipse_make.py`` wrapper script is used to call ``make`` and then use ``cygpath`` to process the output for Eclipse.
diff --git a/docs/en/get-started/eclipse-setup.rst b/docs/en/get-started/eclipse-setup.rst
new file mode 100644
index 00000000..2f02dd4e
--- /dev/null
+++ b/docs/en/get-started/eclipse-setup.rst
@@ -0,0 +1,120 @@
+********************************
+Build and Flash with Eclipse IDE
+********************************
+:link_to_translation:`zh_CN:[中文]`
+
+.. _eclipse-install-steps:
+
+Installing Eclipse IDE
+======================
+
+The Eclipse IDE gives you a graphical integrated development environment for writing, compiling and debugging ESP-IDF projects.
+
+* Start by installing the esp-idf for your platform (see files in this directory with steps for Windows, OS X, Linux).
+
+* We suggest building a project from the command line first, to get a feel for how that process works. You also need to use the command line to configure your esp-idf project (via ``make menuconfig``), this is not currently supported inside Eclipse.
+
+* Download the Eclipse Installer for your platform from eclipse.org_.
+
+* When running the Eclipse Installer, choose "Eclipse for C/C++ Development" (in other places you'll see this referred to as CDT.)
+
+Windows Users
+=============
+
+Using ESP-IDF with Eclipse on Windows requires different configuration steps. :ref:`See the Eclipse IDE on Windows guide `.
+
+Setting up Eclipse
+==================
+
+Once your new Eclipse installation launches, follow these steps:
+
+Import New Project
+------------------
+
+* Eclipse makes use of the Makefile support in ESP-IDF. This means you need to start by creating an ESP-IDF project. You can use the idf-template project from github, or open one of the examples in the esp-idf examples subdirectory.
+
+* Once Eclipse is running, choose File -> Import...
+
+* In the dialog that pops up, choose "C/C++" -> "Existing Code as Makefile Project" and click Next.
+
+* On the next page, enter "Existing Code Location" to be the directory of your IDF project. Don't specify the path to the ESP-IDF directory itself (that comes later). The directory you specify should contain a file named "Makefile" (the project Makefile).
+
+* On the same page, under "Toolchain for Indexer Settings" choose "Cross GCC". Then click Finish.
+
+
+Project Properties
+------------------
+
+* The new project will appear under Project Explorer. Right-click the project and choose Properties from the context menu.
+
+* Click on the "Environment" properties page under "C/C++ Build". Click "Add..." and enter name ``BATCH_BUILD`` and value ``1``.
+
+* Click "Add..." again, and enter name ``IDF_PATH``. The value should be the full path where ESP-IDF is installed.
+
+* Edit the ``PATH`` environment variable. Keep the current value, and append the path to the Xtensa toolchain installed as part of IDF setup, if this is not already listed on the PATH. A typical path to the toolchain looks like ``/home/user-name/esp/xtensa-esp32-elf/bin``. Note that you need to add a colon ``:`` before the appended path.
+
+* On macOS, add a ``PYTHONPATH`` environment variable and set it to ``/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages``. This is so that the system Python, which has pyserial installed as part of the setup steps, overrides any built-in Eclipse Python.
+
+Navigate to "C/C++ General" -> "Preprocessor Include Paths" property page:
+
+* Click the "Providers" tab
+
+* In the list of providers, click "CDT Cross GCC Built-in Compiler Settings". Change "Command to get compiler specs" to ``xtensa-esp32-elf-gcc ${FLAGS} -std=c++11 -E -P -v -dD "${INPUTS}"``.
+
+* In the list of providers, click "CDT GCC Build Output Parser" and change the "Compiler command pattern" to ``xtensa-esp32-elf-(gcc|g\+\+|c\+\+|cc|cpp|clang)``
+
+Navigate to "C/C++ General" -> "Indexer" property page:
+
+* Check "Enable project specific settings" to enable the rest of the settings on this page.
+
+* Uncheck "Allow heuristic resolution of includes". When this option is enabled Eclipse sometimes fails to find correct header directories.
+
+Navigate to "C/C++ Build" -> "Behavior" property page:
+
+* Check "Enable parallel build" to enable multiple build jobs in parallel.
+
+.. _eclipse-build-project:
+
+Building in Eclipse
+-------------------
+
+Before your project is first built, Eclipse may show a lot of errors and warnings about undefined values. This is because some source files are automatically generated as part of the esp-idf build process. These errors and warnings will go away after you build the project.
+
+* Click OK to close the Properties dialog in Eclipse.
+
+* Outside Eclipse, open a command line prompt. Navigate to your project directory, and run ``make menuconfig`` to configure your project's esp-idf settings. This step currently has to be run outside Eclipse.
+
+*If you try to build without running a configuration step first, esp-idf will prompt for configuration on the command line - but Eclipse is not able to deal with this, so the build will hang or fail.*
+
+* Back in Eclipse, choose Project -> Build to build your project.
+
+**TIP**: If your project had already been built outside Eclipse, you may need to do a Project -> Clean before choosing Project -> Build. This is so Eclipse can see the compiler arguments for all source files. It uses these to determine the header include paths.
+
+Flash from Eclipse
+------------------
+
+You can integrate the "make flash" target into your Eclipse project to flash using esptool.py from the Eclipse UI:
+
+* Right-click your project in Project Explorer (important to make sure you select the project, not a directory in the project, or Eclipse may find the wrong Makefile.)
+
+* Select Build Targets -> Create... from the context menu.
+
+* Type "flash" as the target name. Leave the other options as their defaults.
+
+* Now you can use Project -> Build Target -> Build (Shift+F9) to build the custom flash target, which will compile and flash the project.
+
+Note that you will need to use "make menuconfig" to set the serial port and other config options for flashing. "make menuconfig" still requires a command line terminal (see the instructions for your platform.)
+
+Follow the same steps to add ``bootloader`` and ``partition_table`` targets, if necessary.
+
+Related Documents
+-----------------
+
+.. toctree::
+ :maxdepth: 1
+
+ eclipse-setup-windows
+
+
+.. _eclipse.org: https://www.eclipse.org/
+
diff --git a/docs/en/get-started/index.rst b/docs/en/get-started/index.rst
new file mode 100644
index 00000000..8d027f19
--- /dev/null
+++ b/docs/en/get-started/index.rst
@@ -0,0 +1,371 @@
+***********
+Get Started
+***********
+:link_to_translation:`zh_CN:[中文]`
+
+This document is intended to help users set up the software environment for development of applications using hardware based on the Espressif ESP32. Through a simple example we would like to illustrate how to use ESP-IDF (Espressif IoT Development Framework), including the menu based configuration, compiling the ESP-IDF and firmware download to ESP32 boards.
+
+.. include:: /_build/inc/version-note.inc
+
+Introduction
+============
+
+ESP32 integrates Wi-Fi (2.4 GHz band) and Bluetooth 4.2 solutions on a single chip, along with dual high performance cores, Ultra Low Power co-processor and several peripherals. Powered by 40 nm technology, ESP32 provides a robust, highly integrated platform to meet the continuous demands for efficient power usage, compact design, security, high performance, and reliability.
+
+Espressif provides the basic hardware and software resources that help application developers to build their ideas around the ESP32 series hardware. The software development framework by Espressif is intended for rapidly developing Internet-of-Things (IoT) applications, with Wi-Fi, Bluetooth, power management and several other system features.
+
+
+What You Need
+=============
+
+To develop applications for ESP32 you need:
+
+* **PC** loaded with either Windows, Linux or Mac operating system
+* **Toolchain** to build the **Application** for ESP32
+* **ESP-IDF** that essentially contains API for ESP32 and scripts to operate the **Toolchain**
+* A text editor to write programs (**Projects**) in C, e.g. `Eclipse `_
+* The **ESP32** board itself and a **USB cable** to connect it to the **PC**
+
+.. figure:: ../../_static/what-you-need.png
+ :align: center
+ :alt: Development of applications for ESP32
+ :figclass: align-center
+
+ Development of applications for ESP32
+
+Preparation of development environment consists of three steps:
+
+1. Setup of **Toolchain**
+2. Getting of **ESP-IDF** from GitHub
+3. Installation and configuration of **Eclipse**
+
+You may skip the last step, if you prefer to use different editor.
+
+Having environment set up, you are ready to start the most interesting part - the application development. This process may be summarized in four steps:
+
+1. Configuration of a **Project** and writing the code
+2. Compilation of the **Project** and linking it to build an **Application**
+3. Flashing (uploading) of the **Application** to **ESP32**
+4. Monitoring / debugging of the **Application**
+
+See instructions below that will walk you through these steps.
+
+
+Guides
+======
+
+If you have one of ESP32 development boards listed below, click on provided links to get you up and running.
+
+.. toctree::
+ :maxdepth: 1
+
+ ESP32 DevKitC
+ ESP-WROVER-KIT
+ ESP32-PICO-KIT
+
+If you have different board, move to sections below.
+
+
+.. _get-started-setup-toolchain:
+
+Setup Toolchain
+===============
+
+The quickest way to start development with ESP32 is by installing a prebuilt toolchain. Pick up your OS below and follow provided instructions.
+
+.. toctree::
+ :hidden:
+
+ Windows
+ Linux
+ MacOS
+
++-------------------+-------------------+-------------------+
+| |windows-logo| | |linux-logo| | |macos-logo| |
++-------------------+-------------------+-------------------+
+| `Windows`_ | `Linux`_ | `Mac OS`_ |
++-------------------+-------------------+-------------------+
+
+.. |windows-logo| image:: ../../_static/windows-logo.png
+ :target: ../get-started/windows-setup.html
+
+.. |linux-logo| image:: ../../_static/linux-logo.png
+ :target: ../get-started/linux-setup.html
+
+.. |macos-logo| image:: ../../_static/macos-logo.png
+ :target: ../get-started/macos-setup.html
+
+.. _Windows: ../get-started/windows-setup.html
+.. _Linux: ../get-started/linux-setup.html
+.. _Mac OS: ../get-started/macos-setup.html
+
+.. note::
+
+ We are using ``~/esp`` directory to install the prebuilt toolchain, ESP-IDF and sample applications. You can use different directory, but need to adjust respective commands.
+
+Depending on your experience and preferences, instead of using a prebuilt toolchain, you may want to customize your environment. To set up the system your own way go to section :ref:`get-started-customized-setup`.
+
+Once you are done with setting up the toolchain then go to section :ref:`get-started-get-esp-idf`.
+
+
+.. _get-started-get-esp-idf:
+
+Get ESP-IDF
+===========
+
+.. highlight:: bash
+
+Besides the toolchain (that contains programs to compile and build the application), you also need ESP32 specific API / libraries. They are provided by Espressif in `ESP-IDF repository `_.
+
+.. include:: /_build/inc/git-clone.inc
+
+Consult :doc:`/versions` for information about which version of ESP-IDF to use in a given situation.
+
+.. note::
+
+ Do not miss the ``--recursive`` option. If you have already cloned ESP-IDF without this option, run another command to get all the submodules::
+
+ cd ~/esp/esp-idf
+ git submodule update --init --recursive
+
+
+.. _get-started-setup-path:
+
+Setup Path to ESP-IDF
+=====================
+
+The toolchain programs access ESP-IDF using ``IDF_PATH`` environment variable. This variable should be set up on your PC, otherwise projects will not build. Setting may be done manually, each time PC is restarted. Another option is to set up it permanently by defining ``IDF_PATH`` in user profile. To do so, follow instructions specific to :ref:`Windows ` , :ref:`Linux and MacOS ` in section :doc:`add-idf_path-to-profile`.
+
+.. _get-started-get-packages:
+
+Install the Required Python Packages
+====================================
+
+Python packages required by ESP-IDF are located in the ``$IDF_PATH/requirements.txt`` file. You can install them by running::
+
+ python -m pip install --user -r $IDF_PATH/requirements.txt
+
+.. note::
+
+ Please invoke that version of the Python interpreter which you will be using with ESP-IDF. The version of the
+ interpreter can be checked by running command ``python --version`` and depending on the result, you might want to
+ use ``python2``, ``python2.7`` or similar instead of ``python``, e.g.::
+
+ python2.7 -m pip install --user -r $IDF_PATH/requirements.txt
+
+.. _get-started-start-project:
+
+Start a Project
+===============
+
+Now you are ready to prepare your application for ESP32. To start off quickly, we will use :example:`get-started/hello_world` project from :idf:`examples` directory in IDF.
+
+Copy :example:`get-started/hello_world` to ``~/esp`` directory::
+
+ cd ~/esp
+ cp -r $IDF_PATH/examples/get-started/hello_world .
+
+You can also find a range of example projects under the :idf:`examples` directory in ESP-IDF. These example project directories can be copied in the same way as presented above, to begin your own projects.
+
+.. important::
+
+ The esp-idf build system does not support spaces in paths to esp-idf or to projects.
+
+
+.. _get-started-connect:
+
+Connect
+=======
+
+You are almost there. To be able to proceed further, connect ESP32 board to PC, check under what serial port the board is visible and verify if serial communication works. If you are not sure how to do it, check instructions in section :doc:`establish-serial-connection`. Note the port number, as it will be required in the next step.
+
+
+.. _get-started-configure:
+
+Configure
+=========
+
+Being in terminal window, go to directory of ``hello_world`` application by typing ``cd ~/esp/hello_world``. Then start project configuration utility ``menuconfig``::
+
+ cd ~/esp/hello_world
+ make menuconfig
+
+If previous steps have been done correctly, the following menu will be displayed:
+
+.. figure:: ../../_static/project-configuration.png
+ :align: center
+ :alt: Project configuration - Home window
+ :figclass: align-center
+
+ Project configuration - Home window
+
+In the menu, navigate to ``Serial flasher config`` > ``Default serial port`` to configure the serial port, where project will be loaded to. Confirm selection by pressing enter, save configuration by selecting ``< Save >`` and then exit application by selecting ``< Exit >``.
+
+.. note::
+
+ On Windows, serial ports have names like COM1. On MacOS, they start with ``/dev/cu.``. On Linux, they start with ``/dev/tty``.
+ (See :doc:`establish-serial-connection` for full details.)
+
+Here are couple of tips on navigation and use of ``menuconfig``:
+
+* Use up & down arrow keys to navigate the menu.
+* Use Enter key to go into a submenu, Escape key to go out or to exit.
+* Type ``?`` to see a help screen. Enter key exits the help screen.
+* Use Space key, or ``Y`` and ``N`` keys to enable (Yes) and disable (No) configuration items with checkboxes "``[*]``"
+* Pressing ``?`` while highlighting a configuration item displays help about that item.
+* Type ``/`` to search the configuration items.
+
+.. note::
+
+ If you are **Arch Linux** user, navigate to ``SDK tool configuration`` and change the name of ``Python 2 interpreter`` from ``python`` to ``python2``.
+
+
+.. attention::
+
+ When using ESP32-DevKitC board with ESP32-SOLO-1 module, enable single core mode (:ref:`CONFIG_FREERTOS_UNICORE`) in menuconfig before flashing example applications.
+
+
+.. _get-started-build-flash:
+
+Build and Flash
+===============
+
+Now you can build and flash the application. Run::
+
+ make flash
+
+This will compile the application and all the ESP-IDF components, generate bootloader, partition table, and application binaries, and flash these binaries to your ESP32 board.
+
+.. highlight:: none
+
+::
+
+ esptool.py v2.0-beta2
+ Flashing binaries to serial port /dev/ttyUSB0 (app at offset 0x10000)...
+ esptool.py v2.0-beta2
+ Connecting........___
+ Uploading stub...
+ Running stub...
+ Stub running...
+ Changing baud rate to 921600
+ Changed.
+ Attaching SPI flash...
+ Configuring flash size...
+ Auto-detected Flash size: 4MB
+ Flash params set to 0x0220
+ Compressed 11616 bytes to 6695...
+ Wrote 11616 bytes (6695 compressed) at 0x00001000 in 0.1 seconds (effective 920.5 kbit/s)...
+ Hash of data verified.
+ Compressed 408096 bytes to 171625...
+ Wrote 408096 bytes (171625 compressed) at 0x00010000 in 3.9 seconds (effective 847.3 kbit/s)...
+ Hash of data verified.
+ Compressed 3072 bytes to 82...
+ Wrote 3072 bytes (82 compressed) at 0x00008000 in 0.0 seconds (effective 8297.4 kbit/s)...
+ Hash of data verified.
+
+ Leaving...
+ Hard resetting...
+
+If there are no issues, at the end of build process, you should see messages describing progress of loading process. Finally, the end module will be reset and "hello_world" application will start.
+
+If you'd like to use the Eclipse IDE instead of running ``make``, check out the :doc:`Eclipse guide `.
+
+
+.. _get-started-build-monitor:
+
+Monitor
+=======
+
+To see if "hello_world" application is indeed running, type ``make monitor``. This command is launching :doc:`IDF Monitor ` application::
+
+ $ make monitor
+ MONITOR
+ --- idf_monitor on /dev/ttyUSB0 115200 ---
+ --- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
+ ets Jun 8 2016 00:22:57
+
+ rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
+ ets Jun 8 2016 00:22:57
+ ...
+
+Several lines below, after start up and diagnostic log, you should see "Hello world!" printed out by the application. ::
+
+ ...
+ Hello world!
+ Restarting in 10 seconds...
+ I (211) cpu_start: Starting scheduler on APP CPU.
+ Restarting in 9 seconds...
+ Restarting in 8 seconds...
+ Restarting in 7 seconds...
+
+To exit the monitor use shortcut ``Ctrl+]``.
+
+.. note::
+
+ If instead of the messages above, you see a random garbage similar to::
+
+ e���)(Xn@�y.!��(�PW+)��Hn9a/9�!�t5��P�~�k��e�ea�5�jA
+ ~zY��Y(1�,1�� e���)(Xn@�y.!Dr�zY(�jpi�|�+z5Ymvp
+
+ or monitor fails shortly after upload, your board is likely using 26MHz crystal, while the ESP-IDF assumes default of 40MHz. Exit the monitor, go back to the :ref:`menuconfig `, change :ref:`CONFIG_ESP32_XTAL_FREQ_SEL` to 26MHz, then :ref:`build and flash ` the application again. This is found under ``make menuconfig`` under Component config --> ESP32-specific --> Main XTAL frequency.
+
+To execute ``make flash`` and ``make monitor`` in one go, type ``make flash monitor``. Check section :doc:`IDF Monitor ` for handy shortcuts and more details on using this application.
+
+That's all what you need to get started with ESP32!
+
+Now you are ready to try some other :idf:`examples`, or go right to developing your own applications.
+
+
+Environment Variables
+=====================
+
+Some environment variables can be specified whilst calling ``make`` allowing users to **override arguments without needing to reconfigure them using** ``make menuconfig``.
+
++-----------------+--------------------------------------------------------------+
+| Variables | Description & Usage |
++=================+==============================================================+
+| ``ESPPORT`` | Overrides the serial port used in ``flash`` and ``monitor``. |
+| | |
+| | Examples: ``make flash ESPPORT=/dev/ttyUSB1``, |
+| | ``make monitor ESPPORT=COM1`` |
++-----------------+--------------------------------------------------------------+
+| ``ESPBAUD`` | Overrides the serial baud rate when flashing the ESP32. |
+| | |
+| | Example: ``make flash ESPBAUD=9600`` |
++-----------------+--------------------------------------------------------------+
+| ``MONITORBAUD`` | Overrides the serial baud rate used when monitoring. |
+| | |
+| | Example: ``make monitor MONITORBAUD=9600`` |
++-----------------+--------------------------------------------------------------+
+
+.. note::
+ Users can export environment variables (e.g. ``export ESPPORT=/dev/ttyUSB1``).
+ All subsequent calls of ``make`` within the same terminal session will use
+ the exported value given that the variable is not simultaneously overridden.
+
+Updating ESP-IDF
+================
+
+After some time of using ESP-IDF, you may want to update it to take advantage of new features or bug fixes. The simplest way to do so is by deleting existing ``esp-idf`` folder and cloning it again, exactly as when doing initial installation described in sections :ref:`get-started-get-esp-idf`.
+
+If downloading to a new path, remember to :doc:`add-idf_path-to-profile` so that the toolchain scripts know where to find the ESP-IDF in its release specific location.
+
+Another solution is to update only what has changed. :ref:`The update procedure depends on the version of ESP-IDF you are using `.
+
+
+Related Documents
+=================
+
+.. toctree::
+ :maxdepth: 1
+
+ add-idf_path-to-profile
+ establish-serial-connection
+ make-project
+ eclipse-setup
+ idf-monitor
+ toolchain-setup-scratch
+
+.. _Stable version: https://docs.espressif.com/projects/esp-idf/en/stable/
+.. _Releases page: https://github.com/espressif/esp-idf/releases
+
diff --git a/docs/en/get-started/linux-setup.rst b/docs/en/get-started/linux-setup.rst
new file mode 100644
index 00000000..c97abda3
--- /dev/null
+++ b/docs/en/get-started/linux-setup.rst
@@ -0,0 +1,118 @@
+*************************************
+Standard Setup of Toolchain for Linux
+*************************************
+:link_to_translation:`zh_CN:[中文]`
+
+Install Prerequisites
+=====================
+
+To compile with ESP-IDF you need to get the following packages:
+
+- CentOS 7::
+
+ sudo yum install gcc git wget make ncurses-devel flex bison gperf python python2-cryptography
+
+- Ubuntu and Debian::
+
+ sudo apt-get install gcc git wget make libncurses-dev flex bison gperf python python-pip python-setuptools python-serial python-cryptography python-future
+
+- Arch::
+
+ sudo pacman -S --needed gcc git make ncurses flex bison gperf python2-pyserial python2-cryptography python2-future
+
+.. note::
+
+ Some older Linux distributions may be missing some of the Python packages listed above (or may use ``pyserial`` version 2.x which is not supported by ESP-IDF). It is possible to install these packages via ``pip`` instead - as described in section :ref:`get-started-get-packages`.
+
+Toolchain Setup
+===============
+
+.. include:: /_build/inc/download-links.inc
+
+ESP32 toolchain for Linux is available for download from Espressif website:
+
+- for 64-bit Linux:
+
+ |download_link_linux64|
+
+- for 32-bit Linux:
+
+ |download_link_linux32|
+
+1. Download this file, then extract it in ``~/esp`` directory:
+
+ - for 64-bit Linux:
+
+ .. include:: /_build/inc/unpack-code-linux64.inc
+
+ - for 32-bit Linux:
+
+ .. include:: /_build/inc/unpack-code-linux32.inc
+
+.. _setup-linux-toolchain-add-it-to-path:
+
+2. The toolchain will be extracted into ``~/esp/xtensa-esp32-elf/`` directory.
+
+ To use it, you will need to update your ``PATH`` environment variable in ``~/.profile`` file. To make ``xtensa-esp32-elf`` available for all terminal sessions, add the following line to your ``~/.profile`` file::
+
+ export PATH="$HOME/esp/xtensa-esp32-elf/bin:$PATH"
+
+ Alternatively, you may create an alias for the above command. This way you can get the toolchain only when you need it. To do this, add different line to your ``~/.profile`` file::
+
+ alias get_esp32='export PATH="$HOME/esp/xtensa-esp32-elf/bin:$PATH"'
+
+ Then when you need the toolchain you can type ``get_esp32`` on the command line and the toolchain will be added to your ``PATH``.
+
+ .. note::
+
+ If you have ``/bin/bash`` set as login shell, and both ``.bash_profile`` and ``.profile`` exist, then update ``.bash_profile`` instead. In CentOS, ``alias`` should set in ``.bashrc``.
+
+3. Log off and log in back to make the ``.profile`` changes effective. Run the following command to verify if ``PATH`` is correctly set::
+
+ printenv PATH
+
+ You are looking for similar result containing toolchain's path at the end of displayed string::
+
+ $ printenv PATH
+ /home/user-name/bin:/home/user-name/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/user-name/esp/xtensa-esp32-elf/bin
+
+ Instead of ``/home/user-name`` there should be a home path specific to your installation.
+
+
+Permission issues /dev/ttyUSB0
+------------------------------
+
+With some Linux distributions you may get the ``Failed to open port /dev/ttyUSB0`` error message when flashing the ESP32. :ref:`This can be solved by adding the current user to the dialout group`.
+
+
+Arch Linux Users
+----------------
+
+To run the precompiled gdb (xtensa-esp32-elf-gdb) in Arch Linux requires ncurses 5, but Arch uses ncurses 6.
+
+Backwards compatibility libraries are available in AUR_ for native and lib32 configurations:
+
+- https://aur.archlinux.org/packages/ncurses5-compat-libs/
+- https://aur.archlinux.org/packages/lib32-ncurses5-compat-libs/
+
+Before installing these packages you might need to add the author's public key to your keyring as described in the "Comments" section at the links above.
+
+Alternatively, use crosstool-NG to compile a gdb that links against ncurses 6.
+
+
+Next Steps
+==========
+
+To carry on with development environment setup, proceed to section :ref:`get-started-get-esp-idf`.
+
+
+Related Documents
+=================
+
+.. toctree::
+ :maxdepth: 1
+
+ linux-setup-scratch
+
+
+.. _AUR: https://wiki.archlinux.org/index.php/Arch_User_Repository
diff --git a/docs/en/get-started/macos-setup.rst b/docs/en/get-started/macos-setup.rst
new file mode 100644
index 00000000..7e1921a6
--- /dev/null
+++ b/docs/en/get-started/macos-setup.rst
@@ -0,0 +1,57 @@
+**************************************
+Standard Setup of Toolchain for Mac OS
+**************************************
+:link_to_translation:`zh_CN:[中文]`
+
+Install Prerequisites
+=====================
+
+- install pip::
+
+ sudo easy_install pip
+
+.. note::
+
+ ``pip`` will be used later for installing :ref:`the required Python packages `.
+
+Toolchain Setup
+===============
+
+.. include:: /_build/inc/download-links.inc
+
+ESP32 toolchain for macOS is available for download from Espressif website:
+
+|download_link_osx|
+
+Download this file, then extract it in ``~/esp`` directory:
+
+.. include:: /_build/inc/unpack-code-osx.inc
+
+.. _setup-macos-toolchain-add-it-to-path:
+
+The toolchain will be extracted into ``~/esp/xtensa-esp32-elf/`` directory.
+
+To use it, you will need to update your ``PATH`` environment variable in ``~/.profile`` file. To make ``xtensa-esp32-elf`` available for all terminal sessions, add the following line to your ``~/.profile`` file::
+
+ export PATH=$HOME/esp/xtensa-esp32-elf/bin:$PATH
+
+Alternatively, you may create an alias for the above command. This way you can get the toolchain only when you need it. To do this, add different line to your ``~/.profile`` file::
+
+ alias get_esp32="export PATH=$HOME/esp/xtensa-esp32-elf/bin:$PATH"
+
+Then when you need the toolchain you can type ``get_esp32`` on the command line and the toolchain will be added to your ``PATH``.
+
+
+Next Steps
+==========
+
+To carry on with development environment setup, proceed to section :ref:`get-started-get-esp-idf`.
+
+
+Related Documents
+=================
+
+.. toctree::
+ :maxdepth: 1
+
+ macos-setup-scratch
diff --git a/docs/en/get-started/windows-setup.rst b/docs/en/get-started/windows-setup.rst
new file mode 100644
index 00000000..ad7d8210
--- /dev/null
+++ b/docs/en/get-started/windows-setup.rst
@@ -0,0 +1,70 @@
+***************************************
+Standard Setup of Toolchain for Windows
+***************************************
+:link_to_translation:`zh_CN:[中文]`
+
+Introduction
+============
+
+Windows doesn't have a built-in "make" environment, so as well as installing the toolchain you will need a GNU-compatible environment. We use the MSYS2_ environment to provide this. You don't need to use this environment all the time (you can use :doc:`Eclipse ` or some other front-end), but it runs behind the scenes.
+
+
+Toolchain Setup
+===============
+
+The quick setup is to download the Windows all-in-one toolchain & MSYS2 zip file from dl.espressif.com:
+
+https://dl.espressif.com/dl/esp32_win32_msys2_environment_and_toolchain-20181001.zip
+
+Unzip the zip file to ``C:\`` (or some other location, but this guide assumes ``C:\``) and it will create an ``msys32`` directory with a pre-prepared environment.
+
+
+Check it Out
+============
+
+Open a MSYS2 MINGW32 terminal window by running ``C:\msys32\mingw32.exe``. The environment in this window is a bash shell. Create a directory named ``esp`` that is a default location to develop ESP32 applications. To do so, run the following shell command::
+
+ mkdir -p ~/esp
+
+By typing ``cd ~/esp`` you can then move to the newly created directory. If there are no error messages you are done with this step.
+
+.. figure:: ../../_static/msys2-terminal-window.png
+ :align: center
+ :alt: MSYS2 MINGW32 shell window
+ :figclass: align-center
+
+ MSYS2 MINGW32 shell window
+
+Use this window in the following steps setting up development environment for ESP32.
+
+
+Next Steps
+==========
+
+To carry on with development environment setup, proceed to section :ref:`get-started-get-esp-idf`.
+
+Updating The Environment
+========================
+
+When IDF is updated, sometimes new toolchains are required or new requirements are added to the Windows MSYS2 environment. To move any data from an old version of the precompiled environment to a new one:
+
+- Take the old MSYS2 environment (ie ``C:\msys32``) and move/rename it to a different directory (ie ``C:\msys32_old``).
+- Download the new precompiled environment using the steps above.
+- Unzip the new MSYS2 environment to ``C:\msys32`` (or another location).
+- Find the old ``C:\msys32_old\home`` directory and move this into ``C:\msys32``.
+- You can now delete the ``C:\msys32_old`` directory if you no longer need it.
+
+You can have independent different MSYS2 environments on your system, as long as they are in different directories.
+
+There are :ref:`also steps to update the existing environment without downloading a new one `, although this is more complex.
+
+Related Documents
+=================
+
+.. toctree::
+ :maxdepth: 1
+
+ windows-setup-scratch
+
+
+.. _MSYS2: https://msys2.github.io/
diff --git a/docs/en/index.rst b/docs/en/index.rst
new file mode 100644
index 00000000..b6a85246
--- /dev/null
+++ b/docs/en/index.rst
@@ -0,0 +1,55 @@
+ESP-IDF Programming Guide
+=========================
+:link_to_translation:`zh_CN:[中文]`
+
+This is the documentation for Espressif IoT Development Framework (`esp-idf `_). ESP-IDF is the official development framework for the `ESP32 `_ chip.
+
+================== ================== ==================
+|Get Started|_ |API Reference|_ |H/W Reference|_
+------------------ ------------------ ------------------
+`Get Started`_ `API Reference`_ `H/W Reference`_
+------------------ ------------------ ------------------
+|API Guides|_ |Contribute|_ |Resources|_
+------------------ ------------------ ------------------
+`API Guides`_ `Contribute`_ `Resources`_
+================== ================== ==================
+
+.. |Get Started| image:: ../_static/get-started.gif
+.. _Get Started: get-started/index.html
+
+.. |API Reference| image:: ../_static/api-reference.gif
+.. _API Reference: api-reference/index.html
+
+.. |H/W Reference| image:: ../_static/hw-reference.gif
+.. _H/W Reference: hw-reference/index.html
+
+.. |API Guides| image:: ../_static/api-guides.gif
+.. _API Guides: api-guides/index.html
+
+.. |Contribute| image:: ../_static/contribute.gif
+.. _Contribute: contribute/index.html
+
+.. |Resources| image:: ../_static/resources.gif
+.. _Resources: resources.html
+
+
+.. toctree::
+ :hidden:
+
+ Get Started
+ Get Started (CMake Preview)
+ API Reference
+ H/W Reference
+ API Guides
+ Contribute
+ Versions
+ Resources
+ Copyrights
+ About
+ 语言/Languages
+ Guide Downloads
+
+* :ref:`genindex`
+
+
+
diff --git a/docs/gen-dxd.py b/docs/gen-dxd.py
new file mode 100755
index 00000000..ee2c692c
--- /dev/null
+++ b/docs/gen-dxd.py
@@ -0,0 +1,318 @@
+#!/usr/bin/env python
+#
+# gen-dxd.py - Generate Doxygen Directives
+#
+# This code is in the Public Domain (or CC0 licensed, at your option.)
+# Unless required by applicable law or agreed to in writing, this
+# software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+# CONDITIONS OF ANY KIND, either express or implied.
+#
+
+from __future__ import print_function
+from __future__ import unicode_literals
+from builtins import range
+from io import open
+import sys
+import os
+import re
+
+# Determime build directory
+builddir = '_build'
+if 'BUILDDIR' in os.environ:
+ builddir = os.environ['BUILDDIR']
+
+# Script configuration
+header_file_path_prefix = "../../components/"
+"""string: path prefix for header files.
+"""
+doxyfile_path = "../Doxyfile"
+"""string: path to a file containing header files to processs.
+"""
+xml_directory_path = "xml"
+"""string: path to directory with XML files by Doxygen.
+"""
+inc_directory_path = os.path.join(builddir, 'inc')
+"""string: path prefix for header files.
+"""
+all_kinds = [
+ ("function", "Functions"),
+ ("union", "Unions"),
+ ("struct", "Structures"),
+ ("define", "Macros"),
+ ("typedef", "Type Definitions"),
+ ("enum", "Enumerations")
+ ]
+"""list of items that will be generated for a single API file
+"""
+
+
+def get_doxyfile_input():
+ """Get contents of Doxyfile's INPUT statement.
+
+ Returns:
+ Contents of Doxyfile's INPUT.
+
+ """
+ if not os.path.isfile(doxyfile_path):
+ print("Doxyfile '%s' does not exist!" % doxyfile_path)
+ sys.exit()
+
+ print("Getting Doxyfile's INPUT")
+
+ input_file = open(doxyfile_path, "r", encoding='utf-8')
+
+ line = input_file.readline()
+ # read contents of Doxyfile until 'INPUT' statement
+ while line:
+ if line.find("INPUT") == 0:
+ break
+ line = input_file.readline()
+
+ doxyfile_INPUT = ""
+ line = input_file.readline()
+ # skip input_file contents until end of 'INPUT' statement
+ while line:
+ if line.isspace():
+ # we have reached the end of 'INPUT' statement
+ break
+ # process only lines that are not comments
+ if line.find("#") == -1:
+ # extract header file path inside components folder
+ m = re.search(header_file_path_prefix + "(.*\.h)", line)
+ header_file_path = m.group(1)
+ doxyfile_INPUT += header_file_path + "\n"
+ # proceed reading next line
+ line = input_file.readline()
+
+ input_file.close()
+ return doxyfile_INPUT
+
+
+def get_api_name(header_file_path):
+ """Get name of API from header file path.
+
+ Args:
+ header_file_path: path to the header file.
+
+ Returns:
+ The name of API.
+
+ """
+ api_name = ""
+ regex = r".*/(.*)\.h"
+ m = re.search(regex, header_file_path)
+ if m:
+ api_name = m.group(1)
+
+ return api_name
+
+
+def get_rst_header(header_name):
+ """Get rst formatted code with a header.
+
+ Args:
+ header_name: name of header.
+
+ Returns:
+ Formatted rst code with the header.
+
+ """
+
+ rst_output = ""
+ rst_output += header_name + "\n"
+ rst_output += "^" * len(header_name) + "\n"
+ rst_output += "\n"
+
+ return rst_output
+
+
+def select_unions(innerclass_list):
+ """Select unions from innerclass list.
+
+ Args:
+ innerclass_list: raw list with unions and structures
+ extracted from Dogygen's xml file.
+
+ Returns:
+ Doxygen directives with unions selected from the list.
+
+ """
+
+ rst_output = ""
+ for line in innerclass_list.splitlines():
+ # union is denoted by "union" at the beginning of line
+ if line.find("union") == 0:
+ union_id, union_name = re.split(r"\t+", line)
+ rst_output += ".. doxygenunion:: "
+ rst_output += union_name
+ rst_output += "\n"
+
+ return rst_output
+
+
+def select_structs(innerclass_list):
+ """Select structures from innerclass list.
+
+ Args:
+ innerclass_list: raw list with unions and structures
+ extracted from Dogygen's xml file.
+
+ Returns:
+ Doxygen directives with structures selected from the list.
+ Note: some structures are excluded as described on code below.
+
+ """
+
+ rst_output = ""
+ for line in innerclass_list.splitlines():
+ # structure is denoted by "struct" at the beginning of line
+ if line.find("struct") == 0:
+ # skip structures that are part of union
+ # they are documented by 'doxygenunion' directive
+ if line.find("::") > 0:
+ continue
+ struct_id, struct_name = re.split(r"\t+", line)
+ rst_output += ".. doxygenstruct:: "
+ rst_output += struct_name
+ rst_output += "\n"
+ rst_output += " :members:\n"
+ rst_output += "\n"
+
+ return rst_output
+
+
+def get_directives(tree, kind):
+ """Get directives for specific 'kind'.
+
+ Args:
+ tree: the ElementTree 'tree' of XML by Doxygen
+ kind: name of API "kind" to be generated
+
+ Returns:
+ Doxygen directives for selected 'kind'.
+ Note: the header with "kind" name is included.
+
+ """
+
+ rst_output = ""
+ if kind in ["union", "struct"]:
+ innerclass_list = ""
+ for elem in tree.iterfind('compounddef/innerclass'):
+ innerclass_list += elem.attrib["refid"] + "\t" + elem.text + "\n"
+ if kind == "union":
+ rst_output += select_unions(innerclass_list)
+ else:
+ rst_output += select_structs(innerclass_list)
+ else:
+ for elem in tree.iterfind(
+ 'compounddef/sectiondef/memberdef[@kind="%s"]' % kind):
+ name = elem.find('name')
+ rst_output += ".. doxygen%s:: " % kind
+ rst_output += name.text + "\n"
+ if rst_output:
+ all_kinds_dict = dict(all_kinds)
+ rst_output = get_rst_header(all_kinds_dict[kind]) + rst_output + "\n"
+
+ return rst_output
+
+
+def generate_directives(header_file_path):
+ """Generate API reference with Doxygen directives for a header file.
+
+ Args:
+ header_file_path: a path to the header file with API.
+
+ Returns:
+ Doxygen directives for the header file.
+
+ """
+
+ api_name = get_api_name(header_file_path)
+
+ # in XLT file name each "_" in the api name is expanded by Doxygen to "__"
+ xlt_api_name = api_name.replace("_", "__")
+ xml_file_path = "%s/%s_8h.xml" % (xml_directory_path, xlt_api_name)
+
+ rst_output = ""
+ rst_output = ".. File automatically generated by 'gen-dxd.py'\n"
+ rst_output += "\n"
+ rst_output += get_rst_header("Header File")
+ rst_output += "* :component_file:`" + header_file_path + "`\n"
+ rst_output += "\n"
+
+ try:
+ import xml.etree.cElementTree as ET
+ except ImportError:
+ import xml.etree.ElementTree as ET
+
+ tree = ET.ElementTree(file=xml_file_path)
+ for i in range(len(all_kinds)):
+ kind = all_kinds[i][0]
+ rst_output += get_directives(tree, kind)
+
+ return rst_output
+
+
+def generate_api_inc_files():
+ """Generate header_file.inc files
+ with API reference made of doxygen directives
+ for each header file
+ specified in the 'INPUT' statement of Doxyfile.
+
+ """
+
+ if not os.path.isdir(xml_directory_path):
+ print("Directory %s does not exist!" % xml_directory_path)
+ sys.exit()
+
+ if not os.path.exists(inc_directory_path):
+ os.makedirs(inc_directory_path)
+
+ list_to_generate = get_doxyfile_input()
+ print("Generating 'api_name.inc' files with Doxygen directives")
+ for header_file_path in list_to_generate.splitlines():
+ api_name = get_api_name(header_file_path)
+ inc_file_path = inc_directory_path + "/" + api_name + ".inc"
+ rst_output = generate_directives(header_file_path)
+
+ previous_rst_output = ''
+ if os.path.isfile(inc_file_path):
+ with open(inc_file_path, "r", encoding='utf-8') as inc_file_old:
+ previous_rst_output = inc_file_old.read()
+
+ if previous_rst_output != rst_output:
+ with open(inc_file_path, "w", encoding='utf-8') as inc_file:
+ inc_file.write(rst_output)
+
+
+if __name__ == "__main__":
+ """The main script that generates
+ Doxygen directives.
+
+ """
+
+ # Process command line arguments, if any
+ if len(sys.argv) > 1:
+ if not os.path.isdir(xml_directory_path):
+ print("Directory %s does not exist!" % xml_directory_path)
+ sys.exit()
+ header_file_path = sys.argv[1]
+ api_name = get_api_name(header_file_path)
+ if api_name:
+ rst_output = generate_directives(header_file_path)
+ print("Doxygen directives for '%s'" % header_file_path)
+ print()
+ print(rst_output)
+ else:
+ print("Options to execute 'gen-dxd.py' application:")
+ print("1: $ python gen-dxd.py")
+ print(" Generate API 'header_file.inc' files for headers defined in '%s'" % doxyfile_path)
+ print("2: $ python gen-dxd.py header_file_path")
+ print(" Print out Doxygen directives for a single header file")
+ print(" example: $ python gen-dxd.py mdns/include/mdns.h")
+ print(" NOTE: Run Doxygen first to get XML files for the header file")
+
+ sys.exit()
+
+ # No command line arguments given
+ generate_api_inc_files()
diff --git a/docs/gen-toolchain-links.py b/docs/gen-toolchain-links.py
new file mode 100644
index 00000000..aa824b93
--- /dev/null
+++ b/docs/gen-toolchain-links.py
@@ -0,0 +1,77 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# This script generates toolchain download links and toolchain unpacking
+# code snippets based on information found in $IDF_PATH/tools/toolchain_versions.mk
+#
+
+from __future__ import print_function
+
+import sys
+import os
+
+def main():
+ if len(sys.argv) != 4:
+ print("Usage: gen-toolchain-links.py