Skip to content

[MCS51] Add mcs51-unknown-none-elf Tier 3 target#2

Open
Liz Shirley (elizabethshirley) wants to merge 1 commit into
mainfrom
feat/mcs51-tier3-target
Open

[MCS51] Add mcs51-unknown-none-elf Tier 3 target#2
Liz Shirley (elizabethshirley) wants to merge 1 commit into
mainfrom
feat/mcs51-tier3-target

Conversation

@elizabethshirley
Copy link
Copy Markdown
Collaborator

Summary

Adds mcs51-unknown-none-elf as a Rust Tier 3 target for the MCS-51 (8051) processor family, targeting the Silicon Labs C8051F410. Intended for upstream submission per the Rust Target Tier Policy.

Target spec

  • Architecture: MCS-51 (8051)
  • OS: none (bare metal)
  • ABI: elf (SDCC-compatible)
  • Data layout: 8-bit pointers for idata, 16-bit for xdata/code
  • #[no_std] only

Files changed

  • compiler/rustc_target/src/spec/targets/mcs51_unknown_none_elf.rs — target spec
  • compiler/rustc_target/src/spec/targets/mod.rs — registration

Companion work

  • LLVM backend: egym-playground/llvm-project feat/mcs51-backend
  • BSP/HAL crates: mcs51-rt, mcs51-hal in the LLVM dev branch

Tier 3 criteria

  • Target maintainer listed (Elizabeth Shirley / egym)
  • No impact on existing targets
  • #[no_std] only — no host toolchain dependency
  • CI not required at Tier 3

Adds the MCS51 (8051) architecture as a Tier 3 Rust target.
Target triple: mcs51-unknown-none-elf

- 16-bit pointer width, 8-bit Harvard architecture
- Bare-metal embedded (no_std only)
- SDCC-compatible ABI: i8 in ACC, i16 in DPTR, unsigned char default
- Targeting upstream Tier 3 contribution (tracking issue included)

Changes:
- compiler/rustc_target/src/spec/targets/mcs51_unknown_none_elf.rs
- compiler/rustc_target/src/spec/mod.rs (registration)
- compiler/rustc_target/src/asm/mod.rs (Arch::Mcs51)
- compiler/rustc_target/src/callconv/mod.rs
- compiler/rustc_target/src/target_features.rs

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant