ESP32-C3-DevKit-RUST-1 board

I bought a ESP32-C3-DevKit-RUST-1 devkit aka the RUST ESP board.

  • SoC: ESP32-C3-MINI-1
  • 6DoF IMU
  • a temperature and humidity sensor
  • a Li-Ion battery charger
  • Type-C USB

features

  • 32-bit RISC-V single-core processor, up to 160MHz
  • 384KB ROM
  • 400KB SRAM (16KB for cache)
  • 8KB SRAM in RTC
  • 22× programmable GPIOs
  • 3× SPI
  • 2× UART
  • 1× I2C
  • 1× I2S
  • 1× TWAI
  • 2× 12-bit SAR ADCs, up to 6 channels
  • 1× temperature sensor
  • Full-speed USB Serial/JTAG controller
  • General DMA controller (GDMA)
  • LED PWM controller (LEDC)
  • Remote Control Peripheral (RMT)
  • 1× 52-bit system timer
  • 2× 54-bit general-purpose timers
  • 3× watchdog timers

wireless

  • IEEE 802.11 b/g/n-compliant
  • bluetooth 5, Bluetooth mesh

pins on the board

left  right
Reset             1   1  VBAT
3V3               2   2  EN - LDO enable
NC                3   3  VBUS
GND               4   4  NC
IO0 / ADC1-0      5   5  NC
IO1 / ADC1-1      6   6  NC
IO2 / ADC1-2      7   7  NC
IO3 / ADC1-3      8   8  NC
IO4 / ADC2-0      9   9  IO18 / USB_D-
IO5 / ADC2-1     10  10  IO19 / USB_D+
IO6 / MTCK       11  11  IO8  / SCL
IO7 / MTDO / LED 12  12  IO10 / SDA
IO8 / LOG        13  
IO21 / U0RXD     14  
IO20 / U0TXD     15  
IO9 / BOOT       16  

I2C bus

  • SDA GPIO10
  • SCL GPIO8

I2C peripherals

  • 0x68 IMU ICM-42670-P
  • 0x70 Temperature and Humidity SHTC3

other peripherals

  • WS2812 LED GPIO2
  • LED GPIO7
  • button / boot GPIO9

back to microcontrollers page.

Links

Espressif Systems ESP32-C3-DevKit-RUST-1, Github Rust ESP board User Guide, hardware, Ferrous Systems Espressif trainings, Mouser info about ESP32-C3-DevKit-RUST-1 Board, esp-rs esp-generate, awesome-embedded-rust, crates.io mandown lib.rs mandown,

local links

c1, c2, eb, vm4,

History

2024-11-26: c2 - esp-generate a new project

tingo@kg-core2:~/personal/projects/2024/rust/embedded/riscv/ESP32-C3-DevKit-RUST-1 $ esp-generate --chip esp32c3 esp32c3-hello

tingo@kg-core2:~/personal/projects/2024/rust/embedded/riscv/ESP32-C3-DevKit-RUST-1 $ l
./             ../            esp32c3-hello/

check it out

tingo@kg-core2:~/personal/projects/2024/rust/embedded/riscv/ESP32-C3-DevKit-RUST-1 $ cd esp32c3-hello/

try to build it

tingo@kg-core2:~/personal/projects/2024/rust/embedded/riscv/ESP32-C3-DevKit-RUST-1/esp32c3-hello $ cargo build
    Updating crates.io index
     Locking 113 packages to latest compatible versions
      Adding embedded-hal v0.2.7 (latest: v1.0.0)
      Adding nb v0.1.3 (latest: v1.1.0)
  Downloaded bitfield v0.17.0
  Downloaded embassy-futures v0.1.1
  Downloaded embassy-time v0.3.2
  Downloaded critical-section v1.2.0
  Downloaded embedded-storage-async v0.4.1
  Downloaded ufmt-write v0.1.0
  Downloaded esp-build v0.1.0
  Downloaded riscv-rt-macros v0.2.2
  Downloaded proc-macro-crate v3.2.0
  Downloaded embedded-hal-nb v1.0.0
  Downloaded embedded-hal-async v1.0.0
  Downloaded document-features v0.2.10
  Downloaded enumset_derive v0.10.0
  Downloaded delegate v0.13.1
  Downloaded futures-sink v0.3.31
  Downloaded esp-hal-procmacros v0.15.0
  Downloaded serde_spanned v0.6.8
  Downloaded proc-macro-error2 v2.0.1
  Downloaded proc-macro-error-attr2 v2.0.0
  Downloaded indexmap v2.6.0
  Downloaded futures-core v0.3.31
  Downloaded embedded-hal v1.0.0
  Downloaded embassy-sync v0.6.1
  Downloaded bytemuck v1.20.0
  Downloaded enumset v1.1.5
  Downloaded futures-task v0.3.31
  Downloaded esp-config v0.2.0
  Downloaded embedded-storage v0.3.1
  Downloaded embedded-io-async v0.6.1
  Downloaded toml_edit v0.22.22
  Downloaded winnow v0.6.20
  Downloaded futures-util v0.3.31
  Downloaded embedded-can v0.4.1
  Downloaded embassy-time-driver v0.1.0
  Downloaded esp-hal v0.22.0
  Downloaded embassy-embedded-hal v0.2.0
  Downloaded riscv-pac v0.2.0
  Downloaded embassy-time-queue-driver v0.1.0
  Downloaded esp-riscv-rt v0.9.1
  Downloaded esp-backtrace v0.14.2
  Downloaded esp-println v0.12.0
  Downloaded riscv-macros v0.1.0
  Downloaded riscv v0.12.1
  Downloaded esp32c3 v0.26.0
  Downloaded 44 crates (2.1 MB) in 1.50s
   Compiling proc-macro2 v1.0.92
   Compiling unicode-ident v1.0.14
   Compiling termcolor v1.4.1
   Compiling rustversion v1.0.18
   Compiling critical-section v1.2.0
   Compiling serde v1.0.215
   Compiling heck v0.5.0
   Compiling fnv v1.0.7
   Compiling embedded-hal v1.0.0
   Compiling strsim v0.11.1
   Compiling anyhow v1.0.93
   Compiling ident_case v1.0.1
   Compiling nb v1.1.0
   Compiling byteorder v1.5.0
   Compiling heapless v0.8.0
   Compiling log v0.4.22
   Compiling embedded-hal-async v1.0.0
   Compiling embassy-time-queue-driver v0.1.0
   Compiling hash32 v0.3.1
   Compiling equivalent v1.0.1
   Compiling hashbrown v0.15.2
   Compiling pin-project-lite v0.2.15
   Compiling pin-utils v0.1.0
   Compiling portable-atomic v1.10.0
   Compiling paste v1.0.15
   Compiling futures-core v0.3.31
   Compiling futures-task v0.3.31
   Compiling embedded-io-async v0.6.1
   Compiling embassy-time-driver v0.1.0
   Compiling stable_deref_trait v1.2.0
   Compiling autocfg v1.4.0
   Compiling futures-util v0.3.31
   Compiling nb v0.1.3
   Compiling embassy-sync v0.6.1
   Compiling void v1.0.2
   Compiling riscv v0.12.1
   Compiling cfg-if v1.0.0
   Compiling winnow v0.6.20
   Compiling embedded-io v0.6.1
   Compiling toml_datetime v0.6.8
   Compiling quote v1.0.37
   Compiling litrs v0.4.1
   Compiling indexmap v2.6.0
   Compiling embedded-hal v0.2.7
   Compiling syn v2.0.89
   Compiling num-traits v0.2.19
   Compiling esp32c3 v0.26.0
   Compiling embedded-storage v0.3.1
   Compiling futures-sink v0.3.31
   Compiling riscv-pac v0.2.0
   Compiling embedded-storage-async v0.4.1
   Compiling gcd v2.3.0
   Compiling proc-macro-error-attr2 v2.0.0
   Compiling vcell v0.1.3
   Compiling embassy-futures v0.1.1
   Compiling fugit v0.3.7
   Compiling embedded-hal-nb v1.0.0
   Compiling embedded-can v0.4.1
   Compiling bitflags v2.6.0
   Compiling document-features v0.2.10
   Compiling ufmt-write v0.1.0
   Compiling bytemuck v1.20.0
   Compiling rand_core v0.6.4
   Compiling esp32c3-hello v0.1.0 (/zs/tingo/personal/projects/2024/rust/embedded/riscv/ESP32-C3-DevKit-RUST-1/esp32c3-hello)
   Compiling bitfield v0.17.0
   Compiling esp-config v0.2.0
   Compiling embassy-time v0.3.2
   Compiling chrono v0.4.38
   Compiling toml_edit v0.22.22
   Compiling embassy-embedded-hal v0.2.0
   Compiling proc-macro-crate v3.2.0
   Compiling darling_core v0.20.10
   Compiling proc-macro-error2 v2.0.1
   Compiling esp-build v0.1.0
   Compiling strum_macros v0.26.4
   Compiling serde_derive v1.0.215
   Compiling riscv-macros v0.1.0
   Compiling riscv-rt-macros v0.2.2
   Compiling delegate v0.13.1
   Compiling esp-println v0.12.0
   Compiling esp-backtrace v0.14.2
   Compiling darling_macro v0.20.10
   Compiling esp-riscv-rt v0.9.1
   Compiling darling v0.20.10
   Compiling enumset_derive v0.10.0
   Compiling esp-hal-procmacros v0.15.0
   Compiling strum v0.26.3
   Compiling enumset v1.1.5
   Compiling basic-toml v0.1.9
   Compiling esp-metadata v0.4.0
   Compiling esp-hal v0.22.0


