ESP32-C3-DevKitC-02
The ESP32-C3-DevKitC-02 is an entry-level development board.
- SoC: ESP32-C3-WROOM-02
- RGB LED
- micro USB
back to microcontrollers page.
Links
Espressif Systems ESP32-C3-DevKitC-02 User Guide,
crates.io mandown lib.rs mandown,
local links
History
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.