espressif - modrpc/info GitHub Wiki

basics
docs esp-documentation, esp32-toolchain-setup-for-linux, esp8266-on-linux
hardware
esp8299 wiki, sdk-reverse-engineering
  • tensilica xtensa diamond standard 106 micro at 80mhz (l106)
  • 64kb instruction ram, 96kb data ram
  • 1mb built-in flash (some has 4mb)
esp32 wiki, esp32.net, techref
  • 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
software/firmware/tools
circuitpython asyncio, essentials
micropython
nodemcu nodemc- unofficial-faq, api, eLua
sdk/other esp-at, esp-mesh, esp-touch, esp-now, espressif-iot-app, mongoose-os (web), risc-v-linux-on-esp32
tools tinyuf2, pyserial
boards/devkits
lilygo lilygo-t-display-s3 (setup, github), lilygo-micropython
banana-pi
  • bpi-leaf-s3 (use "--baud 460800")
  • wiki
  • micropython installation (bin file)
    • set firmware download mode:
      • disconnect the board; press boot-button; connect the board w/ USB; unpressw boot-button
    • erase flash
      • sudo micropython -m esptool --chip esp32s3 --port /dev/ttypACM0 --baud 460800 erase_flash
    • download micropython
      • sudo micropython -m esptool --chip esp32s3 --port /dev/ttypACM0 --baud 460800 --before=usb_reset --after=no_reset write_flash 0x0 ESP32_GENERIC_S3-20231005-v1.21.0.bin
    • press reset button
wemos
lilygo t7-s3

Table of Contents

howto

 $ pip install pyserial

 $ python -m serial.tools.list_ports -v

   /dev/ttyACM0        
     desc: Espressif Device - Espressif CDC Device
     hwid: USB VID:PID=303A:4001 SER=123456 LOCATION=3-1:1.0

 $ python -m serial.tools.miniterm /dev/ttyUSB0  

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
  • 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

esptool.js

troubleshooting

  • 파란 LED가 깜빡이는 것은 UART rx/tx 가 일어나고 있다는 것
    • 부트 후 계속 깜빡이면 74880 baud로 terminal 연결 (esp8266은 74880으로 boot log를 보냄)
⚠️ **GitHub.com Fallback** ⚠️