WARNING: use --release
  We *strongly* recommend using release profile when building esp-hal.
  The dev profile can potentially be one or more orders of magnitude
  slower than release, and may cause issues with timing-senstive
  peripherals and/or devices.

    Finished `dev` profile [optimized + debuginfo] target(s) in 20.78s

and try to run it

tingo@kg-core2:~/personal/projects/2024/rust/embedded/riscv/ESP32-C3-DevKit-RUST-1/esp32c3-hello $ cargo run


WARNING: use --release
  We *strongly* recommend using release profile when building esp-hal.
  The dev profile can potentially be one or more orders of magnitude
  slower than release, and may cause issues with timing-senstive
  peripherals and/or devices.

    Finished `dev` profile [optimized + debuginfo] target(s) in 0.03s
     Running `espflash flash --monitor target/riscv32imc-unknown-none-elf/debug/main`
[2024-11-26T19:43:47Z INFO ] 🚀 A new version of espflash is available: v3.2.0
[2024-11-26T19:43:47Z INFO ] Detected 2 serial ports
[2024-11-26T19:43:47Z INFO ] Ports which match a known common dev board are highlighted
[2024-11-26T19:43:47Z INFO ] Please select a port
[2024-11-26T19:43:57Z INFO ] Serial port: '/dev/cuaU0'
[2024-11-26T19:43:57Z INFO ] Connecting...
[2024-11-26T19:43:58Z INFO ] Using flash stub
Chip type:         esp32c3 (revision v0.4)
Crystal frequency: 40MHz
Flash size:        4MB
Features:          WiFi, BLE
MAC address:       34:85:18:01:62:40
App/part. size:    82,784/4,128,768 bytes, 2.01%
[00:00:00] [========================================]      13/13      0x0                                                             [00:00:00] [========================================]       1/1       0x8000                                                          [00:00:00] [========================================]      16/16      0x10000                                                         [2024-11-26T19:43:59Z INFO ] Flashing has completed!
Commands:
    CTRL+R    Reset chip
    CTRL+C    Exit

ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0xc (SPI_FAST_FLASH_BOOT)
Saved PC:0x40380832
0x40380832 - $d
    at ??:??
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 (43) boot: ESP-IDF v5.1-beta1-378-gea5e0ff298-dirt 2nd stage bootloader
I (43) boot: compile time Jun  7 2023 07:59:10
I (44) boot: chip revision: v0.4
I (48) boot.esp32c3: SPI Speed      : 40MHz
I (53) boot.esp32c3: SPI Mode       : DIO
I (57) boot.esp32c3: SPI Flash Size : 4MB
I (62) boot: Enabling RNG early entropy source...
I (68) boot: Partition Table:
I (71) boot: ## Label            Usage          Type ST Offset   Length
I (78) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (86) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (93) boot:  2 factory          factory app      00 00 00010000 003f0000
I (101) boot: End of partition table
I (105) esp_image: segment 0: paddr=00010020 vaddr=3c010020 size=01b84h (  7044) map
I (115) esp_image: segment 1: paddr=00011bac vaddr=3fc80894 size=003dch (   988) load
I (122) esp_image: segment 2: paddr=00011f90 vaddr=40380000 size=00894h (  2196) load
I (131) esp_image: segment 3: paddr=0001282c vaddr=00000000 size=0d7ech ( 55276) 
I (151) esp_image: segment 4: paddr=00020020 vaddr=42000020 size=0431ch ( 17180) map
I (155) boot: Loaded app from partition at offset 0x10000
I (155) 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!
INFO - Hello world!
INFO - Hello world!
INFO - Hello world!
INFO - Hello world!

yes, worked until I hit Ctrl-C. Nice.

2024-11-26: c2 - install esp-generate

