Teach espup about the ESP32-C2

This commit is contained in:
Jesse Braham 2022-11-04 08:27:09 -07:00
parent 2937a1664a
commit 3d2a80ed09
3 changed files with 4 additions and 2 deletions

View File

@ -94,7 +94,7 @@ pub struct InstallOpts {
/// Minifies the installation.
#[arg(short = 'm', long)]
pub profile_minimal: bool,
/// Comma or space separated list of targets [esp32,esp32s2,esp32s3,esp32c3,all].
/// Comma or space separated list of targets [esp32,esp32s2,esp32s3,esp32c2,esp32c3,all].
#[arg(short = 't', long, default_value = "all")]
pub targets: String,
/// Xtensa Rust toolchain version.

View File

@ -20,6 +20,8 @@ pub enum Target {
/// Xtensa LX7 based dual core
ESP32S3,
/// RISC-V based single core
ESP32C2,
/// RISC-V based single core
ESP32C3,
}

View File

@ -110,7 +110,7 @@ pub fn get_toolchain_name(target: &Target) -> String {
Target::ESP32 => "xtensa-esp32-elf".to_string(),
Target::ESP32S2 => "xtensa-esp32s2-elf".to_string(),
Target::ESP32S3 => "xtensa-esp32s3-elf".to_string(),
Target::ESP32C3 => "riscv32-esp-elf".to_string(),
Target::ESP32C2 | Target::ESP32C3 => "riscv32-esp-elf".to_string(),
}
}