Skip to content

Commit

Permalink
Add esp8266 no_std target
Browse files Browse the repository at this point in the history
  • Loading branch information
MabezDev committed Oct 21, 2024
1 parent 99decb5 commit 4144e1f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions compiler/rustc_target/src/spec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1794,6 +1794,7 @@ supported_targets! {
("xtensa-esp32s2-espidf", xtensa_esp32s2_espidf),
("xtensa-esp32s3-none-elf", xtensa_esp32s3_none_elf),
("xtensa-esp32s3-espidf", xtensa_esp32s3_espidf),
("xtensa-esp8266-none-elf", xtensa_esp8266_none_elf),

("i686-wrs-vxworks", i686_wrs_vxworks),
("x86_64-wrs-vxworks", x86_64_wrs_vxworks),
Expand Down
23 changes: 23 additions & 0 deletions compiler/rustc_target/src/spec/targets/xtensa_esp8266_none_elf.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
use crate::spec::{base::xtensa, Target, TargetOptions};

pub fn target() -> Target {
Target {
llvm_target: "xtensa-none-elf".into(),
pointer_width: 32,
data_layout: "e-m:e-p:32:32-v1:8:8-i64:64-i128:128-n32".into(),
arch: "xtensa".into(),
metadata: crate::spec::TargetMetadata {
description: Some("Xtensa ESP8266".into()),
tier: Some(3),
host_tools: Some(false),
std: Some(false),
},

options: TargetOptions {
cpu: "esp8266".into(),
linker: Some("xtensa-lx106-elf-gcc".into()),
max_atomic_width: Some(32),
..xtensa::opts()
},
}
}

0 comments on commit 4144e1f

Please sign in to comment.