tingo@kg-core2:~/personal/projects/2024/rust/embedded/riscv $ cargo install esp-generate
    Updating crates.io index
  Downloaded esp-generate v0.2.1
  Downloaded 1 crate (25.5 KB) in 0.13s
  Installing esp-generate v0.2.1
    Updating crates.io index
     Locking 120 packages to latest compatible versions
      Adding hermit-abi v0.3.9 (latest: v0.4.0)
      Adding linux-raw-sys v0.4.14 (latest: v0.6.5)
      Adding unicode-truncate v1.1.0 (latest: v2.0.0)
      Adding unicode-width v0.1.14 (latest: v0.2.0)
      Adding wasi v0.11.0+wasi-snapshot-preview1 (latest: v0.13.3+wasi-0.2.2)
      Adding windows-sys v0.52.0 (latest: v0.59.0)
      Adding zerocopy v0.7.35 (latest: v0.8.11)
      Adding zerocopy-derive v0.7.35 (latest: v0.8.11)
  Downloaded allocator-api2 v0.2.20
  Downloaded darling_macro v0.20.10
  Downloaded anstream v0.6.18
  Downloaded colorchoice v1.0.3
  Downloaded clap_lex v0.7.3
  Downloaded castaway v0.2.3
  Downloaded anstyle-parse v0.2.6
  Downloaded foldhash v0.1.3
  Downloaded instability v0.3.3
  Downloaded anstyle-query v1.1.2
  Downloaded anstyle v1.0.10
  Downloaded darling v0.20.10
  Downloaded unicode-truncate v1.1.0
  Downloaded rustversion v1.0.18
  Downloaded itoa v1.0.14
  Downloaded signal-hook-mio v0.2.4
  Downloaded once_cell v1.20.2
  Downloaded lru v0.12.5
  Downloaded basic-toml v0.1.9
  Downloaded thin-vec v0.2.13
  Downloaded rhai_codegen v2.2.0
  Downloaded proc-macro2 v1.0.92
  Downloaded unicode-ident v1.0.14
  Downloaded clap v4.5.21
  Downloaded anyhow v1.0.93
  Downloaded serde_derive v1.0.215
  Downloaded compact_str v0.8.0
  Downloaded serde v1.0.215
  Downloaded darling_core v0.20.10
  Downloaded unicode-segmentation v1.12.0
  Downloaded hashbrown v0.15.2
  Downloaded crossterm v0.28.1
  Downloaded clap_builder v4.5.21
  Downloaded portable-atomic v1.10.0
  Downloaded regex v1.11.1
  Downloaded unicode-width v0.2.0
  Downloaded unicode-width v0.1.14
  Downloaded syn v2.0.89
  Downloaded rhai v1.20.0
  Downloaded rustix v0.38.41
  Downloaded regex-syntax v0.8.5
  Downloaded ratatui v0.29.0
  Downloaded regex-automata v0.4.9
  Downloaded libc v0.2.165
  Downloaded esp-metadata v0.4.0
  Downloaded 45 crates (5.7 MB) in 0.77s
   Compiling proc-macro2 v1.0.92
   Compiling unicode-ident v1.0.14
   Compiling libc v0.2.165
   Compiling autocfg v1.4.0
   Compiling rustversion v1.0.18
   Compiling cfg-if v1.0.0
   Compiling crunchy v0.2.2
   Compiling version_check v0.9.5
   Compiling tiny-keccak v2.0.2
   Compiling utf8parse v0.2.2
   Compiling log v0.4.22
   Compiling heck v0.5.0
   Compiling anstyle-parse v0.2.6
   Compiling colorchoice v1.0.3
   Compiling memchr v2.7.4
   Compiling strsim v0.11.1
   Compiling parking_lot_core v0.9.10
   Compiling is_terminal_polyfill v1.70.1
   Compiling signal-hook v0.3.17
   Compiling anstyle-query v1.1.2
   Compiling portable-atomic v1.10.0
   Compiling smallvec v1.13.2
   Compiling anstyle v1.0.10
   Compiling fnv v1.0.7
   Compiling ident_case v1.0.1
   Compiling lock_api v0.4.12
   Compiling static_assertions v1.1.0
   Compiling scopeguard v1.2.0
   Compiling regex-syntax v0.8.5
   Compiling anstream v0.6.18
   Compiling serde v1.0.215
   Compiling rustix v0.38.41
   Compiling bitflags v2.6.0
   Compiling once_cell v1.20.2
   Compiling quote v1.0.37
   Compiling aho-corasick v1.1.3
   Compiling syn v2.0.89
   Compiling getrandom v0.2.15
   Compiling num-traits v0.2.19
   Compiling smartstring v1.0.1
   Compiling const-random-macro v0.1.16
   Compiling ahash v0.8.11
   Compiling yansi v1.0.1
   Compiling allocator-api2 v0.2.20
   Compiling diff v0.1.13
   Compiling equivalent v1.0.1
   Compiling clap_lex v0.7.3
   Compiling paste v1.0.15
   Compiling either v1.13.0
   Compiling anyhow v1.0.93
   Compiling foldhash v0.1.3
   Compiling clap_builder v4.5.21
   Compiling itertools v0.13.0
   Compiling hashbrown v0.15.2
   Compiling pretty_assertions v1.4.1
   Compiling const-random v0.1.18
   Compiling castaway v0.2.3
   Compiling signal-hook-registry v1.4.2
   Compiling errno v0.3.9
   Compiling mio v1.0.2
   Compiling regex-automata v0.4.9
   Compiling parking_lot v0.12.3
   Compiling signal-hook-mio v0.2.4
   Compiling unicode-segmentation v1.12.0
   Compiling indoc v2.0.5
   Compiling itoa v1.0.14
   Compiling ryu v1.0.18
   Compiling unicode-width v0.1.14
   Compiling zerocopy v0.7.35
   Compiling compact_str v0.8.0
   Compiling crossterm v0.28.1
   Compiling lru v0.12.5
   Compiling unicode-truncate v1.1.0
   Compiling unicode-width v0.2.0
   Compiling thin-vec v0.2.13
   Compiling cassowary v0.3.0
   Compiling humantime v2.1.0
   Compiling darling_core v0.20.10
   Compiling regex v1.11.1
   Compiling env_filter v0.1.2
   Compiling env_logger v0.11.5
   Compiling serde_derive v1.0.215
   Compiling strum_macros v0.26.4
   Compiling clap_derive v4.5.18
   Compiling rhai_codegen v2.2.0
   Compiling darling_macro v0.20.10
   Compiling darling v0.20.10
   Compiling instability v0.3.3
   Compiling rhai v1.20.0
   Compiling clap v4.5.21
   Compiling strum v0.26.3
   Compiling ratatui v0.29.0
   Compiling basic-toml v0.1.9
   Compiling esp-metadata v0.4.0
   Compiling esp-generate v0.2.1
    Finished `release` profile [optimized] target(s) in 38.91s
  Installing /home/tingo/.cargo/bin/esp-generate
   Installed package `esp-generate v0.2.1` (executable `esp-generate`)

help text

tingo@kg-core2:~/personal/projects/2024/rust/embedded/riscv $ 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

2024-11-26: c2 - connecting up the rust-board again:

tingo@kg-core2:~/personal/projects/2024/rust/embedded/riscv $ sysctl dev.umodem.0.ttyname
dev.umodem.0.ttyname: U0
tingo@kg-core2:~/personal/projects/2024/rust/embedded/riscv $ cargo espflash board-info --port /dev/cuaU0
[2024-11-26T19:16:14Z INFO ] 🚀 A new version of cargo-espflash is available: v3.2.0
[2024-11-26T19:16:14Z INFO ] Serial port: '/dev/cuaU0'
[2024-11-26T19:16:14Z INFO ] Connecting...
[2024-11-26T19:16:14Z INFO ] Using flash stub
Chip type:         esp32c3 (revision v0.4)
Crystal frequency: 40MHz
Flash size:        4MB
Features:          WiFi, BLE
MAC address:       34:85:18:01:62:40

how about probe-run?

tingo@kg-core2:~/personal/projects/2024/rust/embedded/riscv $ probe-run --list-probes
the following probes were found:
[0]: ESP JTAG (VID: 303a, PID: 1001, Serial: 34:85:18:01:62:40, EspJtag)

even probe-rs

tingo@kg-core2:~/personal/projects/2024/rust/embedded/riscv $ probe-rs list
The following debug probes were found:
[0]: ESP JTAG (VID: 303a, PID: 1001, Serial: 34:85:18:01:62:40, EspJtag)

2023-12-20: c2 - I have a 1.28 inch round TFT display (the box is labeled 30420), 240 x 240, GC9A01 driver, 4 wire SPI. The pins are labeled (top to bottom): RST, CS, DC, SDA, SCL, GND, VCC. There are crates: gc9a01-rs, gc9a01a,

2023-12-15: c2 - also works nicely with rustc 1.74

tingo@kg-core2:~/personal/projects/2023/rust/embedded/riscv/ESP32-C3-DevKit-RUST-1/esp32c3-blink $ rustc --version
rustc 1.74.0 (79e9716c9 2023-11-13)

test hello world

tingo@kg-core2:~/personal/projects/2023/rust/embedded/riscv/ESP32-C3-DevKit-RUST-1/esp32c3-blink $ cargo run --example hello
   Compiling esp32c3-blink v0.1.0 (/zs/tingo/personal/projects/2023/rust/embedded/riscv/ESP32-C3-DevKit-RUST-1/esp32c3-blink)
    Finished dev [unoptimized + debuginfo] target(s) in 0.14s
     Running `espflash flash --monitor target/riscv32imc-unknown-none-elf/debug/examples/hello`
