From 7d4e4045dc0d72ee1416d0e095b1f1af0db89eca Mon Sep 17 00:00:00 2001 From: chrysn Date: Mon, 8 Apr 2024 10:25:54 +0200 Subject: [PATCH] boards: add particle-xenon support --- Cargo.lock | 11 +++++++++++ laze-project.yml | 4 ++++ src/riot-rs-boards/Cargo.toml | 1 + src/riot-rs-boards/particle-xenon/Cargo.toml | 13 +++++++++++++ src/riot-rs-boards/particle-xenon/src/lib.rs | 10 ++++++++++ 5 files changed, 39 insertions(+) create mode 100644 src/riot-rs-boards/particle-xenon/Cargo.toml create mode 100644 src/riot-rs-boards/particle-xenon/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index 3fdc88121..73154931e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2056,6 +2056,16 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "particle-xenon" +version = "0.1.0" +dependencies = [ + "cortex-m", + "cortex-m-rt", + "nrf52", + "riot-rs-rt", +] + [[package]] name = "paste" version = "1.0.14" @@ -2349,6 +2359,7 @@ dependencies = [ "nrf52dk", "nrf5340dk", "nucleo-f401re", + "particle-xenon", "riot-rs-rt", "rpi-pico", ] diff --git a/laze-project.yml b/laze-project.yml index 46bd7f2ed..6a6eae27f 100644 --- a/laze-project.yml +++ b/laze-project.yml @@ -495,6 +495,7 @@ modules: - nrf52840dk - rpi-pico - rpi-pico-w + - particle-xenon env: global: RUSTFLAGS: @@ -590,6 +591,9 @@ builders: - name: microbit-v2 parent: nrf52840 + - name: particle-xenon + parent: nrf52840 + - name: rpi-pico parent: rp2040 env: diff --git a/src/riot-rs-boards/Cargo.toml b/src/riot-rs-boards/Cargo.toml index f337c09c5..5d12a8933 100644 --- a/src/riot-rs-boards/Cargo.toml +++ b/src/riot-rs-boards/Cargo.toml @@ -24,6 +24,7 @@ nrf52dk = { optional = true, path = "nrf52dk" } nrf5340dk = { optional = true, path = "nrf5340dk" } nucleo-f401re = { optional = true, path = "nucleo-f401re" } rpi-pico = { optional = true, path = "rpi-pico" } +particle-xenon = { optional=true, path="particle-xenon" } [features] # Allows to have no boards selected, useful to run platform-independent tooling diff --git a/src/riot-rs-boards/particle-xenon/Cargo.toml b/src/riot-rs-boards/particle-xenon/Cargo.toml new file mode 100644 index 000000000..a64455cbf --- /dev/null +++ b/src/riot-rs-boards/particle-xenon/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "particle-xenon" +version = "0.1.0" +authors = ["Christian Amsüss "] +edition = "2021" + +[dependencies] +cortex-m-rt.workspace = true +cortex-m.workspace = true + +riot-rs-rt.workspace = true + +nrf52 = { path = "../nrf52", features = [ "nrf52840" ] } diff --git a/src/riot-rs-boards/particle-xenon/src/lib.rs b/src/riot-rs-boards/particle-xenon/src/lib.rs new file mode 100644 index 000000000..bfdce47c1 --- /dev/null +++ b/src/riot-rs-boards/particle-xenon/src/lib.rs @@ -0,0 +1,10 @@ +#![no_std] + +use nrf52; + +use riot_rs_rt::debug::println; + +pub fn init() { + println!("particle_xenon::init()"); + nrf52::init(); +}