Added custom risc32-imac for esp-espidf target
This commit is contained in:
parent
9eee230cd0
commit
1f5361b40c
4 changed files with 38 additions and 4 deletions
|
@ -1284,6 +1284,7 @@ supported_targets! {
|
|||
("riscv32im-unknown-none-elf", riscv32im_unknown_none_elf),
|
||||
("riscv32imc-unknown-none-elf", riscv32imc_unknown_none_elf),
|
||||
("riscv32imc-esp-espidf", riscv32imc_esp_espidf),
|
||||
("riscv32imac-esp-espidf", riscv32imac_esp_espidf),
|
||||
("riscv32imac-unknown-none-elf", riscv32imac_unknown_none_elf),
|
||||
("riscv32imac-unknown-xous-elf", riscv32imac_unknown_xous_elf),
|
||||
("riscv32gc-unknown-linux-gnu", riscv32gc_unknown_linux_gnu),
|
||||
|
|
31
compiler/rustc_target/src/spec/riscv32imac_esp_espidf.rs
Normal file
31
compiler/rustc_target/src/spec/riscv32imac_esp_espidf.rs
Normal file
|
@ -0,0 +1,31 @@
|
|||
use crate::spec::{cvs, PanicStrategy, RelocModel, Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
Target {
|
||||
data_layout: "e-m:e-p:32:32-i64:64-n32-S128".into(),
|
||||
llvm_target: "riscv32".into(),
|
||||
pointer_width: 32,
|
||||
arch: "riscv32".into(),
|
||||
|
||||
options: TargetOptions {
|
||||
families: cvs!["unix"],
|
||||
os: "espidf".into(),
|
||||
env: "newlib".into(),
|
||||
vendor: "espressif".into(),
|
||||
linker: Some("riscv32-esp-elf-gcc".into()),
|
||||
cpu: "generic-rv32".into(),
|
||||
|
||||
// As RiscV32IMAC architecture does natively support atomics,
|
||||
// automatically enable the support for the Rust STD library.
|
||||
max_atomic_width: Some(64),
|
||||
atomic_cas: true,
|
||||
|
||||
features: "+m,+a,+c".into(),
|
||||
panic_strategy: PanicStrategy::Abort,
|
||||
relocation_model: RelocModel::Static,
|
||||
emit_debug_gdb_scripts: false,
|
||||
eh_frame_header: false,
|
||||
..Default::default()
|
||||
},
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue