• Stars
    star
    3,232
  • Rank 13,330 (Top 0.3 %)
  • Language
    C
  • License
    Apache License 2.0
  • Created over 9 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Latest ESP8266 SDK based on FreeRTOS, esp-idf style.

ESP8266 RTOS Software Development Kit

Documentation Status

** IMPORTANT NOTICE **

About this repository

A new branching model is applied to this repository, which consists of a master branch and release branches.

1. Master branch

The master branch is an integration branch where bug fixes/features are gathered for compiling and functional testing.

2. Release branch

The release branch is where releases are maintained and hot fixes (with names like release/v2.x.x) are added. Please ensure that all your production-related work are tracked with the release branches.

With this new model, we can push out bug fixes more quickly and achieve simpler maintenance.

Roadmap

ESP8266_RTOS_SDK's framework is quite outdated and different from the current esp-idf and we are planning to migrate ESP8266_RTOS_SDK to esp-idf eventually after v2.0.0.

However, we will firstly provide a new version of ESP8266 SDK (ESP8266_RTOS_SDK v3.0), which shares the same framework with esp-idf (esp-idf style), as a work-around, because the multi-CPU architecture is not supported by esp-idf for the time being.

Actions to be taken for ESP8266_RTOS_SDK v3.0 include the following items:

  1. Modify the framework to esp-idf style
  2. Restructure some core libraries including Wi-Fi libraries and libmain
  3. Update some third-party libraries including FreeRTOS, lwIP, mbedTLS, noPoll, libcoap, SPIFFS, cJSON, wolfSSL, etc.
  4. Update some drivers
  5. Others

Developing With the ESP8266_RTOS_SDK

Get toolchain

v8.4.0

If you are still using old version SDK(< 3.0), please use toolchain v4.8.5, as following:

Get ESP8266_RTOS_SDK

Besides the toolchain (that contains programs to compile and build the application), you also need ESP8266 specific API / libraries. They are provided by Espressif in ESP8266_RTOS_SDK repository. To get it, open terminal, navigate to the directory you want to put ESP8266_RTOS_SDK, and clone it using git clone command:

cd ~/esp
git clone https://github.com/espressif/ESP8266_RTOS_SDK.git

ESP8266_RTOS_SDK will be downloaded into ~/esp/ESP8266_RTOS_SDK.

Setup Path to ESP8266_RTOS_SDK

The toolchain programs access ESP8266_RTOS_SDK 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.

For manually, the command:

export IDF_PATH=~/esp/ESP8266_RTOS_SDK

Start a Project

Now you are ready to prepare your application for ESP8266. To start off quickly, we can use examples/get-started/hello_world project from examples directory in SDK.

Once you've found the project you want to work with, change to its directory and you can configure and build it.

Connect

You are almost there. To be able to proceed further, connect ESP8266 board to PC, check under what serial port the board is visible and verify if serial communication works. Note the port number, as it will be required in the next step.

Configuring the Project

Being in terminal window, go to directory of hello_world application by typing cd ~/esp/ESP8266_RTOS_SDK/examples/get-started/hello_world. Then start project configuration utility menuconfig:

cd ~/esp/ESP8266_RTOS_SDK/examples/get-started/hello_world
make menuconfig

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.

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.

Once done configuring, press Escape multiple times to exit and say "Yes" to save the new configuration when prompted.

Compiling the Project

make all

... will compile app based on the config.

Flashing the Project

When make all finishes, it will print a command line to use esptool.py to flash the chip. However you can also do this from make by running:

make flash

This will flash the entire project (app, bootloader and init data bin) to a new chip. The settings for serial port flashing can be configured with make menuconfig.

You don't need to run make all before running make flash, make flash will automatically rebuild anything which needs it.

Viewing Serial Output

The make monitor target uses the idf_monitor tool to display serial output from the ESP32. idf_monitor also has a range of features to decode crash output and interact with the device. Check the documentation page for details.

Exit the monitor by typing Ctrl-].

To flash and monitor output in one pass, you can run:

make flash monitor

Compiling & Flashing Just the App

After the initial flash, you may just want to build and flash just your app, not the bootloader and init data bin:

  • make app - build just the app.
  • make app-flash - flash just the app.

make app-flash will automatically rebuild the app if it needs it.

(In normal development there's no downside to reflashing the bootloader and init data bin each time, if they haven't changed.)

Note: Recommend to use these 2 commands if you have flashed bootloader and init data bin.

Parallel Builds

ESP8266_RTOS_SDK supports compiling multiple files in parallel, so all of the above commands can be run as make -jN where N is the number of parallel make processes to run (generally N should be equal to or one more than the number of CPU cores in your system.)

Multiple make functions can be combined into one. For example: to build the app & bootloader using 5 jobs in parallel, then flash everything, and then display serial output from the ESP32 run:

make -j5 app-flash monitor

Erasing Flash

The make flash target does not erase the entire flash contents. However it is sometimes useful to set the device back to a totally erased state. To erase the entire flash, run make erase_flash.