[2023-12-15T19:41:24Z INFO ] Detected 2 serial ports
[2023-12-15T19:41:24Z INFO ] Ports which match a known common dev board are highlighted
[2023-12-15T19:41:24Z INFO ] Please select a port
[2023-12-15T19:41:27Z INFO ] Serial port: '/dev/cuaU0'
[2023-12-15T19:41:27Z INFO ] Connecting...
[2023-12-15T19:41:27Z INFO ] Using flash stub
Chip type:         esp32c3 (revision v0.4)
Crystal frequency: 40MHz
Flash size:        4MB
Features:          WiFi, BLE
MAC address:       34:85:18:01:62:40
App/part. size:    153,696/4,128,768 bytes, 3.72%
[00:00:00] [========================================]      13/13      0x0                                                                                                [00:00:00] [========================================]       1/1       0x8000                                                                                             [00:00:01] [========================================]      48/48      0x10000                                                                                            [2023-12-15T19:41:29Z INFO ] Flashing has completed!
Commands:
    CTRL+R    Reset chip
    CTRL+C    Exit

ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0xc (SPI_FAST_FLASH_BOOT)
Saved PC:0x40380836
0x40380836 - esp_hal_common::interrupt::riscv::vectored::handle_interrupts
    at /home/tingo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/esp-hal-common-0.13.1/src/interrupt/riscv.rs:214
SPIWP:0xee
mode:DIO, clock div:2
load:0x3fcd5820,len:0x171c
0x3fcd5820 - _stack_start
    at ??:??
load:0x403cc710,len:0x968
0x403cc710 - 
    at ??:??
load:0x403ce710,len:0x2f68
0x403ce710 - 
    at ??:??
SHA-256 comparison failed:
Calculated: 1d06b938c0222bf626e0bdf46178b1b37ab24d03f0360fc8fcf7153c2571deaf
Expected: 68d7bdf643ba446b8ed7ae8423241d442fd052b2bc77091100ba06fd65dcf8d5
Attempting to boot anyway...
entry 0x403cc710
0x403cc710 - 
    at ??:??
I (43) boot: ESP-IDF v5.1-beta1-378-gea5e0ff298-dirt 2nd stage bootloader
I (43) boot: compile time Jun  7 2023 07:59:10
I (44) boot: chip revision: v0.4
I (48) boot.esp32c3: SPI Speed      : 40MHz
I (53) boot.esp32c3: SPI Mode       : DIO
I (57) boot.esp32c3: SPI Flash Size : 4MB
I (62) boot: Enabling RNG early entropy source...
I (68) boot: Partition Table:
I (71) boot: ## Label            Usage          Type ST Offset   Length
I (78) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (86) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (93) boot:  2 factory          factory app      00 00 00010000 003f0000
I (101) boot: End of partition table
I (105) esp_image: segment 0: paddr=00010020 vaddr=3c020020 size=02a80h ( 10880) map
I (116) esp_image: segment 1: paddr=00012aa8 vaddr=40380000 size=00f9ch (  3996) load
I (123) esp_image: segment 2: paddr=00013a4c vaddr=00000000 size=0c5cch ( 50636) 
I (141) esp_image: segment 3: paddr=00020020 vaddr=42000020 size=15818h ( 88088) map
I (161) boot: Loaded app from partition at offset 0x10000
I (161) boot: Disabling RNG early entropy source...
Hello world!

test blinky

tingo@kg-core2:~/personal/projects/2023/rust/embedded/riscv/ESP32-C3-DevKit-RUST-1/esp32c3-blink $ cargo run
    Finished dev [unoptimized + debuginfo] target(s) in 0.03s
     Running `espflash flash --monitor target/riscv32imc-unknown-none-elf/debug/esp32c3-blink`
[2023-12-15T19:45:30Z INFO ] Detected 2 serial ports
[2023-12-15T19:45:30Z INFO ] Ports which match a known common dev board are highlighted
[2023-12-15T19:45:30Z INFO ] Please select a port
[2023-12-15T19:45:34Z INFO ] Serial port: '/dev/cuaU0'
[2023-12-15T19:45:34Z INFO ] Connecting...
[2023-12-15T19:45:34Z INFO ] Using flash stub
Chip type:         esp32c3 (revision v0.4)
Crystal frequency: 40MHz
Flash size:        4MB
Features:          WiFi, BLE
MAC address:       34:85:18:01:62:40
App/part. size:    164,912/4,128,768 bytes, 3.99%
[00:00:00] [========================================]      13/13      0x0                                                                                                [00:00:00] [========================================]       1/1       0x8000                                                                                             [00:00:01] [========================================]      52/52      0x10000                                                                                            [2023-12-15T19:45:36Z INFO ] Flashing has completed!
Commands:
    CTRL+R    Reset chip
    CTRL+C    Exit

ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0xc (SPI_FAST_FLASH_BOOT)
Saved PC:0x40380832
0x40380832 - esp_hal_common::interrupt::riscv::vectored::handle_interrupts
    at /home/tingo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/esp-hal-common-0.13.1/src/interrupt/riscv.rs:214
SPIWP:0xee
mode:DIO, clock div:2
load:0x3fcd5820,len:0x171c
0x3fcd5820 - _stack_start
    at ??:??
load:0x403cc710,len:0x968
0x403cc710 - 
    at ??:??
load:0x403ce710,len:0x2f68
0x403ce710 - 
    at ??:??
SHA-256 comparison failed:
Calculated: 1d06b938c0222bf626e0bdf46178b1b37ab24d03f0360fc8fcf7153c2571deaf
Expected: 68d7bdf643ba446b8ed7ae8423241d442fd052b2bc77091100ba06fd65dcf8d5
Attempting to boot anyway...
entry 0x403cc710
0x403cc710 - 
    at ??:??
I (43) boot: ESP-IDF v5.1-beta1-378-gea5e0ff298-dirt 2nd stage bootloader
I (43) boot: compile time Jun  7 2023 07:59:10
I (44) boot: chip revision: v0.4
I (48) boot.esp32c3: SPI Speed      : 40MHz
I (53) boot.esp32c3: SPI Mode       : DIO
I (57) boot.esp32c3: SPI Flash Size : 4MB
I (62) boot: Enabling RNG early entropy source...
I (68) boot: Partition Table:
I (71) boot: ## Label            Usage          Type ST Offset   Length
I (78) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (86) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (93) boot:  2 factory          factory app      00 00 00010000 003f0000
I (101) boot: End of partition table
I (105) esp_image: segment 0: paddr=00010020 vaddr=3c020020 size=02e00h ( 11776) map
I (116) esp_image: segment 1: paddr=00012e28 vaddr=40380000 size=00f9ch (  3996) load
I (123) esp_image: segment 2: paddr=00013dcc vaddr=00000000 size=0c24ch ( 49740) 
I (141) esp_image: segment 3: paddr=00020020 vaddr=42000020 size=183e0h ( 99296) map
I (163) boot: Loaded app from partition at offset 0x10000
I (164) boot: Disabling RNG early entropy source...
Hello world!

2023-12-14: c2 - ok, I needed cargo-generate and espflash cargo install espflash too, now I can do stuff like

tingo@kg-core2:~/personal/projects/2023/rust/embedded/riscv/ESP32-C3-DevKit-RUST-1/esp32c3-blink $ cargo run
    Finished dev [unoptimized + debuginfo] target(s) in 0.06s
     Running `espflash flash --monitor target/riscv32imc-unknown-none-elf/debug/esp32c3-blink`
[2023-12-14T19:31:11Z INFO ] Detected 2 serial ports
[2023-12-14T19:31:11Z INFO ] Ports which match a known common dev board are highlighted
[2023-12-14T19:31:11Z INFO ] Please select a port
[2023-12-14T19:31:14Z INFO ] Serial port: '/dev/cuaU0'
[2023-12-14T19:31:14Z INFO ] Connecting...
[2023-12-14T19:31:14Z INFO ] Using flash stub
Chip type:         esp32c3 (revision v0.4)
Crystal frequency: 40MHz
Flash size:        4MB
Features:          WiFi, BLE
MAC address:       34:85:18:01:62:40
App/part. size:    225,712/4,128,768 bytes, 5.47%
[00:00:00] [========================================]      13/13      0x0                                                                                                [00:00:00] [========================================]       1/1       0x8000                                                                                             [00:00:01] [========================================]      73/73      0x10000                                                                                            [2023-12-14T19:31:17Z INFO ] Flashing has completed!
Commands:
    CTRL+R    Reset chip
    CTRL+C    Exit

ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0xc (SPI_FAST_FLASH_BOOT)
Saved PC:0x40380836
0x40380836 - esp_hal_common::interrupt::riscv::vectored::handle_interrupts
    at /home/tingo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/esp-hal-common-0.13.1/src/interrupt/riscv.rs:214
