espressif - modrpc/info GitHub Wiki
Table of Contents |
Overview
Documentation
- ESP Documentation: http://espressif.com/en/support/download/documents
Software
-
Mongoose OS: https://en.wikipedia.org/wiki/Mongoose_OS
- Website: https://mongoose-os.com
ESP Hardware
ESP8266
- Key features
- Tensilica Xtensa Diamond Standard 106 micro at 80Mhz (L106)
- 64KB instruction RAM, 96KB data RAM
- 1MB built-in flash (some has 4MB)
- Wiki: https://en.wikipedia.org/wiki/ESP8266
- community: http://www.esp8266.com
ESP32
- Overview: http://espressif.com/en/products/hardware/esp32/overview
- ESP32 Wiki: https://en.wikipedia.org/wiki/ESP32
- Key features:
- 240Mhz dual-core LX6 microcontroller w/ 600 DMIPS
- Wi-Fi/Bluetooth (both classic and BLE)
- IRAM: 16MB flash (memory-mapped to CPU code space)
- DRAM: 520KB SRAM
- esp32.net: http://esp32.net
Using ESP
Terminal
- Python terminal:
$ pip install pyserial
$ python -m serial.tools.list_ports -v
$ python -m serial.tools.miniterm /dev/ttyUSB0
Firmwares
nodemcu
- Lua-based shell
Micropython
- Micropython-based shell
- Getting started with MicroPython in ESP8266
- WEBREPL: http://micropython.org/webrepl/
ESP8266_NONOS_SDK
esptool.py
-
elf2image:
- esptool.py --chip esp8266 elf2image my_app.elf
- flash mode
- --flash_mode qio: quad flash I/O
- --dual_mode dio: dual flash I/O
- flash frequency: clock frequency for SPI flash interactions
- -flash_freq [keep|40m|26m|20m|80m]
-
write_flash: Writing binaries to flash
- esptool.py --port /dev/ttyUSB0 write_flash --flash_mode qio --flash_size 32m 0x0 bootloader.bin 0x1000 my_app.bin
- GPIO0를 GND로 해야 flash가 가능함 (two pins 쪽의 jumper setting -- NOT three-pins 쪽)
- Flash 한번 할 때마다 power off/on
- esptool.py --port /dev/ttyUSB0 write_flash --flash_mode qio --flash_size 32m 0x0 bootloader.bin 0x1000 my_app.bin
-
verify_flush:
- esptool.py verify_flash 0x40000 my_app.elf-0x40000.bin
- Manually assembling a firmware image
- esptool.py --chip esp8266 make_image -f app.text.bin -a 0x40100000 -f app.data.bin -a 0x3ffe8000 -f app.rodata.bin -a 0x3ffe8c00 app.flash.bin
-
flash_id:
- sudo esptool.py --port /dev/ttyUSB0 --baud 115200 flash_id
Chip is ESP8266
Uploading stub...
Running stub...
Stub running...
Manufacturer: c8
Device: 4014
Detected flash size: 1MB
ampy
- For loading/saving files to MicroPython
- https://learn.adafruit.com/micropython-basics-load-files-and-run-code/overview
troubleshooting
- 파란 LED가 깜빡이는 것은 UART rx/tx 가 일어나고 있다는 것
- 부트 후 계속 깜빡이면 74880 baud로 terminal 연결 (esp8266은 74880으로 boot log를 보냄)
ESP Software
ESP-SDK
- A bundle of utilities and device-level APIs for ESP8266/ESP32
- Precompiled libraries and ready-to-compile driver libraries
- NON-OS version or RTOS version
-
NON-OS SDK
- Non-OS SDK API reference
- Uses timers and callbacks as the main mthoeds for performing functionssuch as nested events and functions triggered by certain conditions.
- espconn interface: add callbacks for network events
-
RTOS SDK
- RTOS SDK API reference
- Based on FreeRTOS -- multi-tasking OS
- resource management
- recycling operations
- execution delays
- inter-task messaging and synchronization
- supports other task-oriented process design approaches
- For networking, users directly use socket interface (no callback) in lwIP API.
- cJSON library to make it easy to parse JSON packet
-
NON-OS SDK
SDK Libaries
- libairkiss.a:
- libat.a:
- libcrypto.a:
- libdriver.a:
- libwip.a, libwip_536.a:
- libmain.a:
- libmesh.a:
- libnet80211.a:
- libphy.a:
- libpp.a:
- libpwm.a:
- libsmartconfig.a:
- libssl.a:
- libupgrade.a:
- libupgrade.a:
- libwpa.a, libwpa2.a:
- libwps.a:
ESP-AT
- On top of ESP-SDK has AT processor (with a set of AT commands) to interact with ESP8266/ESP32
ESP-MESH
- Non-OS Mesh API reference
- ESP nodes can establish a network and forward packets. Allows a large number of nodes to connect to the internet without any change to router (typically routers have maximum limit of 32 nodes)

ESP-TOUCH
- Implements SmartConfig technology to help connect ESP8266EX-devices to WiFi network through simple configuration on a smartphone
ESP-NOW
- Allow devices to communicate without using Wi-Fi. Same 2.4GHz wireless connectivity often used in wireless mice.
- Pairing between devices needed prior to communication. After pairing is done, connection is persistent, peer-to-peer, no handshake required.
Espressif IoT APP
Other Software
NodeMCU
- nodemcu: http://www.esp8266.com/wiki/doku.php?id=nodemcu
- nodemcu unofficial FAQ
- API: http://www.nodemcu.com/docs/
- eLua