ESP-IoT-Solution Choose version... Get Started Basic Component Bluetooth Display USB Host&Device Audio Multimedia GUI AI Input Device IR Sensors Touch Storage Motor Security&Encryption Electrical&Lighting Other Resources Contribute ESP-IoT-Solution » ESP-IoT-Solution Programming Guide Edit on GitHub ESP-IoT-Solution Programming Guide [中文] This is the documentation for ESP-IoT-Solution Development Framework. ESP-IoT-Solution contains device drivers and code frameworks for the development of IoT system, which works as extra components of ESP-IDF and much easier to start. Get Started Display USB Host&Device GUI Input Sensors Audio Security&Encryption Contribute Provide feedback about this document Next © Copyright 2016 - 2024, Espressif Systems (Shanghai) CO., LTD. Built with Sphinx using a theme based on Read the Docs Sphinx Theme. Download PDF ESP-IoT-Solution Choose version... Get Started ESP-IoT-Solution Introduction ESP-IoT-Solution Versions ESP-IDF Introduction ESP Series SoC Introduction Setting up Development Environment 1. Get ESP-IDF 2. Get ESP-IoT-Solution Use ESP-IoT-Solution Components Build and Download 1. Set up the environment variables 2. Set build target 3. Build and download the program 4. Serial print log Related Documents Basic Component Bluetooth Display USB Host&Device Audio Multimedia GUI AI Input Device IR Sensors Touch Storage Motor Security&Encryption Electrical&Lighting Other Resources Contribute ESP-IoT-Solution » Get Started Edit on GitHub Get Started [中文] This document is intended to help you set up the development environment for ESP-IoT-Solution (Espressif IoT Solution). After that, a simple example will show you how to use ESP-IoT-Solution to set up environment, create a project, build and flash firmware onto an ESP series board, etc. ESP-IoT-Solution Introduction ESP-IoT-Solution contains peripheral drivers and code frameworks commonly used in IoT system development, which provide complementary components to ESP-IDF to facilitate simpler development, mainly including the following contents: Device drivers such as sensors, screens, audio devices, input devices, actuators, and etc. Code framework and related documents of low power management, security encryption, storage and etc. Entrance guideline for Espressif’s open-source solutions from the perspective of practical application. ESP-IoT-Solution Versions Specifications of different ESP-IoT-Solution versions are listed in the following table: ESP-IoT-Solution version Corresponding ESP-IDF version Main changes Status master >=v4.4 support component manager and new chips New features development branch release/v1.1 v4.0.1 IDF version updated, deleted codes that have been moved to other repos Stop maintenance release/v1.0 v3.2.2 Legacy version Stop maintenance Since the master branch uses the ESP Component Manager to manager components, each of them is a separate package, and each package may support a different version of the ESP-IDF, which will be declared in the component’s idf_component.yml file. ESP-IDF Introduction ESP-IDF is the IoT development framework for ESP series SoCs provided by Espressif, including: A series of libraries and header files, providing core components required for building software projects based on ESP SoC; Common tools and functions used during the development and manufacturing processes, e.g., build, flashing, debugging, measurement and etc. Note For detailed information, please go to ESP-IDF Programming Guide. ESP Series SoC Introduction You can select any development board from ESP series to get started with ESP-IoT-Solution, or select a supported board from the Boards Component directly for a quick start. ESP series SoC support the following features: 2.4 GHz Wi-Fi Bluetooth High-performance single core, dual-core processor, capable of running at 240 MHz Ultra-low-power co-processor Various peripherals including GPIO, I2C, I2S, SPI ,UART, SDIO, RMT, LEDC PWM, Ethernet, TWAI®, Touch, USB OTG and etc. Rich memory resources, including up to 520 KB internal RAM and can support external PSRAM Support security functions, e.g., hardware encryption ESP series of SoC are designed with the 40nm technology, showing the best power and RF performance, versatility and reliability in a wide variety of application and power scenarios. Note The configuration varies by SoC series, please refer to ESP Product Selector for details. Setting up Development Environment 1. Get ESP-IDF As ESP-IoT-Solution relies on ESP-IDF basic functions and build tools, please set up ESP-IDF development environment first following ESP-IDF Installation Step by Step. Please note that different versions of ESP-IoT-Solution may rely on different ESP-IDF versions, please refer to ESP-IoT-Solution Versions for specifications. 2. Get ESP-IoT-Solution For master version, please use the following command: git clone --recursive https://github.com/espressif/esp-iot-solution For release/v1.1 version, please use the following command: git clone -b release/v1.1 --recursive https://github.com/espressif/esp-iot-solution For other versions, please also use this command with release/v1.1 replaced by your target branch name. Use ESP-IoT-Solution Components If you just want to use the components in ESP-IoT-Solution, we recommend you use it from the ESP Component Registry. The registered components in ESP-IoT-Solution are listed in README.md , You can directly add the components from the Component Registry to your project by using the idf.py add-dependency command under your project’s root directory. eg run idf.py add-dependency "espressif/usb_stream" to add the usb_stream, the component will be downloaded automatically during the CMake step. Please refer to IDF Component Manager for details. Build and Download 1. Set up the environment variables The tools installed in above steps are not yet added to the PATH environment variables. To make the tools usable from the command line, please follow the following steps to add environment variables: Add ESP-IDF environment variables: For Windows system, please open the Command Prompt and run: %userprofile%\esp\esp-idf\export.bat For Linux and macOS, please run: . $HOME/esp/esp-idf/export.sh Please remember to replace the paths in above commands as your actual paths. Add IOT_SOLUTION_PATH environment variables: For Windows system, please open the Command Prompt and run: set IOT_SOLUTION_PATH=C:\esp\esp-iot-solution For Linux and macOS, please run: export IOT_SOLUTION_PATH=~/esp/esp-iot-solution Note The environment variables set by the above method are only valid in the current terminal. Please repeat above steps if you open a new terminal. 2. Set build target ESP-IDF supports multiple chips as esp32, esp32s2 and others, please set your target chip before building (the default target is esp32). For example, you can set the build target as esp32s2. idf.py set-target esp32s2 For examples in ESP-IoT-Solution developed based on Boards Component, you can go to Board Options -> Choose Target Board in menuconfig to choose a target board: idf.py menuconfig 3. Build and download the program Use the idf.py tool to build and download the program with: idf.py -p PORT build flash Please replace PORT with your board’s port name. Serial ports have the following patterns in their names: Windows is like COMx; Linux starting with /dev/ttyUSBx; macOS usually is /dev/cu.. 4. Serial print log Use the idf.py tool to see logs: idf.py -p PORT monitor Do not forget to replace PORT with your serial port name (COMx for Windows; /dev/ttyUSBx for Linux; /dev/cu. for macOS). Related Documents ESP-IDF Installation Step by Step ESP-IDF Get Started ESP Product Selector Provide feedback about this document Previous Next © Copyright 2016 - 2024, Espressif Systems (Shanghai) CO., LTD. Built with Sphinx using a theme based on Read the Docs Sphinx Theme. Download PDF ESP-IoT-Solution Choose version... Get Started Basic Component Communication Bus I2S LCD Driver Boards Support Instructions The Switch and Configuration of a Development Board Supported Development Boards Add a New Development Board Component Dependencies Adapted IDF Versions Supported Chips CMake Utilities Bluetooth Display USB Host&Device Audio Multimedia GUI AI Input Device IR Sensors Touch Storage Motor Security&Encryption Electrical&Lighting Other Resources Contribute ESP-IoT-Solution » Basic Component » Boards Component Edit on GitHub Boards Component [中文] This document mainly introduces the use of a board support component (Boards). As a common component of examples, this component can provide unified pin macro definitions and hardware-independent initialization operations to applications. Applications developed based on this component are compatible with different development boards at the same time with the following features: Provides unified macro definitions for pins Provides default peripheral configuration parameters Provides unified board-level initialization interfaces Provides hardware control interfaces for development boards The following figure shows the structure of the Boards component: Boards Component Diagram The Boards component contains the following: board_common.h, contains the function declaration of the common API; board_common.c, contains the function implementation of the common API (weak function); Kconfig.projbuild, contains common configuration items; The subfolders named after the development board name includes the following: iot_board.h provides the gpio definition of the development board, and the board’s unique custom API function declaration board.c provides user implementation of common API (Covering default weak function), custom API function implementation kconfig.in provides custom configuration items unique to the development board. Note The Boards component is provided in examples/common_components/boards. Instructions Initialize development board: use iot_board_init in app_main to initialize the development board. you