SPIWP:0xee
mode:DIO, clock div:2
load:0x3fcd5820,len:0x171c
0x3fcd5820 - _stack_start
    at ??:??
load:0x403cc710,len:0x968
0x403cc710 - 
    at ??:??
load:0x403ce710,len:0x2f68
0x403ce710 - 
    at ??:??
SHA-256 comparison failed:
Calculated: 1d06b938c0222bf626e0bdf46178b1b37ab24d03f0360fc8fcf7153c2571deaf
Expected: 68d7bdf643ba446b8ed7ae8423241d442fd052b2bc77091100ba06fd65dcf8d5
Attempting to boot anyway...
entry 0x403cc710
0x403cc710 - 
    at ??:??
I (43) boot: ESP-IDF v5.1-beta1-378-gea5e0ff298-dirt 2nd stage bootloader
I (43) boot: compile time Jun  7 2023 07:59:10
I (44) boot: chip revision: v0.4
I (48) boot.esp32c3: SPI Speed      : 40MHz
I (53) boot.esp32c3: SPI Mode       : DIO
I (57) boot.esp32c3: SPI Flash Size : 4MB
I (62) boot: Enabling RNG early entropy source...
I (68) boot: Partition Table:
I (71) boot: ## Label            Usage          Type ST Offset   Length
I (78) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (86) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (93) boot:  2 factory          factory app      00 00 00010000 003f0000
I (101) boot: End of partition table
I (105) esp_image: segment 0: paddr=00010020 vaddr=3c030020 size=05e74h ( 24180) map
I (119) esp_image: segment 1: paddr=00015e9c vaddr=40380000 size=00f9ch (  3996) load
I (123) esp_image: segment 2: paddr=00016e40 vaddr=00000000 size=091d8h ( 37336) 
I (138) esp_image: segment 3: paddr=00020020 vaddr=42000020 size=27160h (160096) map
I (174) boot: Loaded app from partition at offset 0x10000
I (174) boot: Disabling RNG early entropy source...
Hello world!
Loop...
Loop...
Loop...
Loop...
Loop...
Loop...
Loop...
Loop...
Loop...
Loop...

after doing

tingo@kg-core2:~/personal/projects/2023/rust/embedded/riscv/ESP32-C3-DevKit-RUST-1/esp32c3-blink $ cargo generate esp-rs/esp-template
[..]

nice!

2023-12-14: c2 - next up is probe-rs, installed with cargo install probe-rs --features cli and fixing the devd script, I can do

tingo@kg-core2:~/personal/projects/2023/rust/embedded/riscv $ probe-rs list
The following debug probes were found:
[0]: ESP JTAG (VID: 303a, PID: 1001, Serial: 34:85:18:01:62:40, EspJtag)

and

tingo@kg-core2:~/personal/projects/2023/rust/embedded/riscv $ probe-rs info
Probing target via JTAG

No DAP interface was found on the connected probe. Thus, ARM info cannot be printed.
RISCV Chip:
    IDCODE: 0000005c25
     Version:      0
     Part:         5
     Manufacturer: 1554 (Espressif Systems (Shanghai)  Co Ltd)

Probing target via SWD

Error identifying target using protocol SWD: Probe does not support SWD

2023-12-14: c2 - do cargo insatall cargo-espflash then

tingo@kg-core2:~/personal/projects/2023/rust/embedded/riscv $ cargo espflash board-info --port /dev/cuaU0
[2023-12-14T18:27:16Z INFO ] Serial port: '/dev/cuaU0'
[2023-12-14T18:27:16Z INFO ] Connecting...
[2023-12-14T18:27:16Z INFO ] Using flash stub
Chip type:         esp32c3 (revision v0.4)
Crystal frequency: 40MHz
Flash size:        4MB
Features:          WiFi, BLE
MAC address:       34:85:18:01:62:40

and

tingo@kg-core2:~/personal/projects/2023/rust/embedded/riscv $ cargo espflash board-info --version
cargo-espflash-espflash-board-info 2.1.0

2023-11-30: eb - probe-rs testing

tingo@kg-elitebook$ probe-rs --help
The probe-rs CLI

Usage: probe-rs [OPTIONS] <COMMAND>

Commands:
  dap-server  Debug Adapter Protocol (DAP) server. See https://probe.rs/docs/tools/vscode/
  list        List all connected debug probes
  info        Gets info about the selected debug probe and connected target
  reset       Resets the target attached to the selected debug probe
  gdb         Run a GDB server
  debug       Basic command line debugger
  download    Download memory to attached target
  erase       Erase all nonvolatile memory of attached target
  run         Flash and run an ELF program
  attach      Attach to rtt logging
  trace       Trace a memory location on the target
  itm         Configure and monitor ITM trace packets from the target
  chip        Inspect internal registry of supported chips
  benchmark   Measure the throughput of the selected debug probe
  profile     Profile on-target runtime performance of target ELF program
  read        Read from target memory address
  write       Write to target memory address
  help        Print this message or the help of the given subcommand(s)

Options:
      --log-file <LOG_FILE>
          Location for log file

          If no location is specified, the log file will be stored in a default directory.

  -h, --help
          Print help (see a summary with '-h')

  -V, --version
          Print version

tingo@kg-elitebook$ probe-rs list
The following debug probes were found:
[0]: ESP JTAG (VID: 303a, PID: 1001, Serial: 34:85:18:01:62:40, EspJtag)

tingo@kg-elitebook$ probe-rs info
Probing target via JTAG

No DAP interface was found on the connected probe. Thus, ARM info cannot be printed.
RISCV Chip:
    IDCODE: 0000005c25
     Version:      0
     Part:         5
     Manufacturer: 1554 (Espressif Systems (Shanghai)  Co Ltd)

Probing target via SWD

Error identifying target using protocol SWD: Probe does not support SWD

tingo@kg-elitebook$ sudo probe-rs info
Probing target via JTAG

No DAP interface was found on the connected probe. Thus, ARM info cannot be printed.
RISCV Chip:
    IDCODE: 0000005c25
     Version:      0
     Part:         5
     Manufacturer: 1554 (Espressif Systems (Shanghai)  Co Ltd)

Probing target via SWD

Error identifying target using protocol SWD: Probe does not support SWD

2023-11-30: eb - rust install probe-rs