This can be combined with other targets, ie make erase_flash flash will erase everything and then re-flash the new app, bootloader and init data bin.

Updating ESP8266_RTOS_SDK

After some time of using ESP8266_RTOS_SDK-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 ESP8266_RTOS_SDK folder and cloning it again.

Another solution is to update only what has changed. This method is useful if you have a slow connection to GitHub. To do the update run the following commands::

cd ~/esp/ESP8266_RTOS_SDK
git pull

The git pull command is fetching and merging changes from ESP8266_RTOS_SDK repository on GitHub.

More Repositories

1

esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
C
12,517
star
2

arduino-esp32

Arduino core for the ESP32
C++
12,308
star
3

esptool

Espressif SoC serial bootloader utility
Python
5,311
star
4

esp-iot-solution

Espressif IoT Library. IoT Device Drivers, Documentations And Solutions.
C
1,751
star
5

esp-who

Face detection and recognition framework
C
1,594
star
6

esp-adf

Espressif Audio Development Framework
C
1,395
star
7

esp32-camera

C
1,259
star
8

vscode-esp-idf-extension

Visual Studio Code extension for ESP-IDF projects
TypeScript
944
star
9

ESP8266_NONOS_SDK

ESP8266 nonOS SDK
C
911
star
10

esp-at

AT application for ESP32/ESP32-C2/ESP32-C3/ESP32-C6/ESP8266
C
769
star
11

esp-mdf

Espressif Mesh Development Framework, limited maintain, recommend to use https://github.com/espressif/esp-mesh-lite
C
757
star
12

ESP8266_MP3_DECODER

A demo that should be run with ESP8266 Non-OS SDK
C
739
star
13

esp-drone

Mini Drone/Quadcopter Firmware for ESP32 and ESP32-S Series SoCs.
C
658
star
14

esp-box

The ESP-BOX is a new generation AIoT development platform released by Espressif Systems.
HTML
612
star
15

esp-apple-homekit-adk

This is a port for Apple's Open Source HomeKit ADK
C
598
star
16

esp-csi

Applications based on Wi-Fi CSI (Channel state information), such as indoor positioning, human detection
C
592
star
17

kicad-libraries

KiCad libraries for Espressif chips and modules
Python
580
star
18

esp-mqtt

ESP32 mqtt component
C
577
star
19

esp-matter

Espressif's SDK for Matter
C++
546
star
20

esp-hosted

Hosted Solution (Linux/MCU) with ESP32 (Wi-Fi + BT + BLE)
C
539
star
21

esp-homekit-sdk

C
518
star
22

esp-skainet

Espressif intelligent voice assistant
C
500
star
23

ESP8266_AT

This project is not maintained, please use https://github.com/espressif/esp-at.
C
472
star
24

esp32-nesemu

Proof-of-concept NES emulator for the ESP32
C
471
star
25

esp-sr

Speech recognition
C
462
star
26

rust-esp32-example

Example of Rust integration into an ESP-IDF project, for ESP32 series of chips
Rust
421
star
27

esp-rainmaker

ESP RainMaker Agent for firmware development
C
415
star
28

esp-now

A connectionless Wi-Fi communication protocol
C
402
star
29

esp-dsp

DSP library for ESP-IDF
C
401
star
30

esp-dl

Espressif deep-learning library for AIoT applications
C++
369
star
31

openocd-esp32

OpenOCD branch with ESP32 JTAG support
C
334
star
32

esp-aliyun

Aliyun Iotkit-embedded, support esp32 & esp8266.
C
333
star
33

esp-idf-template

Template application for https://github.com/espressif/esp-idf
Makefile
323
star
34

esp-serial-flasher

Library for flashing Espressif SoCs from other MCUs.
C++
321
star
35

idf-eclipse-plugin

Espressif-IDE (based on Eclipse CDT) for ESP-IDF CMake based projects 4.x and above
Java
289
star
36

esp-dev-kits

Docs, Schematics, Factory Firmwares for ESP Development Kits
C
287
star
37

esp-va-sdk

Espressif's Voice Assistant SDK: Alexa, Google Voice Assistant, Google DialogFlow
C
273
star
38

esp-tflite-micro

TensorFlow Lite Micro for Espressif Chipsets
C++
271
star
39

esp-usb-bridge

USB to UART&JTAG bridge, implemented on ESP32-S2 or ESP32-S3
C
271
star
40

esp-aws-iot

AWS IoT SDK for ESP32 based chipsets
C
247
star
41

esptool-js

Javascript implementation of flasher tool for Espressif chips, running in web browser using WebSerial.
TypeScript
241
star
42

ESP31_RTOS_SDK

ESP31B SDK based on FreeRTOS. For ESP32 please see http://github.com/espressif/esp-idf
HTML
189
star
43

esp-idf-provisioning-android

Android Provisioning application for ESP-IDF Unified provisioning
Java
184
star
44

esp-azure

SDK to connect ESP8266 and ESP32 to Microsoft Azure IoT services
C
174
star
45

esp-jumpstart

Jumpstart from concept to production
C
167
star
46

esp-gdbstub

