Skip to content

Commit

Permalink
feat(laze): add riscv and xtensa modules
Browse files Browse the repository at this point in the history
  • Loading branch information
elenaf9 committed Sep 10, 2024
1 parent e46f357 commit 44fed3b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
18 changes: 18 additions & 0 deletions laze-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,8 @@ contexts:

- name: esp32c3
parent: esp
selects:
- riscv
env:
RUSTFLAGS:
- --cfg context=\"esp32c3\"
Expand All @@ -296,6 +298,8 @@ contexts:

- name: esp32c6
parent: esp
selects:
- riscv
env:
RUSTFLAGS:
- --cfg context=\"esp32c6\"
Expand All @@ -304,6 +308,8 @@ contexts:

- name: esp32s3
parent: esp
selects:
- xtensa
env:
CARGO_TOOLCHAIN: +esp
RUSTFLAGS:
Expand Down Expand Up @@ -423,6 +429,18 @@ modules:
RUSTFLAGS:
- --cfg armv7m

- name: xtensa
env:
global:
RUSTFLAGS:
- --cfg context=\"xtensa\"

- name: riscv
env:
global:
RUSTFLAGS:
- --cfg context=\"riscv\"

- name: rp-link-arg
help: helper module that ensures link-rp.x is added behind cortex-m ld scripts
env:
Expand Down
9 changes: 3 additions & 6 deletions src/riot-rs-threads/src/arch/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,13 @@ cfg_if::cfg_if! {
if #[cfg(context = "cortex-m")] {
mod cortex_m;
pub use cortex_m::Cpu;
}
else if #[cfg(any(context = "esp32c3", context = "esp32c6"))] {
} else if #[cfg(context = "riscv")] {
mod riscv;
pub use riscv::Cpu;
}
else if #[cfg(context = "esp32s3")] {
} else if #[cfg(context = "xtensa")] {
mod xtensa;
pub use xtensa::Cpu;
}
else {
} else {
pub struct Cpu;
impl Arch for Cpu {
type ThreadData = ();
Expand Down

0 comments on commit 44fed3b

Please sign in to comment.