tingo@kg-elitebook$ cargo install probe-rs --features cli
    Updating crates.io index
  Downloaded probe-rs v0.21.1
  Downloaded 1 crate (2.1 MB) in 0.71s
  Installing probe-rs v0.21.1
    Updating crates.io index
  Downloaded itertools v0.9.0
  Downloaded tracing-log v0.2.0
  Downloaded scroll_derive v0.11.1
  Downloaded git-version v0.3.8
  Downloaded fd-lock v3.0.13
  Downloaded endian-type v0.1.2
  Downloaded Inflector v0.11.4
  Downloaded plain v0.2.3
  Downloaded tracing-serde v0.1.3
  Downloaded hyper-tls v0.5.0
  Downloaded byte-unit v4.0.19
  Downloaded indoc v2.0.4
  Downloaded bitmatch v0.1.1
  Downloaded probe-rs-target v0.21.1
  Downloaded figment v0.10.12
  Downloaded managed v0.8.0
  Downloaded utf8-width v0.1.7
  Downloaded termtree v0.4.1
  Downloaded itm v0.9.0-rc.1
  Downloaded pretty_env_logger v0.5.0
  Downloaded overload v0.1.1
  Downloaded tokio-native-tls v0.3.1
  Downloaded uncased v0.9.9
  Downloaded xmlparser v0.13.6
  Downloaded yansi v1.0.0-rc.1
  Downloaded svd-rs v0.14.6
  Downloaded native-tls v0.2.11
  Downloaded defmt-decoder v0.3.9
  Downloaded sharded-slab v0.1.7
  Downloaded itertools v0.11.0
  Downloaded uriparse v0.6.4
  Downloaded regex-automata v0.1.10
  Downloaded goblin v0.7.1
  Downloaded tracing-subscriber v0.3.18
  Downloaded ratatui v0.23.0
  Downloaded regex-syntax v0.6.29
  Downloaded radix_trie v0.2.1
  Downloaded ron v0.8.1
  Downloaded roxmltree v0.18.1
  Downloaded serde_repr v0.1.17
  Downloaded pear v0.2.7
  Downloaded svd-parser v0.14.4
  Downloaded serde_yaml v0.9.27
  Downloaded uf2-decode v0.2.0
  Downloaded proc-macro2-diagnostics v0.10.1
  Downloaded dunce v1.0.4
  Downloaded pear_codegen v0.2.7
  Downloaded svg v0.14.0
  Downloaded matchers v0.1.0
  Downloaded inlinable_string v0.1.15
  Downloaded nu-ansi-term v0.46.0
  Downloaded rustyline v12.0.0
  Downloaded nibble_vec v0.1.0
  Downloaded cassowary v0.3.0
  Downloaded capstone-sys v0.15.0
  Downloaded schemafy_core v0.6.0
  Downloaded boolean_expression v0.3.11
  Downloaded cargo_toml v0.16.3
  Downloaded schemafy_lib v0.6.0
  Downloaded git-version-macro v0.3.8
  Downloaded schemafy v0.6.0
  Downloaded capstone v0.11.0
  Downloaded gdbstub v0.6.6
  Downloaded 63 crates (7.9 MB) in 1.76s (largest was `capstone-sys` at 4.9 MB)
   Compiling proc-macro2 v1.0.70
   Compiling unicode-ident v1.0.12
   Compiling serde v1.0.193
   Compiling libc v0.2.150
   Compiling cfg-if v1.0.0
   Compiling autocfg v1.1.0
   Compiling memchr v2.6.4
   Compiling quote v1.0.33
   Compiling syn v2.0.39
   Compiling cc v1.0.83
   Compiling pkg-config v0.3.27
   Compiling syn v1.0.109
   Compiling version_check v0.9.4
   Compiling once_cell v1.18.0
   Compiling itoa v1.0.9
   Compiling rustix v0.38.25
   Compiling errno v0.3.8
   Compiling smallvec v1.11.2
   Compiling fnv v1.0.7
   Compiling byteorder v1.5.0
   Compiling hashbrown v0.14.3
   Compiling equivalent v1.0.1
   Compiling pin-project-lite v0.2.13
   Compiling ryu v1.0.15
   Compiling thiserror v1.0.50
   Compiling aho-corasick v1.1.2
   Compiling indexmap v2.1.0
   Compiling regex-syntax v0.8.2
   Compiling serde_derive v1.0.193
   Compiling thiserror-impl v1.0.50
   Compiling crc32fast v1.3.2
   Compiling thiserror-core v1.0.50
   Compiling vcpkg v0.2.15
   Compiling log v0.4.20
   Compiling bitflags v2.4.1
   Compiling mio v0.8.9
   Compiling openssl-sys v0.9.96
   Compiling thiserror-core-impl v1.0.50
   Compiling regex-automata v0.4.3
   Compiling tracing-core v0.1.32
   Compiling is-terminal v0.4.9
   Compiling lock_api v0.4.11
   Compiling futures-core v0.3.29
   Compiling heck v0.4.1
   Compiling stable_deref_trait v1.2.0
   Compiling bytes v1.5.0
   Compiling rustversion v1.0.14
   Compiling static_assertions v1.1.0
   Compiling scopeguard v1.2.0
   Compiling adler v1.0.2
   Compiling miniz_oxide v0.7.1
   Compiling twox-hash v1.6.3
   Compiling regex v1.10.2
   Compiling semver v1.0.20
   Compiling typenum v1.17.0
   Compiling unicode-width v0.1.11
   Compiling flate2 v1.0.28
   Compiling ruzstd v0.4.0
   Compiling tracing-attributes v0.1.27
   Compiling generic-array v0.14.7
   Compiling socket2 v0.5.5
   Compiling num_cpus v1.16.0
   Compiling slab v0.4.9
   Compiling serde_json v1.0.108
   Compiling lazy_static v1.4.0
   Compiling ident_case v1.0.1
   Compiling radium v0.7.0
   Compiling strsim v0.10.0
   Compiling either v1.9.0
   Compiling futures-task v0.3.29
   Compiling cpp_demangle v0.4.3
   Compiling darling_core v0.14.4
   Compiling tracing v0.1.40
   Compiling tokio v1.34.0
   Compiling object v0.32.1
   Compiling gimli v0.28.1
   Compiling num-traits v0.2.17
   Compiling futures-util v0.3.29
   Compiling toml_datetime v0.6.5
   Compiling openssl v0.10.60
   Compiling foreign-types-shared v0.1.1
   Compiling winnow v0.5.19
   Compiling bitflags v1.3.2
   Compiling tap v1.0.1
   Compiling wyz v0.5.1
   Compiling toml_edit v0.19.15
   Compiling foreign-types v0.3.2
   Compiling http v0.2.11
   Compiling rustc_version v0.4.0
   Compiling darling_macro v0.14.4
   Compiling serde_spanned v0.6.4
   Compiling openssl-macros v0.1.1
   Compiling proc-macro2-diagnostics v0.10.1
   Compiling libusb1-sys v0.6.4
   Compiling backtrace v0.3.69
   Compiling memmap2 v0.5.10
   Compiling utf8parse v0.2.1
   Compiling parking_lot_core v0.9.9
   Compiling signal-hook v0.3.17
   Compiling futures-sink v0.3.29
   Compiling rustc-demangle v0.1.23
   Compiling tinyvec_macros v0.1.1
   Compiling pin-utils v0.1.0
   Compiling fallible-iterator v0.3.0
   Compiling httparse v1.8.0
   Compiling funty v2.0.0
   Compiling futures-io v0.3.29
   Compiling native-tls v0.2.11
   Compiling futures-channel v0.3.29
   Compiling bitvec v1.0.1
   Compiling toml_edit v0.21.0
   Compiling proc-macro-crate v1.3.1
   Compiling addr2line v0.21.0
   Compiling tinyvec v1.6.0
   Compiling tokio-util v0.7.10
   Compiling schemafy_core v0.6.0
   Compiling darling v0.14.4
   Compiling Inflector v0.11.4
   Compiling heapless v0.7.16
   Compiling uriparse v0.6.4
   Compiling signal-hook-registry v1.4.1
   Compiling percent-encoding v2.3.1
   Compiling base64 v0.21.5
   Compiling smawk v0.3.2
   Compiling anyhow v1.0.75
   Compiling binrw_derive v0.12.0
   Compiling openssl-probe v0.1.5
   Compiling unicode-linebreak v0.1.5
   Compiling try-lock v0.2.4
   Compiling yansi v1.0.0-rc.1
   Compiling paste v1.0.14
   Compiling want v0.3.1
   Compiling form_urlencoded v1.2.1
   Compiling schemafy_lib v0.6.0
   Compiling deku_derive v0.16.0
   Compiling h2 v0.3.22
   Compiling unicode-normalization v0.1.22
   Compiling toml v0.8.8
   Compiling anstyle-parse v0.2.2
   Compiling block-buffer v0.10.4
   Compiling crypto-common v0.1.6
   Compiling http-body v0.4.5
   Compiling nix v0.26.4
   Compiling itertools v0.9.0
   Compiling strum_macros v0.25.3
   Compiling strum_macros v0.24.3
   Compiling spin v0.9.8
   Compiling jep106 v0.2.8
   Compiling bytemuck_derive v1.5.0
   Compiling git-version-macro v0.3.8
   Compiling hash32 v0.2.1
   Compiling uncased v0.9.9
   Compiling hidapi v2.4.1
   Compiling capstone-sys v0.15.0
   Compiling getrandom v0.2.11
   Compiling socket2 v0.4.10
   Compiling csv-core v0.1.11
   Compiling is_ci v1.1.1
   Compiling anstyle v1.0.4
   Compiling colorchoice v1.0.0
   Compiling regex-syntax v0.6.29
   Compiling portable-atomic v1.5.1
   Compiling time-core v0.1.2
   Compiling unsafe-libyaml v0.2.9
   Compiling owo-colors v3.5.0
   Compiling anstyle-query v1.0.0
   Compiling camino v1.1.6
   Compiling rusb v0.9.3
   Compiling binrw v0.12.0
   Compiling powerfmt v0.2.0
   Compiling unicode-bidi v0.3.13
   Compiling httpdate v1.0.3
   Compiling tower-service v0.3.2
   Compiling hyper v0.14.27
   Compiling idna v0.5.0
   Compiling probe-rs-target v0.21.1
   Compiling deranged v0.3.9
   Compiling boolean_expression v0.3.11
   Compiling regex-automata v0.1.10
   Compiling anstream v0.6.4
   Compiling serde_yaml v0.9.27
   Compiling time-macros v0.2.15
   Compiling supports-color v2.1.0
   Compiling bytemuck v1.14.0
   Compiling csv v1.3.0
   Compiling rand_core v0.6.4
   Compiling git-version v0.3.8
   Compiling strum v0.25.0
   Compiling strum v0.24.1
   Compiling digest v0.10.7
   Compiling parking_lot v0.12.1
   Compiling deku v0.16.0
   Compiling backtrace-ext v0.2.1
   Compiling schemafy v0.6.0
   Compiling signal-hook-mio v0.2.3
   Compiling pear_codegen v0.2.7
   Compiling tokio-native-tls v0.3.1
   Compiling textwrap v0.15.2
   Compiling parse_int v0.6.0
   Compiling supports-unicode v2.0.0
   Compiling supports-hyperlinks v2.1.0
   Compiling serde_plain v1.0.2
   Compiling bincode v1.3.3
   Compiling scroll_derive v0.11.1
   Compiling miette-derive v5.10.0
   Compiling nibble_vec v0.1.0
   Compiling figment v0.10.12
   Compiling terminal_size v0.1.17
   Compiling num_threads v0.1.6
   Compiling endian-type v0.1.2
   Compiling termcolor v1.4.0
   Compiling xmlparser v0.13.6
   Compiling inlinable_string v0.1.15
   Compiling overload v0.1.1
   Compiling zero v0.1.3
   Compiling cpufeatures v0.2.11
   Compiling clap_lex v0.6.0
   Compiling option-ext v0.2.0
   Compiling array-init v2.1.0
   Compiling minimal-lexical v0.2.1
   Compiling md5 v0.7.0
   Compiling unicode-segmentation v1.10.1
   Compiling humantime v2.1.0
   Compiling ppv-lite86 v0.2.17
   Compiling clap_builder v4.4.9
   Compiling rand_chacha v0.3.1
   Compiling miette v5.10.0
   Compiling env_logger v0.10.1
   Compiling nom v7.1.3
   Compiling esp-idf-part v0.4.1
   Compiling dirs-sys v0.4.1
   Compiling pear v0.2.7
   Compiling sha2 v0.10.8
   Compiling xmas-elf v0.9.1
   Compiling nu-ansi-term v0.46.0
   Compiling roxmltree v0.18.1
   Compiling itertools v0.11.0
   Compiling scroll v0.11.0
   Compiling time v0.3.30
   Compiling radix_trie v0.2.1
   Compiling probe-rs v0.21.1
   Compiling hyper-tls v0.5.0
   Compiling crossterm v0.27.0
   Compiling matchers v0.1.0
   Compiling bitmatch v0.1.1
   Compiling url v2.5.0
   Compiling serialport v4.2.2
   Compiling serde_urlencoded v0.7.1
   Compiling colored v2.0.4
   Compiling console v0.15.7
   Compiling sharded-slab v0.1.7
   Compiling svd-rs v0.14.6
   Compiling clap_derive v4.4.7
   Compiling tracing-log v0.2.0
   Compiling tracing-serde v0.1.3
   Compiling fd-lock v3.0.13
   Compiling defmt-parser v0.3.3
   Compiling defmt-json-schema v0.1.0
   Compiling cargo-platform v0.1.5
   Compiling serde_repr v0.1.17
   Compiling thread_local v1.1.7
   Compiling encoding_rs v0.8.33
   Compiling ipnet v2.9.0
   Compiling home v0.5.5
   Compiling managed v0.8.0
   Compiling utf8-width v0.1.7
   Compiling plain v0.2.3
   Compiling mime v0.3.17
   Compiling dissimilar v1.0.7
   Compiling number_prefix v0.4.0
   Compiling cassowary v0.3.0
   Compiling slip-codec v0.3.4
   Compiling indoc v2.0.4
   Compiling espflash v2.1.0
   Compiling ratatui v0.23.0
   Compiling indicatif v0.17.7
   Compiling defmt-decoder v0.3.9
   Compiling reqwest v0.11.22
   Compiling goblin v0.7.1
   Compiling byte-unit v4.0.19
   Compiling gdbstub v0.6.6
   Compiling rustyline v12.0.0
   Compiling clap v4.4.10
   Compiling tracing-subscriber v0.3.18
   Compiling cargo_metadata v0.18.1
   Compiling svd-parser v0.14.4
   Compiling itm v0.9.0-rc.1
   Compiling capstone v0.11.0
   Compiling enum-primitive-derive v0.2.2
   Compiling jaylink v0.3.0
   Compiling directories v5.0.1
   Compiling pretty_env_logger v0.5.0
   Compiling rand v0.8.5
   Compiling cargo_toml v0.16.3
   Compiling textwrap v0.16.0
   Compiling ron v0.8.1
   Compiling sanitize-filename v0.5.0
   Compiling terminal_size v0.3.0
   Compiling kmp v0.1.1
   Compiling bitfield v0.14.0
   Compiling termtree v0.4.1
   Compiling svg v0.14.0
   Compiling uf2-decode v0.2.0
   Compiling ihex v3.0.0
   Compiling bytesize v1.3.0
   Compiling dunce v1.0.4
    Finished release [optimized] target(s) in 18m 23s
  Installing /home/tingo/.cargo/bin/cargo-embed
  Installing /home/tingo/.cargo/bin/cargo-flash
  Installing /home/tingo/.cargo/bin/probe-rs
   Installed package `probe-rs v0.21.1` (executables `cargo-embed`, `cargo-flash`, `probe-rs`)

