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
- luetooth 5, Bluetooth mesh
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,
local links
History
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.