ESP32-C3-DevKitC-02
The ESP32-C3-DevKitC-02 is an entry-level development board.
- SoC: ESP32-C3-WROOM-02
- RGB LED
- micro USB
pinout
left side - J1
- 1 GND
- 2 3V3
- 3 3V3
- 4 RST
- 5 GND
- 6 GPIO4
- 7 GPIO5
- 8 GPIO6
- 9 GPIO7
- 10 GND
- 11 GPIO8, RGB_LED
- 12 GPIO9
- 13 5V
- 14 5V
- 15 GND
right side - J3
- 1 GND
- 2 GPIO0
- 3 GPIO1
- 4 GPIO2
- 5 GPIO3
- 6 GND
- 7 GPIO10
- 8 GND
- 9 GPIO20 U0RXD
- 10 GPIO21 U0TXD
- 11 GND * 12 GPIO18 USB_D-
- 13 GPIO19 USB_D+ * 14 GND
- 15 GND
back to microcontrollers page.
Links
Espressif Systems ESP32-C3-DevKitC-02 User Guide,
crates.io mandown lib.rs mandown,
local links
History
2025-01-28: testing the wifi_dhcp example from the esp-wifi crate
tingo@kg-core2:~/personal/projects/2025/rust/embedded/riscv/ESP32-C3-DevKitC-02/esp32c3_wifi_test $ env SSID=mySSID PASSWORD=myPASSWD cargo run --example wifi_dhcp Compiling esp-hal v0.23.1 Compiling esp-wifi v0.12.0 Compiling esp32c3_wifi_test v0.1.0 (/zs/tingo/personal/projects/2025/rust/embedded/riscv/ESP32-C3-DevKitC-02/esp32c3_wifi_test) Finished `dev` profile [optimized + debuginfo] target(s) in 5.30s Running `espflash flash --list-all-ports --monitor target/riscv32imc-unknown-none-elf/debug/examples/wifi_dhcp` [2025-01-28T18:40:22Z INFO ] Detected 2 serial ports [2025-01-28T18:40:22Z INFO ] Ports which match a known common dev board are highlighted [2025-01-28T18:40:22Z INFO ] Please select a port [2025-01-28T18:40:25Z INFO ] Serial port: '/dev/cuaU0' [2025-01-28T18:40:25Z INFO ] Connecting... [2025-01-28T18:40:26Z INFO ] Using flash stub Chip type: esp32c3 (revision v0.3) Crystal frequency: 40 MHz Flash size: 4MB Features: WiFi, BLE MAC address: 58:cf:79:05:5c:e8 App/part. size: 678,032/4,128,768 bytes, 16.42% [00:00:01] [========================================] 13/13 0x0 [2025-01-28T18:40:29Z INFO ] Segment at address '0x8000' has not changed, skipping write [00:00:38] [========================================] 377/377 0x10000 [2025-01-28T18:41:09Z INFO ] Flashing has completed! Commands: CTRL+R Reset chip CTRL+C Exit ESP-ROM:esp32c3-api1-20210207 Build:Feb 7 2021 rst:0x1 (POWERON),boot:0xc (SPI_FAST_FLASH_BOOT) SPIWP:0xee mode:DIO, clock div:2 load:0x3fcd5820,len:0x1714 load:0x403cc710,len:0x968 load:0x403ce710,len:0x2f9c entry 0x403cc710 I (32) boot: ESP-IDF v5.1.2-342-gbcf1645e44 2nd stage bootloader I (32) boot: compile time Dec 12 2023 10:50:58 I (32) boot: chip revision: v0.3 I (36) boot.esp32c3: SPI Speed : 40MHz I (41) boot.esp32c3: SPI Mode : DIO I (46) boot.esp32c3: SPI Flash Size : 4MB I (50) boot: Enabling RNG early entropy source... I (56) boot: Partition Table: I (59) boot: ## Label Usage Type ST Offset Length I (67) boot: 0 nvs WiFi data 01 02 00009000 00006000 I (74) boot: 1 phy_init RF data 01 01 0000f000 00001000 I (81) boot: 2 factory factory app 00 00 00010000 003f0000 I (89) boot: End of partition table I (93) esp_image: segment 0: paddr=00010020 vaddr=3c090020 size=1dcbch (122044) map I (129) esp_image: segment 1: paddr=0002dce4 vaddr=3fc87850 size=01268h ( 4712) load I (130) esp_image: segment 2: paddr=0002ef54 vaddr=3fc9dd28 size=001ech ( 492) load I (135) esp_image: segment 3: paddr=0002f148 vaddr=40380000 size=00ed0h ( 3792) load I (144) esp_image: segment 4: paddr=00030020 vaddr=42000020 size=7eebch (519868) map I (267) esp_image: segment 5: paddr=000aeee4 vaddr=40380ed0 size=0697ch ( 27004) load I (276) boot: Loaded app from partition at offset 0x10000 I (276) boot: Disabling RNG early entropy source... INFO - esp-wifi configuration EspWifiConfig { rx_queue_size: 5, tx_queue_size: 3, static_rx_buf_num: 10, dynamic_rx_buf_num: 32, static_tx_buf_num: 0, dynamic_tx_buf_num: 32, ampdu_rx_enable: true, ampdu_tx_enable: true, amsdu_tx_enable: false, rx_ba_win: 6, max_burst_size: 1, country_code: "CN", country_code_operating_class: 0, mtu: 1492, tick_rate_hz: 100, listen_interval: 3, beacon_timeout: 6, ap_beacon_timeout: 300, failure_retry_cnt: 1, scan_method: 0 } wifi_set_configuration returned Ok(()) is wifi started: Ok(true) Start Wifi Scan AccessPointInfo { ssid: "kg5", bssid: [224, 203, 78, 134, 129, 11], channel: 7, secondary_channel: Below, signal_strength: -56, protocols: EnumSet(), auth_method: Some(WPA2Personal) } AccessPointInfo { ssid: "Home_Net-004159", bssid: [120, 197, 125, 254, 199, 131], channel: 11, secondary_channel: None, signal_strength: -63, protocols: EnumSet(), auth_method: Some(WPA2Personal) } AccessPointInfo { ssid: "Home_Net-004422", bssid: [120, 197, 125, 254, 202, 152], channel: 1, secondary_channel: None, signal_strength: -67, protocols: EnumSet(), auth_method: Some(WPA2Personal) } AccessPointInfo { ssid: "AirTies_Air4920_73VK 2.4ghz", bssid: [244, 23, 184, 53, 231, 250], channel: 11, secondary_channel: None, signal_strength: -70, protocols: EnumSet(), auth_method: Some(WPA2Personal) } AccessPointInfo { ssid: "Familiestue.b,", bssid: [250, 143, 202, 56, 34, 8], channel: 6, secondary_channel: None, signal_strength: -73, protocols: EnumSet(), auth_method: Some(None) } AccessPointInfo { ssid: "Home_Net-003965", bssid: [120, 197, 125, 254, 197, 61], channel: 11, secondary_channel: None, signal_strength: -74, protocols: EnumSet(), auth_method: Some(WPA2Personal) } AccessPointInfo { ssid: "Pinell 10130:58:90:ec:b2:36", bssid: [48, 88, 144, 236, 178, 54], channel: 1, secondary_channel: None, signal_strength: -76, protocols: EnumSet(), auth_method: Some(None) } Ok(EnumSet(Client)) wifi_connect Ok(()) Wait to get connected Ok(true) Wait to get an ip address got ip Ok(IpInfo { ip: 10.1.161.29, subnet: Subnet { gateway: 10.1.10.1, mask: Mask(16) }, dns: Some(10.1.10.1), secondary_dns: None }) Start busy loop on main Making HTTP request HTTP/1.0 200 OK X-Cloud-Trace-Context: 405abdc206c045df94792db4bac25224 Server: Google Frontend Content-Length: 335 Date: Tue, 28 Jan 2025 18:38:02 GMT Expires: Tue, 28 Jan 2025 18:48:02 GMT Cache-Control: public, max-age=600 Age: 202 ETag: "uJJDjQ" Content-Type: text/html <!DOCTYPE html> <html> <head> <title>Nothing here</title> </head> <body> <pre> __________________________ < Hello fellow Rustaceans! > -------------------------- \ \ _~^~^~_ \) / o o \ (/ '_ - _' / '-----' \ </pre> </body> </html>
2025-01-26: try the hello_rgb example from the esp-hal-smartled crate:
tingo@kg-core2:~/personal/projects/2025/rust/embedded/riscv/ESP32-C3-DevKitC-02/test_project $ cargo run --example hello_rgb --release Finished `release` profile [optimized + debuginfo] target(s) in 0.03s Running `espflash flash --monitor target/riscv32imc-unknown-none-elf/release/examples/hello_rgb` [2025-01-26T18:43:29Z INFO ] 🚀 A new version of espflash is available: v3.3.0 [2025-01-26T18:43:29Z INFO ] Detected 2 serial ports [2025-01-26T18:43:29Z INFO ] Ports which match a known common dev board are highlighted [2025-01-26T18:43:29Z INFO ] Please select a port [2025-01-26T18:43:31Z INFO ] Serial port: '/dev/cuaU0' [2025-01-26T18:43:31Z INFO ] Connecting... [2025-01-26T18:43:33Z INFO ] Unable to connect, retrying with extra delay... [2025-01-26T18:43:33Z INFO ] Using flash stub Chip type: esp32c3 (revision v0.3) Crystal frequency: 40MHz Flash size: 4MB Features: WiFi, BLE MAC address: 58:cf:79:05:5c:e8 App/part. size: 78,768/4,128,768 bytes, 1.91% [00:00:01] [========================================] 13/13 0x0 [00:00:00] [========================================] 1/1 0x8000 [00:00:01] [========================================] 14/14 0x10000 [2025-01-26T18:43:37Z INFO ] Flashing has completed! Commands: CTRL+R Reset chip CTRL+C Exit ESP-ROM:esp32c3-api1-20210207 Build:Feb 7 2021 rst:0x1 (POWERON),boot:0xc (SPI_FAST_FLASH_BOOT) SPIWP:0xee mode:DIO, clock div:2 load:0x3fcd5820,len:0x171c 0x3fcd5820 - _stack_start at ??:?? load:0x403cc710,len:0x968 0x403cc710 - $d at ??:?? load:0x403ce710,len:0x2f68 0x403ce710 - $d at ??:?? SHA-256 comparison failed: Calculated: 1d06b938c0222bf626e0bdf46178b1b37ab24d03f0360fc8fcf7153c2571deaf Expected: 68d7bdf643ba446b8ed7ae8423241d442fd052b2bc77091100ba06fd65dcf8d5 Attempting to boot anyway... entry 0x403cc710 0x403cc710 - $d at ??:?? I (50) boot: ESP-IDF v5.1-beta1-378-gea5e0ff298-dirt 2nd stage bootloader I (50) boot: compile time Jun 7 2023 07:59:10 I (51) boot: chip revision: v0.3 I (55) boot.esp32c3: SPI Speed : 40MHz I (60) boot.esp32c3: SPI Mode : DIO I (65) boot.esp32c3: SPI Flash Size : 4MB I (69) boot: Enabling RNG early entropy source... I (75) boot: Partition Table: I (78) boot: ## Label Usage Type ST Offset Length I (86) boot: 0 nvs WiFi data 01 02 00009000 00006000 I (93) boot: 1 phy_init RF data 01 01 0000f000 00001000 I (101) boot: 2 factory factory app 00 00 00010000 003f0000 I (108) boot: End of partition table I (112) esp_image: segment 0: paddr=00010020 vaddr=3c010020 size=01290h ( 4752) map I (122) esp_image: segment 1: paddr=000112b8 vaddr=3fc80888 size=003c0h ( 960) load I (130) esp_image: segment 2: paddr=00011680 vaddr=40380000 size=00888h ( 2184) load I (138) esp_image: segment 3: paddr=00011f10 vaddr=00000000 size=0e108h ( 57608) I (159) esp_image: segment 4: paddr=00020020 vaddr=42000020 size=03360h ( 13152) map I (162) boot: Loaded app from partition at offset 0x10000 I (162) boot: Disabling RNG early entropy source...
yes, this too works.
2025-01-26: c2 - try the example
tingo@kg-core2:~/personal/projects/2025/rust/embedded/riscv/ESP32-C3-DevKitC-02/test_project $ cargo run Finished `dev` profile [optimized + debuginfo] target(s) in 0.03s Running `espflash flash --monitor target/riscv32imc-unknown-none-elf/debug/test_project` [2025-01-26T18:07:24Z INFO ] 🚀 A new version of espflash is available: v3.3.0 [2025-01-26T18:07:24Z INFO ] Detected 2 serial ports [2025-01-26T18:07:24Z INFO ] Ports which match a known common dev board are highlighted [2025-01-26T18:07:24Z INFO ] Please select a port [2025-01-26T18:07:26Z INFO ] Serial port: '/dev/cuaU0' [2025-01-26T18:07:26Z INFO ] Connecting... [2025-01-26T18:07:28Z INFO ] Unable to connect, retrying with extra delay... [2025-01-26T18:07:28Z INFO ] Using flash stub Chip type: esp32c3 (revision v0.3) Crystal frequency: 40MHz Flash size: 4MB Features: WiFi, BLE MAC address: 58:cf:79:05:5c:e8 App/part. size: 84,176/4,128,768 bytes, 2.04% [00:00:01] [========================================] 13/13 0x0 [00:00:00] [========================================] 1/1 0x8000 [00:00:02] [========================================] 17/17 0x10000 [2025-01-26T18:07:33Z INFO ] Flashing has completed! Commands: CTRL+R Reset chip CTRL+C Exit ESP-ROM:esp32c3-api1-20210207 Build:Feb 7 2021 rst:0x1 (POWERON),boot:0xc (SPI_FAST_FLASH_BOOT) SPIWP:0xee mode:DIO, clock div:2 load:0x3fcd5820,len:0x171c 0x3fcd5820 - _stack_start at ??:?? load:0x403cc710,len:0x968 0x403cc710 - __EXTERNAL_INTERRUPTS at ??:?? load:0x403ce710,len:0x2f68 0x403ce710 - __EXTERNAL_INTERRUPTS at ??:?? SHA-256 comparison failed: Calculated: 1d06b938c0222bf626e0bdf46178b1b37ab24d03f0360fc8fcf7153c2571deaf Expected: 68d7bdf643ba446b8ed7ae8423241d442fd052b2bc77091100ba06fd65dcf8d5 Attempting to boot anyway... entry 0x403cc710 0x403cc710 - __EXTERNAL_INTERRUPTS at ??:?? I (50) boot: ESP-IDF v5.1-beta1-378-gea5e0ff298-dirt 2nd stage bootloader I (50) boot: compile time Jun 7 2023 07:59:10 I (51) boot: chip revision: v0.3 I (55) boot.esp32c3: SPI Speed : 40MHz I (60) boot.esp32c3: SPI Mode : DIO I (65) boot.esp32c3: SPI Flash Size : 4MB I (69) boot: Enabling RNG early entropy source... I (75) boot: Partition Table: I (78) boot: ## Label Usage Type ST Offset Length I (86) boot: 0 nvs WiFi data 01 02 00009000 00006000 I (93) boot: 1 phy_init RF data 01 01 0000f000 00001000 I (101) boot: 2 factory factory app 00 00 00010000 003f0000 I (108) boot: End of partition table I (112) esp_image: segment 0: paddr=00010020 vaddr=3c010020 size=0205ch ( 8284) map I (123) esp_image: segment 1: paddr=00012084 vaddr=3fc80904 size=00110h ( 272) load I (129) esp_image: segment 2: paddr=0001219c vaddr=40380000 size=00904h ( 2308) load I (138) esp_image: segment 3: paddr=00012aa8 vaddr=00000000 size=0d570h ( 54640) I (158) esp_image: segment 4: paddr=00020020 vaddr=42000020 size=0488ch ( 18572) map I (162) boot: Loaded app from partition at offset 0x10000 I (163) boot: Disabling RNG early entropy source... INFO - Hello world! INFO - Hello world! INFO - Hello world! INFO - Hello world! INFO - Hello world! INFO - Hello world! INFO - Hello world! INFO - Hello world! INFO - Hello world!
yes, it works.
2025-01-26: c2 - esp-generate options
tingo@kg-core2:~/personal/projects/2025/rust/embedded/riscv/ESP32-C3-DevKitC-02 $ esp-generate --help Template generation tool to create no_std applications targeting Espressif's chips Usage: esp-generate [OPTIONS] --chip <CHIP> <NAME> Arguments: <NAME> Name of the project to generate Options: -c, --chip <CHIP> Chip to target Possible values: - esp32: ESP32 - esp32c2: ESP32-C2, ESP8684 - esp32c3: ESP32-C3, ESP8685 - esp32c6: ESP32-C6 - esp32h2: ESP32-H2 - esp32s2: ESP32-S2 - esp32s3: ESP32-S3 --headless Run in headless mode (i.e. do not use the TUI) -o, --option <OPTION> Generation options: alloc, wifi, ble, embassy, probe-rs, wokwi, dev-container, ci, helix, vscode - For more information regarding the different options check the esp-generate README.md (https://github.com/esp-rs/esp-generate/blob/main/README.md). -O, --output-path <OUTPUT_PATH> Directory in which to generate the project -h, --help Print help (see a summary with '-h') -V, --version Print version
try it
tingo@kg-core2:~/personal/projects/2025/rust/embedded/riscv/ESP32-C3-DevKitC-02 $ esp-generate -c esp32c3 test_project tingo@kg-core2:~/personal/projects/2025/rust/embedded/riscv/ESP32-C3-DevKitC-02 $ l ./ ../ test_project/
(I just pressed 's' to accept default options) it seems to have worked.
2025-01-26: c2 - cargo espflash - check with updated version
tingo@kg-core2:~/personal/projects/2025/rust/embedded/riscv/ESP32-C3-DevKitC-02 $ cargo espflash board-info -p /dev/cuaU0 [2025-01-26T17:52:02Z INFO ] Serial port: '/dev/cuaU0' [2025-01-26T17:52:02Z INFO ] Connecting... [2025-01-26T17:52:03Z INFO ] Using flash stub Chip type: esp32c3 (revision v0.3) Crystal frequency: 40 MHz Flash size: 4MB Features: WiFi, BLE MAC address: 58:cf:79:05:5c:e8
try the other way
tingo@kg-core2:~/personal/projects/2025/rust/embedded/riscv/ESP32-C3-DevKitC-02 $ cargo espflash board-info Error: espflash::no_serial × No serial ports could be detected help: Make sure you have connected a device to the host system. If the device is connected but not listed, try using the `--list-all- ports` flag.
good to know.
tingo@kg-core2:~/personal/projects/2025/rust/embedded/riscv/ESP32-C3-DevKitC-02 $ cargo espflash board-info --list-all-ports [2025-01-26T17:54:16Z INFO ] Detected 2 serial ports [2025-01-26T17:54:16Z INFO ] Ports which match a known common dev board are highlighted [2025-01-26T17:54:16Z INFO ] Please select a port [2025-01-26T17:54:19Z INFO ] Serial port: '/dev/cuaU0' [2025-01-26T17:54:19Z INFO ] Connecting... [2025-01-26T17:54:20Z INFO ] Using flash stub Chip type: esp32c3 (revision v0.3) Crystal frequency: 40 MHz Flash size: 4MB Features: WiFi, BLE MAC address: 58:cf:79:05:5c:e8
2025-01-26: c2 - cargo - can I install to get the newest version?
tingo@kg-core2:~/personal/projects/2025/rust/embedded/riscv/ESP32-C3-DevKitC-02 $ cargo install cargo-espflash Updating crates.io index Downloaded cargo-espflash v3.3.0 Downloaded 1 crate (48.7 KB) in 0.11s Installing cargo-espflash v3.3.0 Updating crates.io index Locking 506 packages to latest compatible versions [..] Compiling cargo-espflash v3.3.0 Finished `release` profile [optimized] target(s) in 3m 09s Replacing /home/tingo/.cargo/bin/cargo-espflash Replaced package `cargo-espflash v2.1.0` with `cargo-espflash v3.3.0` (executable `cargo-espflash`)
2025-01-26: c2 - cargo - check for installed programs
tingo@kg-core2:~/personal/projects/2025/rust/embedded/riscv/ESP32-C3-DevKitC-02 $ cargo install --list aoc-cli v0.12.0: aoc cargo-binutils v0.3.6: cargo-cov cargo-nm cargo-objcopy cargo-objdump cargo-profdata cargo-readobj cargo-size cargo-strip rust-ar rust-cov rust-ld rust-lld rust-nm rust-objcopy rust-objdump rust-profdata rust-readobj rust-size rust-strip cargo-espflash v2.1.0: cargo-espflash cargo-generate v0.19.0: cargo-generate esp-generate v0.2.1: esp-generate espflash v2.1.0: espflash flip-link v0.1.7: flip-link probe-rs v0.22.0: cargo-embed cargo-flash probe-rs probe-run v0.3.10: probe-run rustlings v5.3.0 (/zs/tingo/personal/projects/2022/rust/rustlings): rustlings tenere v0.9.0: tenere
2025-01-26: c2 - espflash - check for board
tingo@kg-core2:~/personal/projects/2025/rust/embedded/riscv/ESP32-C3-DevKitC-02 $ espflash board-info -p /dev/cuaU0 [2025-01-26T17:40:44Z INFO ] 🚀 A new version of espflash is available: v3.3.0 [2025-01-26T17:40:44Z INFO ] Serial port: '/dev/cuaU0' [2025-01-26T17:40:44Z INFO ] Connecting... [2025-01-26T17:40:46Z INFO ] Unable to connect, retrying with extra delay... [2025-01-26T17:40:46Z INFO ] Using flash stub Chip type: esp32c3 (revision v0.3) Crystal frequency: 40MHz Flash size: 4MB Features: WiFi, BLE MAC address: 58:cf:79:05:5c:e8
2025-01-26: c2 - rustup show installed targets
tingo@kg-core2:~/personal/projects/2025/rust/embedded/riscv/ESP32-C3-DevKitC-02 $ rustup target list --installed riscv32imac-unknown-none-elf riscv32imc-unknown-none-elf thumbv6m-none-eabi thumbv7m-none-eabi thumbv8m.main-none-eabihf x86_64-unknown-freebsd
good.
2024-12-14: sb - try cargo-espflash and espflash with environment varable for port
tingo@kg-starone:~/personal/projects/2024/rust/embedded/riscv/ESP32-C3-DevKitC-02 $ ESPFLASH_PORT="/dev/cuaU0" espflash board-info Error: espflash::serial_not_found × The serial port '/dev/cuaU0' could not be found help: Make sure the correct device is connected to the host system tingo@kg-starone:~/personal/projects/2024/rust/embedded/riscv/ESP32-C3-DevKitC-02 $ ESPFLASH_PORT="/dev/cuaU0" cargo espflash board-inf o Error: espflash::serial_not_found × The serial port '/dev/cuaU0' could not be found help: Make sure the correct device is connected to the host system
nope, that doesn't work either.
2024-12-14: sb - install cargo-espflash via cargo install cargo-espflash
then
test it out
tingo@kg-starone:~/personal/projects/2024/rust/embedded/riscv/ESP32-C3-DevKitC-02 $ cargo espflash --version cargo-espflash-espflash 3.2.0 tingo@kg-starone:~/personal/projects/2024/rust/embedded/riscv/ESP32-C3-DevKitC-02 $ cargo espflash board-info --port /dev/cuaU0 Error: espflash::serial_not_found × The serial port '/dev/cuaU0' could not be found help: Make sure the correct device is connected to the host system tingo@kg-starone:~/personal/projects/2024/rust/embedded/riscv/ESP32-C3-DevKitC-02 $ cargo espflash board-info --port "/dev/cuaU0" Error: espflash::serial_not_found × The serial port '/dev/cuaU0' could not be found help: Make sure the correct device is connected to the host system tingo@kg-starone:~/personal/projects/2024/rust/embedded/riscv/ESP32-C3-DevKitC-02 $ cargo espflash board-info --list-all-ports ✔ Use serial port '/dev/cuaU0'? · yes [2024-12-14T19:41:43Z INFO ] Serial port: '/dev/cuaU0' [2024-12-14T19:41:43Z INFO ] Connecting... [2024-12-14T19:41:44Z INFO ] Using flash stub Chip type: esp32c3 (revision v0.3) Crystal frequency: 40 MHz Flash size: 4MB Features: WiFi, BLE MAC address: 58:cf:79:05:5c:e8
2024-12-14: sb - pkg - install gmake
Dec 14 20:35:08 kg-starone pkg[5863]: gmake-4.4.1 installed
2024-12-14: sb - do cargo install espflash
then
tingo@kg-starone:~/personal/projects/2024/rust/embedded/riscv/ESP32-C3-DevKitC-02 $ espflash --version espflash 3.2.0 tingo@kg-starone:~/personal/projects/2024/rust/embedded/riscv/ESP32-C3-DevKitC-02 $ espflash board-info --list-all-ports ✔ Use serial port '/dev/cuaU0'? · yes [2024-12-14T18:51:47Z INFO ] Serial port: '/dev/cuaU0' [2024-12-14T18:51:47Z INFO ] Connecting... [2024-12-14T18:51:48Z INFO ] Using flash stub Chip type: esp32c3 (revision v0.3) Crystal frequency: 40 MHz Flash size: 4MB Features: WiFi, BLE MAC address: 58:cf:79:05:5c:e8
but
tingo@kg-starone:~/personal/projects/2024/rust/embedded/riscv/ESP32-C3-DevKitC-02 $ espflash board-info --port /dev/cuaU0 Error: espflash::serial_not_found × The serial port '/dev/cuaU0' could not be found help: Make sure the correct device is connected to the host system tingo@kg-starone:~/personal/projects/2024/rust/embedded/riscv/ESP32-C3-DevKitC-02 $ espflash board-info -p /dev/cuaU0 Error: espflash::serial_not_found × The serial port '/dev/cuaU0' could not be found help: Make sure the correct device is connected to the host system
strange.
2024-12-14: sb - connected the esp32-devkitc-02 to the machine, trying to see if probe-rs finds it
tingo@kg-starone:~/personal/projects/2024/rust/embedded/riscv/ESP32-C3-DevKitC-02 $ probe-rs list No debug probes were found. tingo@kg-starone:~/personal/projects/2024/rust/embedded/riscv/ESP32-C3-DevKitC-02 $ sudo probe-rs list No debug probes were found.
check if the port is there
root@kg-starone:~ # usbconfig -d ugen0.6 ugen0.6: <CP210x UART Bridge Silicon Labs> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA)
and
root@kg-starone:~ # sysctl dev.uslcom.0.ttyname dev.uslcom.0.ttyname: U0
permissions
root@kg-starone:~ # ls -l /dev/cuaU0 /dev/ttyU0 crw-rw---- 1 uucp dialer 0x1aa Dec 14 19:32 /dev/cuaU0 crw------- 1 root wheel 0x1a7 Dec 14 19:32 /dev/ttyU0
and my user is a member of the dialer group.
2023-06-01: epaper (e-ink) display: 2.13 inch, white black red, 212x104, spi, waveshare epd 3 color equivalent. Looks like the epd-waveshare crate supports it: 2.13 inch B/W/R - resolution looks wrong 250 x 122. Other crates: ssd1675, ssd1681,
2023-05-30: c1 - try out the espflash command with the fix
tingo@kg-core1:~/personal/projects/2023/rust/embedded/esp/espflash $ git log commit 902d5c63a6d06be2179711c4bcdc1550473c4662 (HEAD -> serial_bsd) Author: Jesse Braham <jesse@beta7.io> Date: Tue May 30 07:05:37 2023 -0700 Fix handling of serial ports on BSD systems
try it
tingo@kg-core1:~/personal/projects/2023/rust/embedded/esp/espflash $ target/release/espflash board-info [2023-05-30T20:16:56Z INFO ] Detected 2 serial ports [2023-05-30T20:16:56Z INFO ] Ports which match a known common dev board are highlighted [2023-05-30T20:16:56Z INFO ] Please select a port [2023-05-30T20:17:00Z INFO ] Serial port: '/dev/cuaU0' [2023-05-30T20:17:00Z INFO ] Connecting... [2023-05-30T20:17:04Z INFO ] Unable to connect, retrying with extra delay... [2023-05-30T20:17:05Z INFO ] Using flash stub Chip type: esp32c3 (revision v0.3) Crystal frequency: 40MHz Flash size: 4MB Features: WiFi, BLE MAC address: 58:cf:79:05:5c:e8 tingo@kg-core1:~/personal/projects/2023/rust/embedded/esp/espflash $ target/release/espflash board-info --port /dev/cuaU0 [2023-05-30T20:17:21Z INFO ] Serial port: '/dev/cuaU0' [2023-05-30T20:17:21Z INFO ] Connecting... [2023-05-30T20:17:25Z INFO ] Unable to connect, retrying with extra delay... [2023-05-30T20:17:25Z INFO ] Using flash stub Chip type: esp32c3 (revision v0.3) Crystal frequency: 40MHz Flash size: 4MB Features: WiFi, BLE MAC address: 58:cf:79:05:5c:e8
yes, it works.
2023-05-30: c1 - fetch the proposed fix for serial on BSD systems
tingo@kg-core1:~/personal/projects/2023/rust/embedded/esp/espflash $ git fetch origin pull/415/head:serial_bsd remote: Enumerating objects: 41, done. remote: Counting objects: 100% (41/41), done. remote: Compressing objects: 100% (23/23), done. remote: Total 41 (delta 18), reused 35 (delta 15), pack-reused 0 Unpacking objects: 100% (41/41), 33.10 KiB | 1.03 MiB/s, done. From https://github.com/esp-rs/espflash * [new ref] refs/pull/415/head -> serial_bsd
switch to new branch
tingo@kg-core1:~/personal/projects/2023/rust/embedded/esp/espflash $ git switch serial_bsd Switched to branch 'serial_bsd'
build it
tingo@kg-core1:~/personal/projects/2023/rust/embedded/esp/espflash $ cargo build --release Downloaded ordered-float v2.10.0 Downloaded pem-rfc7468 v0.7.0 Downloaded crates-io v0.36.0 Downloaded rfc6979 v0.4.0 Downloaded serde-value v0.7.0 Downloaded ruzstd v0.3.1 Downloaded signature v2.1.0 Downloaded twox-hash v1.6.3 Downloaded const-oid v0.9.2 Downloaded ct-codecs v1.1.1 Downloaded http-auth v0.1.8 Downloaded hkdf v0.12.3 Downloaded pkcs8 v0.10.2 Downloaded spki v0.7.1 Downloaded fiat-crypto v0.1.20 Downloaded ecdsa v0.16.6 Downloaded git2-curl v0.17.0 Downloaded addr2line v0.20.0 Downloaded der v0.7.5 Downloaded object v0.31.1 Downloaded sec1 v0.7.1 Downloaded elliptic-curve v0.13.4 Downloaded ff v0.13.0 Downloaded git2 v0.16.0 Downloaded cargo v0.70.1 Downloaded ed25519-compact v2.0.4 Downloaded crypto-bigint v0.5.2 Downloaded clap_complete v4.2.0 Downloaded base16ct v0.2.0 Downloaded pasetors v0.6.6 Downloaded primeorder v0.13.1 Downloaded p384 v0.13.0 Downloaded orion v0.17.4 Downloaded group v0.13.0 Downloaded 34 crates (4.6 MB) in 0.86s (largest was `cargo` at 2.2 MB) Compiling libc v0.2.140 Compiling syn v1.0.109 Compiling generic-array v0.14.6 Compiling subtle v2.4.1 Compiling const-oid v0.9.2 Compiling getrandom v0.2.8 Compiling rand_core v0.6.4 Compiling base64ct v1.6.0 Compiling jobserver v0.1.26 Compiling block-buffer v0.10.4 Compiling crypto-common v0.1.6 Compiling cc v1.0.79 Compiling digest v0.10.6 Compiling ahash v0.7.6 Compiling hashbrown v0.12.3 Compiling pem-rfc7468 v0.7.0 Compiling openssl-src v111.25.3+1.1.1t Compiling der v0.7.5 Compiling semver v1.0.17 Compiling libz-sys v1.1.8 Compiling openssl-sys v0.9.87 Compiling ring v0.16.20 Compiling libnghttp2-sys v0.1.7+1.45.0 Compiling spki v0.7.1 Compiling libssh2-sys v0.2.23 Compiling curl-sys v0.4.61+curl-8.0.1 Compiling hmac v0.12.1 Compiling byteorder v1.4.3 Compiling darling_core v0.14.4 Compiling indexmap v1.9.3 Compiling flate2 v1.0.25 Compiling pkcs8 v0.10.2 Compiling ff v0.13.0 Compiling base16ct v0.2.0 Compiling toml_datetime v0.6.1 Compiling sec1 v0.7.1 Compiling toml_edit v0.19.8 Compiling group v0.13.0 Compiling rustc_version v0.4.0 Compiling unicode-linebreak v0.1.4 Compiling darling_macro v0.14.4 Compiling hkdf v0.12.3 Compiling libgit2-sys v0.14.1+1.5.0 Compiling crypto-bigint v0.5.2 Compiling elliptic-curve v0.13.4 Compiling darling v0.14.4 Compiling proc-macro-crate v1.3.1 Compiling heapless v0.7.16 Compiling sha2 v0.10.6 Compiling strum_macros v0.24.3 Compiling twox-hash v1.6.3 Compiling backtrace v0.3.67 Compiling openssl v0.10.52 Compiling ruzstd v0.3.1 Compiling strum v0.24.1 Compiling deku_derive v0.15.1 Compiling addr2line v0.19.0 Compiling hash32 v0.2.1 Compiling rfc6979 v0.4.0 Compiling openssl-macros v0.1.0 Compiling signature v2.1.0 Compiling filetime v0.2.20 Compiling object v0.30.3 Compiling binread_derive v2.1.0 Compiling textwrap v0.15.2 Compiling tar v0.4.38 Compiling ecdsa v0.16.6 Compiling deku v0.15.1 Compiling toml v0.7.3 Compiling object v0.31.1 Compiling primeorder v0.13.1 Compiling miette-derive v5.6.0 Compiling bstr v1.4.0 Compiling memmap2 v0.5.10 Compiling time-core v0.1.0 Compiling fiat-crypto v0.1.20 Compiling esp-idf-part v0.2.0 Compiling miette v5.6.0 Compiling addr2line v0.20.0 Compiling time v0.3.20 Compiling globset v0.4.10 Compiling orion v0.17.4 Compiling p384 v0.13.0 Compiling comfy-table v6.1.4 Compiling cargo v0.70.1 Compiling binread v2.2.0 Compiling clap_complete v4.2.0 Compiling ordered-float v2.10.0 Compiling rand_xoshiro v0.6.0 Compiling ed25519-compact v2.0.4 Compiling ct-codecs v1.1.1 Compiling either v1.8.1 Compiling itertools v0.10.5 Compiling pasetors v0.6.6 Compiling ignore v0.4.20 Compiling im-rc v15.1.0 Compiling serde-value v0.7.0 Compiling sha1 v0.10.5 Compiling http-auth v0.1.8 Compiling rustls v0.20.8 Compiling webpki v0.22.0 Compiling sct v0.7.0 Compiling webpki-roots v0.22.6 Compiling ureq v2.6.2 Compiling update-informer v0.6.0 Compiling espflash v2.0.0-rc.4 (/zs/tingo/personal/projects/2023/rust/embedded/esp/espflash/espflash) Compiling curl v0.4.44 Compiling crates-io v0.36.0 Compiling crypto-hash v0.3.4 Compiling cargo-util v0.2.3 Compiling git2 v0.16.0 Compiling git2-curl v0.17.0 Compiling cargo-espflash v2.0.0-rc.4 (/zs/tingo/personal/projects/2023/rust/embedded/esp/espflash/cargo-espflash) Finished release [optimized] target(s) in 6m 11s
2023-05-23: c1 - try out the newly built espflash
tingo@kg-core1:~/personal/projects/2023/rust/embedded/esp/espflash $ target/release/espflash --version espflash 2.0.0-rc.4 tingo@kg-core1:~/personal/projects/2023/rust/embedded/esp/espflash $ tingo@kg-core1:~/personal/projects/2023/rust/embedded/esp/espflash $ target/release/espflash board-info [2023-05-23T20:50:12Z INFO ] Detected 2 serial ports [2023-05-23T20:50:12Z INFO ] Ports which match a known common dev board are highlighted [2023-05-23T20:50:12Z INFO ] Please select a port [2023-05-23T20:50:16Z INFO ] Serial port: '/dev/cuaU0' [2023-05-23T20:50:16Z INFO ] Connecting... [2023-05-23T20:50:16Z INFO ] Attempting UnixTight reset with default delay... [2023-05-23T20:50:19Z INFO ] Attempting Classic reset with default delay... [2023-05-23T20:50:19Z INFO ] Using flash stub Chip type: esp32c3 (revision v0.3) Crystal frequency: 40MHz Flash size: 4MB Features: WiFi, BLE MAC address: 58:cf:79:05:5c:e8
try specifying the port
tingo@kg-core1:~/personal/projects/2023/rust/embedded/esp/espflash $ target/release/espflash board-info --port /dev/cuaU0 [2023-05-23T20:51:06Z INFO ] Serial port: '/dev/cuau0' [2023-05-23T20:51:06Z INFO ] Connecting... [2023-05-23T20:51:06Z INFO ] Attempting UnixTight reset with default delay... [2023-05-23T20:51:07Z INFO ] Attempting Classic reset with default delay... [2023-05-23T20:51:07Z INFO ] Attempting UnixTight reset with extra delay... [2023-05-23T20:51:09Z INFO ] Attempting Classic reset with extra delay... [2023-05-23T20:51:10Z INFO ] Attempting UnixTight reset with default delay... [2023-05-23T20:51:10Z INFO ] Attempting Classic reset with default delay... [2023-05-23T20:51:11Z INFO ] Attempting UnixTight reset with extra delay... [2023-05-23T20:51:12Z INFO ] Attempting Classic reset with extra delay... [2023-05-23T20:51:13Z INFO ] Attempting UnixTight reset with default delay... [2023-05-23T20:51:14Z INFO ] Attempting Classic reset with default delay... [2023-05-23T20:51:15Z INFO ] Attempting UnixTight reset with extra delay... [2023-05-23T20:51:16Z INFO ] Attempting Classic reset with extra delay... [2023-05-23T20:51:17Z INFO ] Attempting UnixTight reset with default delay... [2023-05-23T20:51:18Z INFO ] Attempting Classic reset with default delay... Error: espflash::connection_failed × Error while connecting to device ╰─▶ Failed to connect to the device help: Ensure that the device is connected and the reset and boot pins are not being held down
hmm, for some reason it selects the wrong port, try to fix
tingo@kg-core1:~/personal/projects/2023/rust/embedded/esp/espflash $ target/release/espflash board-info --port '/dev/cuaU0' [2023-05-23T20:52:24Z INFO ] Serial port: '/dev/cuau0' [2023-05-23T20:52:24Z INFO ] Connecting... [2023-05-23T20:52:24Z INFO ] Attempting UnixTight reset with default delay... [2023-05-23T20:52:24Z INFO ] Attempting Classic reset with default delay... [2023-05-23T20:52:25Z INFO ] Attempting UnixTight reset with extra delay... [2023-05-23T20:52:26Z INFO ] Attempting Classic reset with extra delay... [2023-05-23T20:52:27Z INFO ] Attempting UnixTight reset with default delay... [2023-05-23T20:52:28Z INFO ] Attempting Classic reset with default delay... [2023-05-23T20:52:29Z INFO ] Attempting UnixTight reset with extra delay... [2023-05-23T20:52:30Z INFO ] Attempting Classic reset with extra delay... [2023-05-23T20:52:31Z INFO ] Attempting UnixTight reset with default delay... [2023-05-23T20:52:32Z INFO ] Attempting Classic reset with default delay... [2023-05-23T20:52:32Z INFO ] Attempting UnixTight reset with extra delay... [2023-05-23T20:52:34Z INFO ] Attempting Classic reset with extra delay... [2023-05-23T20:52:35Z INFO ] Attempting UnixTight reset with default delay... [2023-05-23T20:52:35Z INFO ] Attempting Classic reset with default delay... Error: espflash::connection_failed × Error while connecting to device ╰─▶ Failed to connect to the device help: Ensure that the device is connected and the reset and boot pins are not being held down
nope, try to see more
tingo@kg-core1:~/personal/projects/2023/rust/embedded/esp/espflash $ target/release/espflash board-info --help Establish a connection with a target device Usage: espflash board-info [OPTIONS] Options: -b, --baud <BAUD> Baud rate at which to communicate with target device [env: ESPFLASH_BAUD=] -p, --port <PORT> Serial port connected to target device [env: ESPFLASH_PORT=] --no-stub Do not use the RAM stub for loading -h, --help Print help -V, --version Print version
try with env variable
tingo@kg-core1:~/personal/projects/2023/rust/embedded/esp/espflash $ ESPFLASH_PORT="/dev/cuaU0" target/release/espflash board-info [2023-05-23T20:54:52Z INFO ] Serial port: '/dev/cuau0' [2023-05-23T20:54:52Z INFO ] Connecting... [2023-05-23T20:54:52Z INFO ] Attempting UnixTight reset with default delay... [2023-05-23T20:54:53Z INFO ] Attempting Classic reset with default delay... [2023-05-23T20:54:54Z INFO ] Attempting UnixTight reset with extra delay... [2023-05-23T20:54:55Z INFO ] Attempting Classic reset with extra delay... [2023-05-23T20:54:56Z INFO ] Attempting UnixTight reset with default delay... [2023-05-23T20:54:57Z INFO ] Attempting Classic reset with default delay... [2023-05-23T20:54:57Z INFO ] Attempting UnixTight reset with extra delay... [2023-05-23T20:54:58Z INFO ] Attempting Classic reset with extra delay... [2023-05-23T20:55:00Z INFO ] Attempting UnixTight reset with default delay... [2023-05-23T20:55:00Z INFO ] Attempting Classic reset with default delay... [2023-05-23T20:55:01Z INFO ] Attempting UnixTight reset with extra delay... [2023-05-23T20:55:02Z INFO ] Attempting Classic reset with extra delay... [2023-05-23T20:55:03Z INFO ] Attempting UnixTight reset with default delay... [2023-05-23T20:55:04Z INFO ] Attempting Classic reset with default delay... Error: espflash::connection_failed × Error while connecting to device ╰─▶ Failed to connect to the device help: Ensure that the device is connected and the reset and boot pins are not being held down
ok, so that is a problem.
2023-05-23: c1 - build espflash from source
tingo@kg-core1:~/personal/projects/2023/rust/embedded/esp $ git clone https://github.com/esp-rs/espflash.git Cloning into 'espflash'... remote: Enumerating objects: 4090, done. remote: Counting objects: 100% (288/288), done. remote: Compressing objects: 100% (163/163), done. Receiving objects: 100% (4090/4090), 1.38 MiB | 9.39 MiB/s, done. remote: Total 4090 (delta 154), reused 220 (delta 117), pack-reused 3802 Resolving deltas: 100% (2706/2706), done. tingo@kg-core1:~/personal/projects/2023/rust/embedded/esp $ cd espflash/
fetch pull request 387
tingo@kg-core1:~/personal/projects/2023/rust/embedded/esp/espflash $ git fetch origin pull/387/head:unix_tight remote: Enumerating objects: 24, done. remote: Counting objects: 100% (24/24), done. remote: Compressing objects: 100% (7/7), done. remote: Total 24 (delta 17), reused 24 (delta 17), pack-reused 0 Unpacking objects: 100% (24/24), 10.18 KiB | 1.45 MiB/s, done. From https://github.com/esp-rs/espflash * [new ref] refs/pull/387/head -> unix_tight tingo@kg-core1:~/personal/projects/2023/rust/embedded/esp/espflash $ git switch unix_tight Switched to branch 'unix_tight'
build it
tingo@kg-core1:~/personal/projects/2023/rust/embedded/esp/espflash $ cargo build --release Downloaded is-terminal v0.4.5 Downloaded home v0.5.4 Downloaded supports-hyperlinks v2.0.0 Downloaded clap_lex v0.3.3 Downloaded filetime v0.2.20 Downloaded generic-array v0.14.6 Downloaded tempfile v3.4.0 Downloaded openssl-macros v0.1.0 Downloaded cpufeatures v0.2.6 Downloaded getrandom v0.2.8 Downloaded cargo_metadata v0.15.3 Downloaded dialoguer v0.10.3 Downloaded spin v0.9.6 Downloaded hash32 v0.2.1 Downloaded io-lifetimes v1.0.9 Downloaded proc-macro2 v1.0.54 Downloaded serde_derive v1.0.158 Downloaded clap v4.1.13 Downloaded clap_derive v4.1.12 Downloaded heapless v0.7.16 Downloaded flate2 v1.0.25 Downloaded serde v1.0.158 Downloaded openssl-sys v0.9.83 Downloaded cpp_demangle v0.4.0 Downloaded serde_json v1.0.95 Downloaded crossterm v0.26.1 Downloaded openssl v0.10.48 Downloaded syn v2.0.10 Downloaded clap v3.2.23 Downloaded rustix v0.36.11 Downloaded libc v0.2.140 Downloaded libgit2-sys v0.14.1+1.5.0 Downloaded curl-sys v0.4.61+curl-8.0.1 Downloaded miette-derive v5.6.0 Downloaded esp-idf-part v0.2.0 Downloaded miette v5.6.0 Downloaded openssl-src v111.25.2+1.1.1t Downloaded 37 crates (13.0 MB) in 2.95s (largest was `openssl-src` at 5.1 MB) Compiling libc v0.2.140 Compiling proc-macro2 v1.0.54 Compiling unicode-ident v1.0.8 Compiling quote v1.0.26 Compiling cfg-if v1.0.0 Compiling autocfg v1.1.0 Compiling pkg-config v0.3.26 Compiling serde_derive v1.0.158 Compiling syn v2.0.10 Compiling serde v1.0.158 Compiling version_check v0.9.4 Compiling jobserver v0.1.26 Compiling memchr v2.5.0 Compiling cc v1.0.79 Compiling bitflags v1.3.2 Compiling once_cell v1.17.1 Compiling ahash v0.7.6 Compiling syn v1.0.109 Compiling log v0.4.17 Compiling openssl-src v111.25.2+1.1.1t Compiling libz-sys v1.1.8 Compiling openssl-sys v0.9.83 Compiling crc32fast v1.3.2 Compiling indexmap v1.9.3 Compiling io-lifetimes v1.0.9 Compiling getrandom v0.2.8 Compiling rustix v0.36.11 Compiling errno v0.2.8 Compiling semver v1.0.17 Compiling hashbrown v0.12.3 Compiling typenum v1.16.0 Compiling tinyvec_macros v0.1.1 Compiling tinyvec v1.6.0 Compiling ring v0.16.20 Compiling lock_api v0.4.9 Compiling ryu v1.0.13 Compiling itoa v1.0.6 Compiling adler v1.0.2 Compiling miniz_oxide v0.6.2 Compiling unicode-normalization v0.1.22 Compiling libnghttp2-sys v0.1.7+1.45.0 Compiling serde_json v1.0.95 Compiling percent-encoding v2.2.0 Compiling unicode-bidi v0.3.13 Compiling scopeguard v1.1.0 Compiling smallvec v1.10.0 Compiling idna v0.3.0 Compiling form_urlencoded v1.1.0 Compiling flate2 v1.0.25 Compiling aho-corasick v0.7.20 Compiling untrusted v0.7.1 Compiling unicode-width v0.1.10 Compiling regex-syntax v0.6.29 Compiling rustversion v1.0.12 Compiling spin v0.5.2 Compiling regex v1.7.3 Compiling url v2.3.1 Compiling is-terminal v0.4.5 Compiling libssh2-sys v0.2.23 Compiling curl-sys v0.4.61+curl-8.0.1 Compiling generic-array v0.14.6 Compiling fnv v1.0.7 Compiling parking_lot_core v0.9.7 Compiling stable_deref_trait v1.2.0 Compiling signal-hook v0.3.15 Compiling heck v0.4.1 Compiling ident_case v1.0.1 Compiling strsim v0.10.0 Compiling darling_core v0.14.4 Compiling toml_datetime v0.6.1 Compiling serde_spanned v0.6.1 Compiling signal-hook-registry v1.4.1 Compiling termcolor v1.2.0 Compiling winnow v0.4.1 Compiling thiserror v1.0.40 Compiling radium v0.7.0 Compiling static_assertions v1.1.0 Compiling os_str_bytes v6.5.0 Compiling cpp_demangle v0.4.0 Compiling lazy_static v1.4.0 Compiling unicode-linebreak v0.1.4 Compiling toml_edit v0.19.8 Compiling rustc_version v0.4.0 Compiling darling_macro v0.14.4 Compiling thiserror-impl v1.0.40 Compiling libgit2-sys v0.14.1+1.5.0 Compiling mio v0.8.6 Compiling num-traits v0.2.15 Compiling fastrand v1.9.0 Compiling anyhow v1.0.70 Compiling rustls v0.20.8 Compiling tap v1.0.1 Compiling fallible-iterator v0.2.0 Compiling wyz v0.5.1 Compiling tempfile v3.4.0 Compiling gimli v0.27.2 Compiling signal-hook-mio v0.2.3 Compiling proc-macro-crate v1.3.1 Compiling parking_lot v0.12.1 Compiling darling v0.14.4 Compiling heapless v0.7.16 Compiling strum_macros v0.24.3 Compiling object v0.30.3 Compiling backtrace v0.3.67 Compiling openssl v0.10.48 Compiling rustc-demangle v0.1.22 Compiling foreign-types-shared v0.1.1 Compiling byteorder v1.4.3 Compiling funty v2.0.0 Compiling openssl-probe v0.1.5 Compiling portable-atomic v0.3.19 Compiling humantime v2.1.0 Compiling curl v0.4.44 Compiling addr2line v0.19.0 Compiling bitvec v1.0.1 Compiling hash32 v0.2.1 Compiling foreign-types v0.3.2 Compiling strum v0.24.1 Compiling deku_derive v0.15.1 Compiling block-buffer v0.10.4 Compiling crypto-common v0.1.6 Compiling console v0.15.5 Compiling spin v0.9.6 Compiling hex v0.4.3 Compiling openssl-macros v0.1.0 Compiling csv-core v0.1.10 Compiling filetime v0.2.20 Compiling socket2 v0.4.9 Compiling dirs-sys v0.3.7 Compiling either v1.8.1 Compiling base64 v0.13.1 Compiling regex-automata v0.1.10 Compiling smawk v0.3.1 Compiling same-file v1.0.6 Compiling is_ci v1.1.1 Compiling supports-color v2.0.0 Compiling walkdir v2.3.3 Compiling textwrap v0.15.2 Compiling bstr v1.4.0 Compiling binread_derive v2.1.0 Compiling directories v4.0.1 Compiling tar v0.4.38 Compiling csv v1.2.1 Compiling deku v0.15.1 Compiling digest v0.10.6 Compiling parse_int v0.6.0 Compiling crossterm v0.25.0 Compiling clap_lex v0.3.3 Compiling nix v0.26.2 Compiling clap_derive v4.1.12 Compiling supports-unicode v2.0.0 Compiling supports-hyperlinks v2.0.0 Compiling serde_plain v1.0.1 Compiling bitmaps v2.1.0 Compiling miette-derive v5.6.0 Compiling bytemuck_derive v1.4.1 Compiling nix v0.24.3 Compiling im-rc v15.1.0 Compiling terminal_size v0.1.17 Compiling atty v0.2.14 Compiling dirs-sys-next v0.1.2 Compiling vte_generate_state_changes v0.1.1 Compiling rand_core v0.6.4 Compiling number_prefix v0.4.0 Compiling zero v0.1.3 Compiling owo-colors v3.5.0 Compiling zeroize v1.6.0 Compiling camino v1.1.4 Compiling bytes v1.4.0 Compiling arrayvec v0.5.2 Compiling md5 v0.7.0 Compiling shell-words v1.1.0 Compiling utf8parse v0.2.1 Compiling hex v0.3.2 Compiling cpufeatures v0.2.6 Compiling sha2 v0.10.6 Compiling vte v0.10.1 Compiling dialoguer v0.10.3 Compiling esp-idf-part v0.2.0 Compiling combine v4.6.6 Compiling miette v5.6.0 Compiling globset v0.4.10 Compiling serialport v4.2.0 Compiling itertools v0.10.5 Compiling xmas-elf v0.9.0 Compiling rand_xoshiro v0.6.0 Compiling indicatif v0.17.3 Compiling directories-next v2.0.0 Compiling bytemuck v1.13.1 Compiling clap v4.1.13 Compiling sized-chunks v0.6.5 Compiling ctrlc v3.2.5 Compiling comfy-table v6.1.4 Compiling cargo v0.66.0 Compiling binread v2.2.0 Compiling toml v0.7.3 Compiling env_logger v0.10.0 Compiling crossterm v0.26.1 Compiling clap_lex v0.2.4 Compiling kstring v2.0.0 Compiling cargo-platform v0.1.2 Compiling thread_local v1.1.7 Compiling slip-codec v0.3.4 Compiling shell-escape v0.1.5 Compiling base64 v0.21.0 Compiling textwrap v0.16.0 Compiling clap v3.2.23 Compiling ignore v0.4.20 Compiling toml_edit v0.14.4 Compiling strip-ansi-escapes v0.1.1 Compiling env_logger v0.9.3 Compiling rustfix v0.6.1 Compiling os_info v3.7.0 Compiling serde_ignored v0.1.7 Compiling lazycell v1.3.0 Compiling glob v0.3.1 Compiling home v0.5.4 Compiling pathdiff v0.2.1 Compiling bytesize v1.2.0 Compiling unicode-xid v0.2.4 Compiling webpki v0.22.0 Compiling sct v0.7.0 Compiling webpki-roots v0.22.6 Compiling opener v0.5.2 Compiling rustc-workspace-hack v1.0.0 Compiling cargo_metadata v0.15.3 Compiling ureq v2.6.2 Compiling update-informer v0.6.0 Compiling crypto-hash v0.3.4 Compiling cargo-util v0.2.3 Compiling espflash v2.0.0-rc.4 (/zs/tingo/personal/projects/2023/rust/embedded/esp/espflash/espflash) Compiling crates-io v0.34.0 Compiling git2 v0.15.0 Compiling git2-curl v0.16.0 Compiling cargo-espflash v2.0.0-rc.4 (/zs/tingo/personal/projects/2023/rust/embedded/esp/espflash/cargo-espflash) Finished release [optimized] target(s) in 7m 21s
2023-05-23: c1 - try cargo espflash
tingo@kg-core1:~/personal/projects/2023/rust/embedded/riscv $ cargo espflash --version cargo-espflash-espflash 2.0.0-rc.3 tingo@kg-core1:~/personal/projects/2023/rust/embedded/riscv $ cargo espflash --help Cargo subcommand for flashing Espressif devices over serial Usage: cargo espflash <COMMAND> Commands: board-info Display information about the connected board and exit without flashing flash Flash an application to a target device monitor Open the serial monitor without flashing partition-table Operations for partitions tables save-image Save the image to disk instead of flashing to device help Print this message or the help of the given subcommand(s) Options: -h, --help Print help -V, --version Print version
try espflash board-info
tingo@kg-core1:~/personal/projects/2023/rust/embedded/riscv $ cargo espflash board-info [2023-05-23T20:31:38Z INFO ] Detected 2 serial ports [2023-05-23T20:31:38Z INFO ] Ports which match a known common dev board are highlighted [2023-05-23T20:31:38Z INFO ] Please select a port [2023-05-23T20:31:44Z INFO ] Serial port: '/dev/cuaU0' [2023-05-23T20:31:44Z INFO ] Connecting... [2023-05-23T20:31:48Z INFO ] Unable to connect, retrying with extra delay... [2023-05-23T20:31:49Z INFO ] Using flash stub Chip type: esp32c3 (revision v0.3) Crystal frequency: 40MHz Flash size: 4MB Features: WiFi, BLE MAC address: 58:cf:79:05:5c:e8
now try with port specified
tingo@kg-core1:~/personal/projects/2023/rust/embedded/riscv $ cargo espflash board-info --port /dev/cuaU0 [2023-05-23T20:32:46Z INFO ] Serial port: '/dev/cuau0' [2023-05-23T20:32:46Z INFO ] Connecting... [2023-05-23T20:32:47Z INFO ] Unable to connect, retrying with extra delay... [2023-05-23T20:32:48Z INFO ] Unable to connect, retrying with default delay... [2023-05-23T20:32:49Z INFO ] Unable to connect, retrying with extra delay... [2023-05-23T20:32:50Z INFO ] Unable to connect, retrying with default delay... [2023-05-23T20:32:51Z INFO ] Unable to connect, retrying with extra delay... [2023-05-23T20:32:52Z INFO ] Unable to connect, retrying with default delay... [2023-05-23T20:32:52Z INFO ] Unable to connect, retrying with extra delay... Error: espflash::connection_failed × Error while connecting to device ╰─▶ Failed to connect to the device help: Ensure that the device is connected and the reset and boot pins are not being held down
hmm, that doesn't work.
2023-05-23: c1 - cargo - install latest cargo-espflash
tingo@kg-core1:~/personal/projects/2023/rust/embedded/riscv $ cargo install cargo-espflash@2.0.0-rc.3 Downloaded cargo-espflash v2.0.0-rc.3 Downloaded 1 crate (27.1 KB) in 1.28s Updating crates.io index Installing cargo-espflash v2.0.0-rc.3 Downloaded serde_ignored v0.1.7 Downloaded smallvec v0.6.14 Downloaded shell-escape v0.1.5 Downloaded pathdiff v0.2.1 Downloaded ident_case v1.0.1 Downloaded regex v1.8.2 Downloaded toml_edit v0.14.4 Downloaded toml_edit v0.19.9 Downloaded syn v2.0.16 Downloaded clap_derive v4.3.0 Downloaded console v0.15.7 Downloaded clap_lex v0.2.4 Downloaded esp-idf-part v0.1.2 Downloaded maybe-uninit v2.0.0 Downloaded glob v0.3.1 Downloaded os_str_bytes v6.5.0 Downloaded hex v0.3.2 Downloaded strip-ansi-escapes v0.1.1 Downloaded slip-codec v0.3.4 Downloaded zero v0.1.3 Downloaded serde-hex v0.1.0 Downloaded serde_plain v1.0.1 Downloaded nodrop v0.1.14 Downloaded crypto-hash v0.3.4 Downloaded combine v4.6.6 Downloaded bstr v1.5.0 Downloaded darling v0.14.4 Downloaded portable-atomic v0.3.20 Downloaded darling_macro v0.14.4 Downloaded opener v0.5.2 Downloaded rustfix v0.6.1 Downloaded proc-macro-crate v1.3.1 Downloaded lazycell v1.3.0 Downloaded directories-next v2.0.0 Downloaded bitflags v2.0.2 Downloaded serialport v4.2.1 Downloaded portable-atomic v1.3.2 Downloaded binread_derive v2.1.0 Downloaded crates-io v0.34.0 Downloaded cargo-util v0.2.3 Downloaded os_info v3.7.0 Downloaded sized-chunks v0.6.5 Downloaded xmas-elf v0.9.0 Downloaded rand_xoshiro v0.6.0 Downloaded miette-derive v5.9.0 Downloaded comfy-table v6.1.4 Downloaded crossterm v0.25.0 Downloaded git2 v0.15.0 Downloaded miette v5.9.0 Downloaded parse_int v0.6.0 Downloaded vte v0.10.1 Downloaded textwrap v0.16.0 Downloaded array-init v0.0.4 Downloaded rustc-workspace-hack v1.0.0 Downloaded base64 v0.21.1 Downloaded libssh2-sys v0.2.23 Downloaded regex-syntax v0.7.2 Downloaded espflash v2.0.0-rc.3 Downloaded bitmaps v2.1.0 Downloaded binread v2.2.0 Downloaded md5 v0.7.0 Downloaded im-rc v15.1.0 Downloaded deku_derive v0.15.1 Downloaded darling_core v0.14.4 Downloaded csv-core v0.1.10 Downloaded vte_generate_state_changes v0.1.1 Downloaded signal-hook-mio v0.2.3 Downloaded deku v0.15.1 Downloaded curl v0.4.44 Downloaded bytemuck_derive v1.4.1 Downloaded arrayvec v0.5.2 Downloaded env_logger v0.9.3 Downloaded dirs-sys-next v0.1.2 Downloaded bytemuck v1.13.1 Downloaded clap_lex v0.5.0 Downloaded clap v4.3.0 Downloaded clap v3.2.25 Downloaded toml_datetime v0.6.2 Downloaded proc-macro2 v1.0.58 Downloaded digest v0.10.7 Downloaded clap_builder v4.3.0 Downloaded csv v1.2.1 Downloaded libgit2-sys v0.14.2+1.5.1 Downloaded git2-curl v0.16.0 Downloaded libz-sys v1.1.9 Downloaded curl-sys v0.4.62+curl-8.1.0 Downloaded libnghttp2-sys v0.1.7+1.45.0 Downloaded cargo v0.66.0 Downloaded 88 crates (19.6 MB) in 2.17s (largest was `libnghttp2-sys` at 4.5 MB) Compiling libc v0.2.144 Compiling proc-macro2 v1.0.58 Compiling quote v1.0.27 Compiling unicode-ident v1.0.8 Compiling cfg-if v1.0.0 Compiling pkg-config v0.3.27 Compiling version_check v0.9.4 Compiling memchr v2.5.0 Compiling bitflags v1.3.2 Compiling autocfg v1.1.0 Compiling once_cell v1.17.1 Compiling syn v2.0.16 Compiling ahash v0.7.6 Compiling jobserver v0.1.26 Compiling cc v1.0.79 Compiling serde v1.0.163 Compiling libz-sys v1.1.9 Compiling openssl-src v111.25.3+1.1.1t Compiling log v0.4.17 Compiling openssl-sys v0.9.87 Compiling io-lifetimes v1.0.10 Compiling crc32fast v1.3.2 Compiling rustix v0.37.19 Compiling errno v0.3.1 Compiling getrandom v0.2.9 Compiling syn v1.0.109 Compiling indexmap v1.9.3 Compiling hashbrown v0.12.3 Compiling serde_derive v1.0.163 Compiling adler v1.0.2 Compiling typenum v1.16.0 Compiling tinyvec_macros v0.1.1 Compiling tinyvec v1.6.0 Compiling miniz_oxide v0.7.1 Compiling libnghttp2-sys v0.1.7+1.45.0 Compiling ring v0.16.20 Compiling itoa v1.0.6 Compiling ryu v1.0.13 Compiling flate2 v1.0.26 Compiling unicode-normalization v0.1.22 Compiling is-terminal v0.4.7 Compiling serde_json v1.0.96 Compiling percent-encoding v2.2.0 Compiling smallvec v1.10.0 Compiling unicode-bidi v0.3.13 Compiling form_urlencoded v1.1.0 Compiling idna v0.3.0 Compiling libssh2-sys v0.2.23 Compiling curl-sys v0.4.62+curl-8.1.0 Compiling aho-corasick v1.0.1 Compiling spin v0.5.2 Compiling regex-syntax v0.7.2 Compiling unicode-width v0.1.10 Compiling rustversion v1.0.12 Compiling utf8parse v0.2.1 Compiling untrusted v0.7.1 Compiling regex v1.8.2 Compiling url v2.3.1 Compiling generic-array v0.14.7 Compiling cpp_demangle v0.4.1 Compiling ident_case v1.0.1 Compiling strsim v0.10.0 Compiling heck v0.4.1 Compiling fnv v1.0.7 Compiling darling_core v0.14.4 Compiling libgit2-sys v0.14.2+1.5.1 Compiling lock_api v0.4.9 Compiling semver v1.0.17 Compiling toml_datetime v0.6.2 Compiling scopeguard v1.1.0 Compiling parking_lot_core v0.9.7 Compiling anyhow v1.0.71 Compiling radium v0.7.0 Compiling static_assertions v1.1.0 Compiling thiserror v1.0.40 Compiling stable_deref_trait v1.2.0 Compiling lazy_static v1.4.0 Compiling winnow v0.4.6 Compiling fallible-iterator v0.2.0 Compiling signal-hook v0.3.15 Compiling unicode-linebreak v0.1.4 Compiling gimli v0.27.2 Compiling toml_edit v0.19.9 Compiling darling_macro v0.14.4 Compiling object v0.30.3 Compiling thiserror-impl v1.0.40 Compiling backtrace v0.3.67 Compiling signal-hook-registry v1.4.1 Compiling num-traits v0.2.15 Compiling portable-atomic v1.3.2 Compiling openssl-probe v0.1.5 Compiling tap v1.0.1 Compiling openssl v0.10.52 Compiling rustls v0.20.8 Compiling fastrand v1.9.0 Compiling rustc-demangle v0.1.23 Compiling maybe-uninit v2.0.0 Compiling termcolor v1.2.0 Compiling foreign-types-shared v0.1.1 Compiling curl v0.4.44 Compiling foreign-types v0.3.2 Compiling addr2line v0.19.0 Compiling tempfile v3.5.0 Compiling wyz v0.5.1 Compiling proc-macro-crate v1.3.1 Compiling darling v0.14.4 Compiling strum_macros v0.24.3 Compiling anstyle-parse v0.2.0 Compiling miniz_oxide v0.6.2 Compiling openssl-macros v0.1.1 Compiling mio v0.8.6 Compiling filetime v0.2.21 Compiling socket2 v0.4.9 Compiling colorchoice v1.0.0 Compiling humantime v2.1.0 Compiling same-file v1.0.6 Compiling portable-atomic v0.3.20 Compiling anstyle v1.0.0 Compiling anstyle-query v1.0.0 Compiling regex-automata v0.1.10 Compiling funty v2.0.0 Compiling anstream v0.3.2 Compiling bstr v1.5.0 Compiling bitvec v1.0.1 Compiling walkdir v2.3.3 Compiling strum v0.24.1 Compiling tar v0.4.38 Compiling signal-hook-mio v0.2.3 Compiling parking_lot v0.12.1 Compiling deku_derive v0.15.1 Compiling crypto-common v0.1.6 Compiling block-buffer v0.10.4 Compiling console v0.15.7 Compiling bitmaps v2.1.0 Compiling aho-corasick v0.7.20 Compiling csv-core v0.1.10 Compiling atty v0.2.14 Compiling dirs-sys v0.3.7 Compiling vte_generate_state_changes v0.1.1 Compiling im-rc v15.1.0 Compiling smawk v0.3.1 Compiling nodrop v0.1.14 Compiling base64 v0.13.1 Compiling either v1.8.1 Compiling bytes v1.4.0 Compiling rand_core v0.6.4 Compiling clap_lex v0.5.0 Compiling camino v1.1.4 Compiling is_ci v1.1.1 Compiling hex v0.3.2 Compiling os_str_bytes v6.5.0 Compiling arrayvec v0.5.2 Compiling vte v0.10.1 Compiling clap_lex v0.2.4 Compiling supports-color v2.0.0 Compiling itertools v0.10.5 Compiling clap_builder v4.3.0 Compiling combine v4.6.6 Compiling rand_xoshiro v0.6.0 Compiling binread_derive v2.1.0 Compiling array-init v0.0.4 Compiling globset v0.4.10 Compiling textwrap v0.15.2 Compiling directories v4.0.1 Compiling csv v1.2.1 Compiling sized-chunks v0.6.5 Compiling digest v0.10.7 Compiling smallvec v0.6.14 Compiling deku v0.15.1 Compiling parse_int v0.6.0 Compiling cargo v0.66.0 Compiling crossterm v0.25.0 Compiling backtrace-ext v0.2.1 Compiling nix v0.26.2 Compiling kstring v2.0.0 Compiling clap_derive v4.3.0 Compiling supports-unicode v2.0.0 Compiling supports-hyperlinks v2.1.0 Compiling serde_plain v1.0.1 Compiling cargo-platform v0.1.2 Compiling bytemuck_derive v1.4.1 Compiling miette-derive v5.9.0 Compiling terminal_size v0.1.17 Compiling dirs-sys-next v0.1.2 Compiling thread_local v1.1.7 Compiling zeroize v1.6.0 Compiling shell-escape v0.1.5 Compiling owo-colors v3.5.0 Compiling zero v0.1.3 Compiling number_prefix v0.4.0 Compiling md5 v0.7.0 Compiling shell-words v1.1.0 Compiling hex v0.4.3 Compiling textwrap v0.16.0 Compiling cpufeatures v0.2.7 Compiling bitflags v2.0.2 Compiling serialport v4.2.1 Compiling miette v5.9.0 Compiling sha2 v0.10.6 Compiling crypto-hash v0.3.4 Compiling cargo-util v0.2.3 Compiling clap v3.2.25 Compiling dialoguer v0.10.4 Compiling esp-idf-part v0.1.2 Compiling indicatif v0.17.3 Compiling xmas-elf v0.9.0 Compiling ignore v0.4.20 Compiling directories-next v2.0.0 Compiling bytemuck v1.13.1 Compiling clap v4.3.0 Compiling toml_edit v0.14.4 Compiling comfy-table v6.1.4 Compiling serde-hex v0.1.0 Compiling binread v2.2.0 Compiling strip-ansi-escapes v0.1.1 Compiling env_logger v0.9.3 Compiling env_logger v0.10.0 Compiling rustfix v0.6.1 Compiling toml v0.5.11 Compiling serde_ignored v0.1.7 Compiling os_info v3.7.0 Compiling unicode-xid v0.2.4 Compiling bytesize v1.2.0 Compiling opener v0.5.2 Compiling lazycell v1.3.0 Compiling slip-codec v0.3.4 Compiling rustc-workspace-hack v1.0.0 Compiling home v0.5.5 Compiling base64 v0.21.1 Compiling pathdiff v0.2.1 Compiling glob v0.3.1 Compiling cargo_metadata v0.15.4 Compiling webpki v0.22.0 Compiling sct v0.7.0 Compiling webpki-roots v0.22.6 Compiling ureq v2.6.2 Compiling update-informer v0.6.0 Compiling espflash v2.0.0-rc.3 Compiling crates-io v0.34.0 Compiling git2 v0.15.0 Compiling git2-curl v0.16.0 Compiling cargo-espflash v2.0.0-rc.3 Finished release [optimized] target(s) in 9m 08s Installing /home/tingo/.cargo/bin/cargo-espflash Installed package `cargo-espflash v2.0.0-rc.3` (executable `cargo-espflash`)
2023-05-23: c1 - connecting the devboard to a FreeBSD workstation, I see this in /var/log/messages
May 23 22:04:50 kg-core1 kernel: ugen3.4: <Silicon Labs CP2102N USB to UART Bridge Controller> at usbus3 May 23 22:04:50 kg-core1 webcamd[72334]: webcamd: Cannot find USB device May 23 22:04:50 kg-core1 kernel: uslcom0 on uhub8 May 23 22:04:50 kg-core1 kernel: uslcom0: <Silicon Labs CP2102N USB to UART Bridge Controller, class 0/0, rev 2.00/1.00, addr 4> on usbus3
usbconfig says
root@kg-core1:~ # usbconfig -d ugen3.4 ugen3.4: <Silicon Labs CP2102N USB to UART Bridge Controller> at usbus3, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA)
device description
root@kg-core1:~ # usbconfig -d ugen3.4 dump_device_desc ugen3.4: <Silicon Labs CP2102N USB to UART Bridge Controller> at usbus3, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA) bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0200 bDeviceClass = 0x0000 <Probed by interface class> bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0000 bMaxPacketSize0 = 0x0040 idVendor = 0x10c4 idProduct = 0xea60 bcdDevice = 0x0100 iManufacturer = 0x0001 <Silicon Labs> iProduct = 0x0002 <CP2102N USB to UART Bridge Controller> iSerialNumber = 0x0003 <0412059a13d6eb11aaba063644d319e3> bNumConfigurations = 0x0001
ttyname
root@kg-core1:~ # sysctl dev.uslcom.0.ttyname dev.uslcom.0.ttyname: U0
list ttys
root@kg-core1:~ # ll /dev/cuaU* /dev/ttyU* crw-rw---- 1 uucp dialer 0x1ad May 23 22:04 /dev/cuaU0 crw-rw---- 1 uucp dialer 0x1ba May 23 22:04 /dev/cuaU0.init crw-rw---- 1 uucp dialer 0x1be May 23 22:04 /dev/cuaU0.lock crw------- 1 root wheel 0xb2 May 23 22:04 /dev/ttyU0 crw------- 1 root wheel 0x1ab May 23 22:04 /dev/ttyU0.init crw------- 1 root wheel 0x1ac May 23 22:04 /dev/ttyU0.lock
and usb files
root@kg-core1:~ # ls -l /dev/ugen3.4 /dev/usb/3.4* lrwxr-xr-x 1 root wheel 9 May 23 22:04 /dev/ugen3.4 -> usb/3.4.0 crw------- 1 root operator 0xac May 23 22:04 /dev/usb/3.4.0 crw------- 1 root operator 0xaf May 23 22:04 /dev/usb/3.4.2
now try probe-run
tingo@kg-core1:~/personal/projects/2023/rust/embedded/riscv $ probe-run --list-probes Error: no probe was found. Common reasons for this are faulty cables or missing permissions. For detailed instructions, visit: https://github.com/knurling-rs/probe-run#troubleshooting tingo@kg-core1:~/personal/projects/2023/rust/embedded/riscv $ sudo probe-run --list-probes Error: no probe was found. Common reasons for this are faulty cables or missing permissions. For detailed instructions, visit: https://github.com/knurling-rs/probe-run#troubleshooting
ok, probe-run doesn't work.
2023-05-23: I created this page.
2023-05-22: I received the package from Mouser.
2023-05-16: the order was shipped.
2023-05-15: I ordered a ESP32-C3-DevKitC-02 (356-ESP32C3DEVKITC02)from Mouser, price was NOK 93.91.