C
157
star
47

esp-protocols

Collection of ESP-IDF components related to networking protocols
C
156
star
48

esp32-wifi-lib

ESP32 WiFi stack precompiled libraries
Shell
153
star
49

esp32-doom

A proof-of-concept port of PrBoom to the ESP32. Needs psram hardware.
C++
151
star
50

esp-google-iot

Google Cloud IoT SDK as an ESP-IDF Component
C
144
star
51

esp-bsp

Board support components for Espressif development boards
C
141
star
52

esp8266-rtos-sample-code

C
131
star
53

esp-iot-bridge

A smart bridge to make both ESP and the other MCU or smart device can access the Internet.
C
129
star
54

esp-idf-provisioning-ios

Swift
125
star
55

idf-extra-components

Additional components for ESP-IDF, maintained by Espressif
C
122
star
56

esp32-arduino-lib-builder

C
120
star
57

esp-nn

Optimised Neural Network functions for Espressif chipsets
Assembly
103
star
58

esp-zigbee-sdk

Espressif Zigbee SDK
C
99
star
59

idf-installer

ESP IDF Windows Installer
Inno Setup
92
star
60

esp-insights

ESP Insights: A remote diagnostics/observability framework for connected devices
C
91
star
61

esp-rainmaker-android

ESP RainMaker Android app sources
Java
85
star
62

esp-thread-br

Espressif Thread Border Router SDK
C
82
star
63

esp-mesh-lite

A lite version Wi-Fi Mesh, each node can access the network over the IP layer.
C
79
star
64

book-esp32c3-iot-projects

《ESP32-C3 物联网工程开发实战》配套代码
Swift
77
star
65

esp-lwip

Fork of lwIP (https://savannah.nongnu.org/projects/lwip/) with ESP-IDF specific patches
C
77
star
66

esp-ali-smartliving

阿里云生活物联网平台 & 天猫精灵 IoT 开放平台
C
75
star
67

usb-pids

Customer-allocated USB PIDs under the Espressif VID
Shell
75
star
68

pytest-embedded

A pytest plugin that designed for embedded testing
Python
74
star
69

esp32-bt-lib

ESP32 Bluetooth stack (below HCI layer) precompiled libraries
67
star
70

esp-modbus

ESP-Modbus - the officially suppported library for Modbus protocol (serial RS485 + TCP over WiFi or Ethernet).
C
67
star
71

esp8266-nonos-sample-code

C
65
star
72

esp-qcloud

基于 ESP-IDF 原生开发接入腾讯 IoT Explorer,支持 ESP32/ESP32S2,快速实现腾讯连连控制。
C
65
star
73

esp32c3-direct-boot-example

Example of ESP32-C3 (rev. 3 and later) "direct boot" feature.
CMake
64
star
74

esp-idf-cxx

C++ wrapper classes for ESP-IDF components.
C++
63
star
75

esp-wasmachine

The Machine which can run WASM applications.
C
50
star
76

freertos-gdb

Python module for operating with freeRTOS kernel objects in GDB
Python
48
star
77

svd

SVD files for Espressif devices
47
star
78

binutils-esp32ulp

Binutils fork with support for the ESP32 ULP co-processor
C
46
star
79

esp-moonlight

C
44
star
80

xtensa-isa-doc

TeX
42
star
81

esp-privilege-separation

Espressif Privilege Separation Framework
C
41
star
82

esp-rainmaker-ios

ESP RainMaker iOS app sources
Swift
41
star
83

openocd-on-esp32

OpenOCD port running on ESP32-S3 microcontrollers
C
40
star
84

esp-adf-libs

C
38
star
85

idf-component-manager

Tool for installing ESP-IDF components
Python
37
star
86

ESP8266_RTOS_ALINK_DEMO

Alink 1.0 早期版本
Assembly
36
star
87

esp-wolfssl

WolfSSL port for ESP-IDF & ESP8266_RTOS_SDK
C
35
star
88

esp-joylink

Demo project for JD joylink, support esp32 & esp8266.
C
34
star
89

esp31-smsemu

C
34
star
90

esp8266-alink-v1.0

alink v1.0
C
32
star
91

esp-faq

Python
31
star
92

esp-launchpad

Configurable Browser-based Image Flasher
CSS
31
star
93

esp32-alink-demo

Demo project for alink, include embed and SDS
C
30
star
94

esp32-iotivity

Guide you to make your ESP32 support OCF/OIC.
C
29
star
95

newlib-esp32

Version of newlib used in ESP32 ROM and ESP-IDF
C
29
star
96

esp8266-alink-sds

Demo project for alink SDS
C
27
star
97

esp-wdf

Espressif WASM Development Framework.
C
27
star
98

idf-env

idf-env tool helps set up and manage ESP-IDF installations
Rust
25
star
99

esp-cryptoauthlib

Release only fork of https://github.com/MicrochipTech/cryptoauthlib
C
23
star
100

esp-wireless-drivers-3rdparty

Wi-Fi and BT drivers packaged for integration into 3rd party repositories. Work in progress.
C
22
star