Skip to content
Henry m edited this page Jul 17, 2024 · 1 revision

Rust ESP32

Introduction

References

Installation

  • . ~/export-esp.sh
  • cargo espflash board-info
  • cargo espflash flash
  • cargo espflash monitor
  • ctrl-r
    • restarts the board

remember to export these two variables, so env inside the code . can pick them up

RUST_ESP32_STD_DEMO_WIFI_PASS= RUST_ESP32_STD_DEMO_WIFI_SSID=

examples

WIFI_SSID WIFI_PASS MCU=esp32c3 cargo espflash flash --target riscv32imc-esp-espidf --example wifi --monitor

wifi does not connect

Error: espflash::image_too_big

cargo espflash flash --partition-table partitions.csv

# Name,   Type, SubType, Offset,  Size, Flags
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
nvs,      data, nvs,     ,        0x6000,
phy_init, data, phy,     ,        0x1000,
factory,  app,  factory, ,        3M,
Chip type:         esp32c3 (revision v0.4)
Crystal frequency: 40 MHz
Flash size:        4MB
Features:          WiFi, BLE
MAC address:       dc:da:0c:dd:9b:8c
Bootloader:        /home/hck/Dropbox/Sources/esp32/GettingStarted/esp32-video/target/riscv32imc-esp-espidf/debug/build/esp-idf-sys-9ae8e50fa251c371/out/build/bootloader/bootloader.bin
Partition table:   /home/hck/Dropbox/Sources/esp32/GettingStarted/esp32-video/target/riscv32imc-esp-espidf/debug/build/esp-idf-sys-9ae8e50fa251c371/out/build/partition_table/partition-table.bin
Error: espflash::image_too_big (link)

  × Supplied ELF image of 1213104B is too big, and doesn't fit configured app partition of 1048576B
  help: Reduce the size of the binary or increase the size of the app partition.

core not exsiting

WIFI not connecting