2023-11-30: eb - probe-run also works

tingo@kg-elitebook$ probe-run --list-probes
the following probes were found:
[0]: ESP JTAG (VID: 303a, PID: 1001, Serial: 34:85:18:01:62:40, EspJtag)

2023-11-30: eb - after installing cargo-espflash (and gmake), I can do this

tingo@kg-elitebook$ cargo espflash board-info --version
cargo-espflash-espflash-board-info 2.1.0

and

tingo@kg-elitebook$ cargo espflash board-info --port /dev/cuaU0
[2023-11-30T21:02:45Z INFO ] Serial port: '/dev/cuaU0'
[2023-11-30T21:02:45Z INFO ] Connecting...
[2023-11-30T21:02:45Z INFO ] Using flash stub
Chip type:         esp32c3 (revision v0.4)
Crystal frequency: 40MHz
Flash size:        4MB
Features:          WiFi, BLE
MAC address:       34:85:18:01:62:40

2023-05-23: c1 - the SoC is an ESP32 C3 (RISC V), so it needs the nightly toolchain

tingo@kg-core1:~/personal/projects/2023/rust/embedded/riscv $ rustup toolchain install nightly --component rust-src
info: syncing channel updates for 'nightly-x86_64-unknown-freebsd'
info: latest update on 2023-05-23, rust version 1.71.0-nightly (8b4b20836 2023-05-22)
info: downloading component 'rust-src'
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: downloading component 'rustfmt'
info: removing previous version of component 'cargo'
info: removing previous version of component 'clippy'
info: removing previous version of component 'rust-docs'
info: removing previous version of component 'rust-src'
info: removing previous version of component 'rust-std'
info: removing previous version of component 'rustc'
info: removing previous version of component 'rustfmt'
info: installing component 'rust-src'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
  4.6 MiB /  13.6 MiB ( 34 %)   0 B/s in  1s ETA: Unknown                                                           5.9 MiB /  13.6 MiB ( 43 %)   4.6 MiB/s in  2s ETA:  1s                                                           8.6 MiB /  13.6 MiB ( 63 %)   3.0 MiB/s in  3s ETA:  1s                                                          13.6 MiB /  13.6 MiB (100 %)   2.9 MiB/s in  4s ETA:  0s                                                          13.6 MiB /  13.6 MiB (100 %)   3.4 MiB/s in  4s ETA:  0s
