Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Flash with Local Setup

This chapter covers how to compile and flash the Crimpdeq firmware to your device.

Prerequisites

To build and upload the firmware, install:

  • Rust
  • The stable toolchain with the ESP32-C3 target:
    rustup toolchain install stable --component rust-src --target riscv32imc-unknown-none-elf
    
  • probe-rs, see installation instructions

    ⚠️ Note: Depending on your OS, you may need extra setup steps:

    • Linux: set up udev rules for your debug probe or USB-serial device (see the probe-rs udev guide).
    • Windows/macOS: ensure the correct USB drivers are installed and select the appropriate serial port in your tooling.

How to Build the Firmware

To build the firmware, run:

cargo build --release

This compiles the firmware only. To build and flash the device, see Build and Flash your Device.

How to Flash Your Crimpdeq

Erase Device Memory

If this board was previously used for other projects, erase its flash once:

probe-rs erase

⚠️ Note: Erasing is only needed once. Avoid erasing routinely, or you will lose your calibration values.

Build and Flash Your Device

With a custom runner configured in .cargo/config.toml, you can build, flash, and open a serial monitor with:

cargo run --release

This opens a serial monitor, allowing you to view log messages in real time.

To modify the log level, update the DEFMT_LOG value in .cargo/config.toml or set it when running the command:

DEFMT_LOG=debug cargo run --release

⚠️ Note: If your DevKit does not include USB-Serial-JTAG, flash over UART by updating the custom runner in .cargo/config.toml to use espflash instead of probe-rs.

Configuring Environment Variables

If you need to change DEVICE_ID, DEVICE_NAME, or DEVICE_VERSION_NUMBER, update their values in .cargo/config.toml.

After making changes, rebuild and flash the device for the new values to take effect.