mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
Initial public version
This commit is contained in:
@@ -0,0 +1,103 @@
|
||||
Software Copyrights
|
||||
===================
|
||||
|
||||
All original source code in this repository is Copyright (C) 2015-2016
|
||||
Espressif Systems. This source code is licensed under the Apache
|
||||
License 2.0 as described in the file LICENSE.
|
||||
|
||||
Additional third party copyrighted code is included under the following licenses:
|
||||
|
||||
* Newlib_ (components/newlib) is licensed under the BSD License and is Copyright of various parties, as described in the file components/newlib/COPYING.NEWLIB.
|
||||
|
||||
* Xtensa header files (components/esp32/include/xtensa) are Copyright (C) 2013 Tensilica Inc and are licensed under the MIT License as reproduce in the individual header files.
|
||||
|
||||
* `esptool.py`_ (bin/esptool.py) is Copyright (C) 2014-2016 Fredrik Ahlberg, Angus Gratton and is licensed under the GNU General Public License v2, as described in the file components/esptool_py/LICENSE.
|
||||
|
||||
* Original parts of FreeRTOS_ (components/freertos) are Copyright (C) 2015 Real Time Engineers Ltd and is licensed under the GNU General Public License V2 with the FreeRTOS Linking Exception, as described in the file components/freertos/license.txt.
|
||||
|
||||
* Original parts of LWIP_ (components/lwip) are Copyright (C) 2001, 2002 Swedish Institute of Computer Science and are licensed under the BSD License as described in the file components/lwip/COPYING.
|
||||
|
||||
* KConfig (tools/kconfig) is Copyright (C) 2002 Roman Zippel and others, and is licensed under the GNU General Public License V2.
|
||||
|
||||
* `wpa_supplicant`_ Copyright (c) 2003-2005 Jouni Malinen and licensed under the BSD license.
|
||||
|
||||
* `FreeBSD net80211`_ Copyright (c) 2004-2008 Sam Leffler, Errno Consulting and licensed under the BSD license.
|
||||
|
||||
Where source code headers specify Copyright & License information, this information takes precedence over the summaries made here.
|
||||
|
||||
ROM Source Code Copyrights
|
||||
==========================
|
||||
|
||||
ESP32 mask ROM hardware includes binaries compiled from portions of the following third party software:
|
||||
|
||||
* Newlib_, as licensed under the BSD License and Copyright of various parties, as described in the file components/newlib/COPYING.NEWLIB.
|
||||
|
||||
* Xtensa libhal, Copyright (c) Tensilica Inc and licensed under the MIT license (see below).
|
||||
|
||||
* TinyBasic_ Plus, Copyright Mike Field & Scott Lawrence and licensed under the MIT license (see below).
|
||||
|
||||
* miniz_, by Rich Geldreich - placed into the public domain.
|
||||
|
||||
* `wpa_supplicant`_ Copyright (c) 2003-2005 Jouni Malinen and licensed under the BSD license.
|
||||
|
||||
* TJpgDec_ Copyright (C) 2011, ChaN, all right reserved. See below for license.
|
||||
|
||||
Xtensa libhal MIT License
|
||||
=========================
|
||||
|
||||
Copyright (c) 2003, 2006, 2010 Tensilica Inc.
|
||||
|
||||
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.
|
||||
|
||||
TinyBasic Plus MIT License
|
||||
==========================
|
||||
|
||||
Copyright (c) 2012-2013
|
||||
|
||||
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.
|
||||
|
||||
TJpgDec License
|
||||
===============
|
||||
TJpgDec - Tiny JPEG Decompressor R0.01 (C)ChaN, 2011
|
||||
The TJpgDec is a generic JPEG decompressor module for tiny embedded systems.
|
||||
This is a free software that opened for education, research and commercial
|
||||
developments under license policy of following terms.
|
||||
|
||||
Copyright (C) 2011, ChaN, all right reserved.
|
||||
|
||||
* The TJpgDec module is a free software and there is NO WARRANTY.
|
||||
* No restriction on use. You can use, modify and redistribute it for
|
||||
personal, non-profit or commercial products UNDER YOUR RESPONSIBILITY.
|
||||
* Redistributions of source code must retain the above copyright notice.
|
||||
|
||||
|
||||
.. _Newlib: https://sourceware.org/newlib/
|
||||
.. _FreeRTOS: http://freertos.org/
|
||||
.. _esptool.py: https://github.com/themadinventor/esptool
|
||||
.. _LWIP: http://savannah.nongnu.org/projects/lwip/
|
||||
.. _TinyBasic: https://github.com/BleuLlama/TinyBasicPlus
|
||||
.. _miniz: https://code.google.com/archive/p/miniz/
|
||||
.. _wpa_supplicant: http://w1.fi/wpa_supplicant/
|
||||
.. _FreeBSD net80211: https://github.com/freebsd/freebsd/tree/master/sys/net80211
|
||||
.. _TJpgDec: http://elm-chan.org/fsw/tjpgd/00index.html
|
||||
@@ -0,0 +1,75 @@
|
||||
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 SDK for your platform (see Windows, OS X, Linux).
|
||||
|
||||
* 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.)
|
||||
|
||||
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 skeleton project from github.
|
||||
|
||||
* 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 SDK project. Don't specify the path to the SDK itself.
|
||||
|
||||
* 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 ``V`` and value ``1``.
|
||||
|
||||
* Click "Add..." again, and enter name ``SDK_PATH``. The value should be the full path where the ESP32 SDK is installed. *Windows users: Use forward-slashes not backslashes for this path, ie C:/Users/MyUser/Development/SDK*.
|
||||
|
||||
*Windows users only, follow these two additional steps:*
|
||||
|
||||
* On the same Environment property page, edit the PATH environment variable and append ";C:\msys32\usr\bin;C:\msys32\mingw32\bin;C:\msys32\opt\xtensa-esp32-elf\bin" to the end of the default value. (If you installed msys32 to a different directory then you'll need to change these paths to match.)
|
||||
|
||||
* Click on the "C/C++ Build" top-level properties page then uncheck "Use default build command" and enter this for the custom build command: ``bash ${SDK_PATH}/bin/eclipse_windows_make.sh``.
|
||||
|
||||
*All users, continue with these steps:*
|
||||
|
||||
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". Under "Command to get compiler specs", replace the text ``${COMMAND}`` at the beginning of the line with ``xtensa-esp32-elf-gcc``. This means the full "Command to get compiler specs" should be ``xtensa-esp32-elf-gcc ${FLAGS} -E -P -v -dD "${INPUTS}"``.
|
||||
|
||||
* In the list of providers, click "CDT GCC Build Output Parser" and type ``xtensa-esp32-elf-`` at the beginning of the Compiler command pattern. This means the full Compiler command pattern should be ``xtensa-esp32-elf-(g?cc)|([gc]\+\+)|(clang)``
|
||||
|
||||
* Click OK to close the Properties dialog, and choose Project -> Build to build your project.
|
||||
|
||||
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 the "esp-idf-tests" project in Project Explorer (important to make sure you don't select a subdirectory of the project or Eclipse may find the wrong Makefile.)
|
||||
|
||||
* Select Make Targets -> Create from the context menu.
|
||||
|
||||
* Type "flash" as the target name. Leave the other options as their defaults.
|
||||
|
||||
* Now you can use Project -> Make 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.
|
||||
|
||||
.. _eclipse.org: http://www.eclipse.org/
|
||||
@@ -0,0 +1,87 @@
|
||||
Step 1: Toolchain for Windows: Quick Steps
|
||||
==================================
|
||||
|
||||
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.
|
||||
You don't need to use this environment all the time (you can use Eclipse_ or some other front-end), but it runs behind the scenes.
|
||||
|
||||
The quick setup is to download the Windows all-in-one toolchain & MSYS zip file from dl.espressif.com:
|
||||
|
||||
http://dl.espressif.com/dl/esp32_win32_msys2_environment_and_toolchain-20160816.zip
|
||||
|
||||
Unzip the zip file to C:\ and it will create an "msys32" directory with a pre-prepared environment.
|
||||
|
||||
|
||||
Alternative Step 1: Configure toolchain & environment from scratch
|
||||
==================================================================
|
||||
|
||||
As an alternative to getting a pre-prepared environment, you can set up the environment from scratch:
|
||||
|
||||
* Navigate to the MSYS2_ installer page and download the ``msys2-i686-xxxxxxx.exe`` installer executable (we only support a 32-bit MSYS environment, it works on both 32-bit and 64-bit Windows.)
|
||||
|
||||
* Run through the installer steps, and accept the "Run MSYS2 now" option at the end. A window will open with a MSYS2 terminal.
|
||||
|
||||
* The SDK repository on github contains a script in the tools directory titled ``windows_install_prerequisites.sh``. If you haven't downloaded the SDK yet, that's OK - you can just `download that one file in Raw format from here <http://github.com/espressif/esp-idf>`_. Save it somewhere on your computer.
|
||||
|
||||
* Type the path to the shell script into the MSYS2 terminal window. You can type it as a normal Windows path, but use forward-slashes instead of back-slashes. ie: ``C:/Users/myuser/Downloads/windows_install_prerequisites.sh``. You can read the script beforehand to check what it does.
|
||||
|
||||
* If you use the 201602 MSYS2 installer, the first time you run ``windows_install_prerequisites.sh`` it will update the MSYS2 core system. At the end of this update, you will be prompted to close the MSYS2 terminal and re-open. When you re-open after the update, re-run ``windows_install_prerequisites.sh``. The next version of MSYS2 (after 201602) will not need this interim step.
|
||||
|
||||
* The ``windows_install_prerequisites.sh`` script will download and install packages for ESP32 SDK support, and the ESP32 toolchain.
|
||||
|
||||
Note: You may encounter a bug where svchost.exe uses 100% CPU in Windows after setup is finished, resulting in the SDK building very slowly. Terminating svchost.exe or restarting Windows will solve this problem.
|
||||
|
||||
Another Alternative Step 1: Just download a toolchain
|
||||
=====================================================
|
||||
|
||||
If you already have an MSYS2 install or want to do things differently, you can download just the toolchain here:
|
||||
|
||||
http://dl.espressif.com/dl/xtensa-esp32-elf-win32-1.22.0-59.zip
|
||||
|
||||
If you followed one of the above options for Step 1, you won't need this download.
|
||||
|
||||
Important: Just having this toolchain is *not enough* to use ESP-IDF on Windows. You will need GNU make, bash, and sed at minimum. The above environments provide all this, plus a host compiler (required for menuconfig support).
|
||||
|
||||
Step 2: Getting the SDK from github
|
||||
===================================
|
||||
|
||||
Option 1: Direct Download
|
||||
-------------------------
|
||||
|
||||
This is the quick option to get up and running with the SDK, but you'll have to re-download in order to update the SDK.
|
||||
|
||||
Navigate to the github repository and click Download. Unzip the SDK somewhere that you need to use it.
|
||||
|
||||
Option 2: Using git
|
||||
-------------------
|
||||
|
||||
It takes longer to check out the SDK directly from git, but you'll have the option of using ``git pull`` to update the SDK sources.
|
||||
|
||||
Open an MSYS2 terminal window by running ``C:\msys32\msys2_shell.cmd``. The environment in this window is a bash shell.
|
||||
|
||||
Change to the directory you want to clone the SDK into by typing a command like this one: ``cd "C:/path/to/dir"`` (note the forward-slashes in the path). Then type ``git clone https://github.com/espressif/esp-idf.git``
|
||||
|
||||
If you'd rather use a Windows UI tool to manage your git repositories, this is also possible. A wide range are available.
|
||||
|
||||
Step 3: Starting a project
|
||||
==========================
|
||||
|
||||
The SDK by itself does not build a binary to run on the ESP32. The binary "app" comes from a project in a different directory. Multiple projects can share the same ESP32 SDK.
|
||||
|
||||
The easiest way to start a project is to download the Getting Started project from github_.
|
||||
|
||||
The process is the same as for checking out the SDK from github. Change to the parent directory and run ``git clone https://github.com/espressif/esp-idf-template.git``.
|
||||
|
||||
Step 4: Configuring the project
|
||||
===============================
|
||||
|
||||
Open an MSYS2 terminal window by running ``C:\msys32\msys2_shell.cmd``. The environment in this window is a bash shell.
|
||||
|
||||
Type a command like this to set the path to ESP-IDF directory: ``export SDK_PATH="C:/path/to/esp-idf"`` (note the forward-slashes not back-slashes for the path). If you don't want to run this command every time you open an MSYS2 window, create a new file in ``C:/msys32/etc/profile.d/`` and paste this line in - then it will be run each time you open an MYS2 terminal.
|
||||
|
||||
Use ``cd`` to change to the project directory (not the SDK directory.) Type ``make menuconfig`` to configure your project, then ``make`` to build it, ``make clean`` to remove built files, and ``make flash`` to flash (use the menuconfig to set the serial port for flashing.)
|
||||
|
||||
If you'd like to use the Eclipse IDE instead of running ``make``, check out the Eclipse setup guide in this directory.
|
||||
|
||||
|
||||
.. _MSYS2: https://msys2.github.io/
|
||||
.. _github: https://github.com/espressif/esp-idf-template
|
||||
Reference in New Issue
Block a user