info: installing component 'rust-std'
 10.8 MiB /  27.8 MiB ( 39 %)   0 B/s in  1s ETA: Unknown                                                          21.8 MiB /  27.8 MiB ( 79 %)  10.8 MiB/s in  2s ETA:  0s                                                          27.8 MiB /  27.8 MiB (100 %)  10.9 MiB/s in  2s ETA:  0s
info: installing component 'rustc'
 13.8 MiB /  69.7 MiB ( 20 %)   0 B/s in  1s ETA: Unknown                                                          24.7 MiB /  69.7 MiB ( 35 %)  13.8 MiB/s in  2s ETA:  3s                                                          37.2 MiB /  69.7 MiB ( 53 %)  12.4 MiB/s in  3s ETA:  2s                                                          49.6 MiB /  69.7 MiB ( 71 %)  12.4 MiB/s in  4s ETA:  1s                                                          57.4 MiB /  69.7 MiB ( 82 %)  12.4 MiB/s in  5s ETA:  0s                                                          67.9 MiB /  69.7 MiB ( 97 %)  11.5 MiB/s in  6s ETA:  0s                                                          69.7 MiB /  69.7 MiB (100 %)  10.8 MiB/s in  6s ETA:  0s
info: installing component 'rustfmt'

  nightly-x86_64-unknown-freebsd updated - rustc 1.71.0-nightly (8b4b20836 2023-05-22) (from rustc 1.71.0-nightly (4a59ba4d5 2023-05-12))

info: checking for self-update

and the riscv32imc-unknown-none-elf target

tingo@kg-core1:~/personal/projects/2023/rust/embedded/riscv $ rustup target add riscv32imc-unknown-none-elf
info: component 'rust-std' for target 'riscv32imc-unknown-none-elf' is up to date

good. Try probe-run

tingo@kg-core1:~/personal/projects/2023/rust/embedded/riscv $ probe-run --list-probes
Error: no probe was found.

re-try with sudo

tingo@kg-core1:~/personal/projects/2023/rust/embedded/riscv $ sudo probe-run --list-probes
the following probes were found:
[0]: ESP JTAG (VID: 303a, PID: 1001, Serial: 34:85:18:01:62:40, EspJtag)

ok, so it is a permissions problem. Dump device description

root@kg-core1:~ # usbconfig -d ugen3.4 dump_device_desc
ugen3.4: <Espressif USB JTAG/serial debug unit> at usbus3, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (500mA)

  bLength = 0x0012 
  bDescriptorType = 0x0001 
  bcdUSB = 0x0200 
  bDeviceClass = 0x00ef  <Miscellaneous device>
  bDeviceSubClass = 0x0002 
  bDeviceProtocol = 0x0001 
  bMaxPacketSize0 = 0x0040 
  idVendor = 0x303a 
  idProduct = 0x1001 
  bcdDevice = 0x0101 
  iManufacturer = 0x0001  <Espressif>
  iProduct = 0x0002  <USB JTAG/serial debug unit>
  iSerialNumber = 0x0003  <34:85:18:01:62:40>
  bNumConfigurations = 0x0001 

add a devd config file

tingo@kg-core1:~/personal/projects/2023/rust/embedded/msp430/msp430-test-f5529 $ cat /usr/local/etc/devd/espjtag.conf 
# allow group (operator) to access the usb connection of ESP usb jtag
notify 100 {
        match "system"          "USB";
        match "subsystem"       "INTERFACE";
        match "type"            "ATTACH";
        match "vendor"      "0x303a";
        match "product"     "0x1001";
        action "usb_devaddr=`echo $cdev | sed 's#^ugen##'` && chmod g+rw /dev/usb/${usb_devaddr}.*";
};

and restart devd via service devd restart, then unplug and replug the device.

tingo@kg-core1:~/personal/projects/2023/rust/embedded/riscv $ probe-run --list-probes
the following probes were found:
[0]: ESP JTAG (VID: 303a, PID: 1001, Serial: 34:85:18:01:62:40, EspJtag)

fixed.

2023-05-23: c1 - connecting the board to my c1 workstation. From /var/log/messages

May 23 20:36:47 kg-core1 kernel: ugen3.4: <Espressif USB JTAG/serial debug unit> at usbus3
May 23 20:36:47 kg-core1 kernel: umodem0 on uhub8
May 23 20:36:47 kg-core1 kernel: umodem0: <Espressif USB JTAG/serial debug unit, class 239/2, rev 2.00/1.01, addr 4> on usbus3
May 23 20:36:47 kg-core1 kernel: umodem0: data interface 1, has CM over data, has no break

and

root@kg-core1:~ # sysctl -n dev.umodem.0.ttyname
U0

list the tty devices

root@kg-core1:~ # ll /dev/cuaU* /dev/ttyU*
crw-rw----  1 uucp  dialer  0x1be May 23 20:36 /dev/cuaU0
crw-rw----  1 uucp  dialer  0x1bf May 23 20:36 /dev/cuaU0.init
crw-rw----  1 uucp  dialer  0x1c0 May 23 20:36 /dev/cuaU0.lock
crw-------  1 root  wheel   0x1ac May 23 20:36 /dev/ttyU0
crw-------  1 root  wheel   0x1ad May 23 20:36 /dev/ttyU0.init
crw-------  1 root  wheel   0x1ba May 23 20:36 /dev/ttyU0.lock

and the usb devices

root@kg-core1:~ # ll /dev/ugen3.4 /dev/usb/3.4*
lrwxr-xr-x  1 root  wheel         9 May 23 20:36 /dev/ugen3.4@ -> usb/3.4.0
crw-------  1 root  operator   0xac May 23 20:36 /dev/usb/3.4.0
crw-------  1 root  operator   0xaf May 23 20:36 /dev/usb/3.4.1
crw-------  1 root  operator   0xb2 May 23 20:36 /dev/usb/3.4.2
crw-------  1 root  operator  0x1ab May 23 20:36 /dev/usb/3.4.3

2023-05-22: this board is v1.2a. There is a pull request #61 which notes that GPIO18 and 19 is swapped on the silkscreen.

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-DevKit-RUST-1 devkit (356-ESP32C3DVKTRUST1) from Mouser (with other items). Price was NOK 219.11.