Skip to content

Commit

Permalink
lib: merge allwinner-rt into current cargo workspace
Browse files Browse the repository at this point in the history
Signed-off-by: Zhouqi Jiang <[email protected]>
  • Loading branch information
luojia65 committed Jun 3, 2024
1 parent 97852f2 commit d1ee4f2
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 131 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- 支持D1类平台的GPIO、SPI和UART兼容性及其中断编号

[Unreleased]: https://github.com/rustsbi/rustsbi/compare/v0.0.0...HEAD
[0.0.0]: https://gitee.com/rustsbi/allwinner-hal/releases/tag/v0.0.0
[0.0.0]: https://github.com/rustsbi/allwinner-hal/releases/tag/v0.0.0
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@ memoffset = "0.8"
default = ["d1"]
# D1-like chips: D1-H, D1s, F133.
d1 = []

[workspace]
members = ["allwinner-rt", "allwinner-rt/macros"]
4 changes: 2 additions & 2 deletions allwinner-rt/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- DRAM内存初始化函数
- 从aw-soc库提供基本的外设和时钟配置

[Unreleased]: https://github.com/rustsbi/d1-rom-rt/compare/v0.0.0...HEAD
[0.0.0]: https://gitee.com/rustsbi/d1-rom-rt/releases/tag/v0.0.0
[Unreleased]: https://github.com/rustsbi/allwinner-rt/compare/v0.0.0...HEAD
[0.0.0]: https://github.com/rustsbi/allwinner-rt/releases/tag/v0.0.0
11 changes: 4 additions & 7 deletions allwinner-rt/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[package]
name = "d1-rom-rt"
name = "allwinner-rt"
description = "ROM runtime for Allwinner D1 chip"
version = "0.0.0"
edition = "2021"
authors = [
"Luo Jia <[email protected]>",
"Gao Chengbo <[email protected]>",
]
repository = "https://gitee.com/rustsbi/d1-rom-rt"
documentation = "https://docs.rs/d1-rom-rt"
repository = "https://github.com/rustsbi/allwinner-rt"
documentation = "https://docs.rs/allwinner-rt"
license = "MulanPSL-2.0 OR MIT"
readme = "README.md"
keywords = ["allwinner"]
Expand All @@ -17,7 +17,7 @@ categories = ["embedded", "hardware-support", "no-std"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
d1-rom-rt-macros = "0.0.0"
allwinner-rt-macros = { version = "0.0.0", path = "macros" }
base-address = "0.0.0"
embedded-hal = "1.0.0-alpha.9"
nb = "1.1.0"
Expand All @@ -30,6 +30,3 @@ default = ["nezha"]
log = ["dep:spin", "dep:ufmt"]
nezha = []
lichee = []

[workspace]
members = ["macros"]
7 changes: 0 additions & 7 deletions allwinner-rt/LICENSE-MIT

This file was deleted.

101 changes: 0 additions & 101 deletions allwinner-rt/LICENSE-MULAN

This file was deleted.

10 changes: 5 additions & 5 deletions allwinner-rt/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# D1 ROM 运行环境
# Allwinner-RT 运行环境

[![crates.io](https://img.shields.io/crates/v/d1-rom-rt.svg)](https://crates.io/crates/d1-rom-rt)
[![Documentation](https://docs.rs/d1-rom-rt/badge.svg)](https://docs.rs/d1-rom-rt)
![License](https://img.shields.io/crates/l/d1-rom-rt.svg)
[![crates.io](https://img.shields.io/crates/v/allwinner-rt.svg)](https://crates.io/crates/allwinner-rt)
[![Documentation](https://docs.rs/allwinner-rt/badge.svg)](https://docs.rs/allwinner-rt)
![License](https://img.shields.io/crates/l/allwinner-rt.svg)

全志D1的ROM运行环境,目前包括一个入口函数宏。
全志芯片的ROM运行环境,目前包括一个入口函数宏。
2 changes: 1 addition & 1 deletion allwinner-rt/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::{env, path::PathBuf};

fn main() {
let out = PathBuf::from(env::var_os("OUT_DIR").unwrap());
let ld = &out.join("d1-rom-rt.ld");
let ld = &out.join("allwinner-rt.ld");

std::fs::write(ld, LINKER_ALLWINNER_D1).unwrap();
println!("cargo:rustc-link-arg=-T{}", ld.display());
Expand Down
4 changes: 2 additions & 2 deletions allwinner-rt/examples/fn-main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#![no_std]
#![no_main]

use d1_rom_rt::{Handover, Parameters};
use allwinner_rt::{Handover, Parameters};

#[d1_rom_rt::entry]
#[allwinner_rt::entry]
fn main(params: Parameters) -> Handover {
// on most platforms, params has a UART inside.
Handover::from(params)
Expand Down
6 changes: 3 additions & 3 deletions allwinner-rt/macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[package]
name = "d1-rom-rt-macros"
name = "allwinner-rt-macros"
description = "Procedural macro for ROM runtime on Allwinner D1 chip"
version = "0.0.0"
edition = "2021"
authors = [
"Luo Jia <[email protected]>",
"Gao Chengbo <[email protected]>",
]
repository = "https://gitee.com/rustsbi/d1-rom-rt"
documentation = "https://docs.rs/d1-rom-rt-macros"
repository = "https://github.com/rustsbi/allwinner-rt"
documentation = "https://docs.rs/allwinner-rt-macros"
license = "MulanPSL-2.0 OR MIT"
readme = "../README.md"
keywords = ["allwinner"]
Expand Down
4 changes: 2 additions & 2 deletions allwinner-rt/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//! Here's an sample usage of this crate:
//!
//! ```no_run
//! use d1_rom_rt::{entry, Parameters, Handover};
//! use allwinner_rt::{entry, Parameters, Handover};
//!
//! #[entry]
//! fn main(params: Parameters) -> Handover {
Expand All @@ -22,7 +22,7 @@ mod mctl;
pub use mctl::init as dram_init;

use base_address::Static;
pub use d1_rom_rt_macros::entry;
pub use allwinner_rt_macros::entry;

#[cfg(feature = "log")]
use aw_soc::uart::{self, Parity, Serial, StopBits, WordLength};
Expand Down

0 comments on commit d1ee4f2

Please sign in to comment.