Skip to content

Commit c87a212

Browse files
Merge pull request #9 from rust-embedded/rename-crate
Renamed cortex-r to cortex-ar
2 parents 016cdf9 + 35c0ab0 commit c87a212

File tree

259 files changed

+121
-62
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

259 files changed

+121
-62
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
runs-on: ubuntu-24.04
3737
strategy:
3838
matrix:
39-
rust: [stable, 1.82]
39+
rust: [stable, 1.59]
4040
steps:
4141
- name: Checkout
4242
uses: actions/checkout@v4
@@ -231,7 +231,7 @@ jobs:
231231
rustup default stable
232232
- name: Run cargo test
233233
run: |
234-
cargo test --manifest-path cortex-r/Cargo.toml
234+
cargo test --manifest-path cortex-ar/Cargo.toml
235235
236236
# Run some programs in QEMU
237237
qemu-test:

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ exclude = [
33
"arm-targets",
44
]
55
members = [
6-
"cortex-r",
6+
"cortex-ar",
77
"cortex-r-examples",
88
"cortex-r-rt",
99
]

LICENSE-MIT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Copyright (c) The Cortex-R Crate Developers
21
Copyright (c) Ferrous Systems
2+
Copyright (c) The Rust Embedded Devices Working Group developers
33

44
Permission is hereby granted, free of charge, to any person obtaining a copy
55
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 10 additions & 5 deletions

arm-targets/Cargo.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
[package]
2-
authors = ["Jonathan Pallant <[email protected]>", "The Cortex-R Team <[email protected]>"]
2+
authors = [
3+
"Jonathan Pallant <[email protected]>",
4+
"The Cortex-R Team <[email protected]>"
5+
]
6+
categories = ["development-tools::build-utils"]
37
description = "Compile-time feature detection for Arm processors"
48
edition = "2021"
59
license = "MIT OR Apache-2.0"
610
name = "arm-targets"
711
readme = "README.md"
812
repository = "https://github.com/rust-embedded/cortex-r.git"
9-
rust-version = "1.82"
13+
rust-version = "1.59"
1014
version = "0.1.0"
1115

1216
[dependencies]

cortex-r/Cargo.toml renamed to cortex-ar/Cargo.toml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,24 @@
11
[package]
2-
authors = ["Jonathan Pallant <[email protected]>", "The Cortex-R Team <[email protected]>"]
3-
description = "CPU support for Arm Cortex-R"
2+
authors = [
3+
"Jonathan Pallant <[email protected]>",
4+
"The Cortex-R Team <[email protected]>",
5+
]
6+
categories = [
7+
"embedded",
8+
"no-std",
9+
]
10+
description = "CPU support for AArch32 Arm Cortex-R and Arm Cortex-A"
411
edition = "2021"
12+
keywords = [
13+
"arm",
14+
"cortex-a",
15+
"cortex-r",
16+
"embedded",
17+
"no_std",
18+
"no-std",
19+
]
520
license = "MIT OR Apache-2.0"
6-
name = "cortex-r"
21+
name = "cortex-ar"
722
readme = "README.md"
823
repository = "https://github.com/rust-embedded/cortex-r.git"
924
rust-version = "1.82"

cortex-ar/README.md

Lines changed: 39 additions & 0 deletions
File renamed without changes.
File renamed without changes.
File renamed without changes.

cortex-r/src/generic_timer/el0.rs renamed to cortex-ar/src/generic_timer/el0.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use crate::register;
66
///
77
/// Note that for most of these APIs to work, EL0 needs to have been granted
88
/// access using methods like
9-
/// [El2GenericTimer::el0_access_physical_counter](crate::generic_timer::El2GenericTimer::el0_access_physical_counter).
9+
/// [El1PhysicalTimer::el0_access_physical_counter](crate::generic_timer::El1PhysicalTimer::el0_access_physical_counter).
1010
pub struct El0PhysicalTimer();
1111

1212
impl El0PhysicalTimer {
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

cortex-r-examples/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ version = "0.1.0"
1212

1313
[dependencies]
1414
arm-gic = {git = "https://github.com/google/arm-gic.git", rev = "46a8fc1720f5c28fccf4dfb5953b88dab7012e9c", optional = true}
15-
cortex-r = {path = "../cortex-r", features = ["critical-section-single-core"]}
15+
cortex-ar = {path = "../cortex-ar", features = ["critical-section-single-core"]}
1616
cortex-r-rt = {path = "../cortex-r-rt"}
1717
semihosting = {version = "0.1.18", features = ["stdio"]}
1818

cortex-r-examples/src/bin/generic_timer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ fn main() {
2626
/// Let's test some timers!
2727
#[cfg(arm_architecture = "v8-r")]
2828
fn main() {
29-
use cortex_r::generic_timer::{El1PhysicalTimer, El1VirtualTimer, GenericTimer};
30-
let cntfrq = cortex_r::register::Cntfrq::read().0;
29+
use cortex_ar::generic_timer::{El1PhysicalTimer, El1VirtualTimer, GenericTimer};
30+
let cntfrq = cortex_ar::register::Cntfrq::read().0;
3131
println!("cntfrq = {:.03} MHz", cntfrq as f32 / 1_000_000.0);
3232

3333
let delay_ticks = cntfrq * 2;

cortex-r-examples/src/bin/gic.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#![no_main]
55

66
// pull in our start-up code
7-
use cortex_r as _;
7+
use cortex_ar as _;
88
use cortex_r_examples as _;
99

1010
use arm_gic::{
@@ -33,7 +33,7 @@ const GICD_BASE_OFFSET: usize = 0x0000_0000usize;
3333
const GICR_BASE_OFFSET: usize = 0x0010_0000usize;
3434

3535
fn dump_cpsr() {
36-
let cpsr = cortex_r::register::Cpsr::read();
36+
let cpsr = cortex_ar::register::Cpsr::read();
3737
println!("CPSR: {:?}", cpsr);
3838
}
3939

@@ -42,7 +42,7 @@ fn dump_cpsr() {
4242
/// Called by [`kmain`].
4343
fn main() -> Result<(), core::fmt::Error> {
4444
// Get the GIC address by reading CBAR
45-
let periphbase = cortex_r::register::ImpCbar::read().periphbase();
45+
let periphbase = cortex_ar::register::ImpCbar::read().periphbase();
4646
println!("Found PERIPHBASE {:010p}", periphbase);
4747
let gicd_base = periphbase.wrapping_byte_add(GICD_BASE_OFFSET);
4848
let gicr_base = periphbase.wrapping_byte_add(GICR_BASE_OFFSET);
@@ -70,7 +70,7 @@ fn main() -> Result<(), core::fmt::Error> {
7070
println!("Enabling interrupts...");
7171
dump_cpsr();
7272
unsafe {
73-
cortex_r::interrupt::enable();
73+
cortex_ar::interrupt::enable();
7474
}
7575
dump_cpsr();
7676

@@ -87,7 +87,7 @@ fn main() -> Result<(), core::fmt::Error> {
8787
);
8888

8989
for _ in 0..1_000_000 {
90-
cortex_r::asm::nop();
90+
cortex_ar::asm::nop();
9191
}
9292

9393
Ok(())

cortex-r-examples/src/bin/hello.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#![no_main]
55

66
// pull in our start-up code
7-
use cortex_r as _;
7+
use cortex_ar as _;
88
use cortex_r_examples as _;
99

1010
use semihosting::println;

cortex-r-examples/src/bin/registers.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#![no_main]
55

66
// pull in our start-up code
7-
use cortex_r as _;
7+
use cortex_ar as _;
88
use cortex_r_examples as _;
99

1010
use semihosting::println;
@@ -24,20 +24,20 @@ pub extern "C" fn kmain() {
2424
}
2525

2626
fn chip_info() {
27-
println!("{:?}", cortex_r::register::Midr::read());
28-
println!("{:?}", cortex_r::register::Cpsr::read());
27+
println!("{:?}", cortex_ar::register::Midr::read());
28+
println!("{:?}", cortex_ar::register::Cpsr::read());
2929
#[cfg(arm_architecture = "v8-r")]
3030
{
31-
println!("{:?}", cortex_r::register::ImpCbar::read());
32-
println!("{:?}", cortex_r::register::Vbar::read());
31+
println!("{:?}", cortex_ar::register::ImpCbar::read());
32+
println!("{:?}", cortex_ar::register::Vbar::read());
3333
// This only works in EL2 and start-up put us in EL1
34-
// println!("{:?}", cortex_r::register::Hvbar::read());
34+
// println!("{:?}", cortex_ar::register::Hvbar::read());
3535
}
3636
}
3737

3838
#[cfg(arm_architecture = "v7-r")]
3939
fn mpu_pmsa_v7() {
40-
use cortex_r::{
40+
use cortex_ar::{
4141
pmsav7::{CacheablePolicy, Config, MemAttr, Mpu, Region, RegionSize},
4242
register::Mpuir,
4343
};
@@ -90,7 +90,7 @@ fn mpu_pmsa_v7() {
9090

9191
#[cfg(arm_architecture = "v8-r")]
9292
fn mpu_pmsa_v8() {
93-
use cortex_r::{
93+
use cortex_ar::{
9494
pmsav8::{
9595
AccessPerms, Cacheable, Config, El1Mpu, MemAttr, Region, RwAllocPolicy, Shareability,
9696
},
@@ -140,12 +140,12 @@ fn mpu_pmsa_v8() {
140140
fn test_changing_sctlr() {
141141
println!(
142142
"{:?} before setting C, I and Z",
143-
cortex_r::register::Sctlr::read()
143+
cortex_ar::register::Sctlr::read()
144144
);
145-
cortex_r::register::Sctlr::modify(|w| {
145+
cortex_ar::register::Sctlr::modify(|w| {
146146
w.set_c(true);
147147
w.set_i(true);
148148
w.set_z(true);
149149
});
150-
println!("{:?} after", cortex_r::register::Sctlr::read());
150+
println!("{:?} after", cortex_ar::register::Sctlr::read());
151151
}

cortex-r-examples/src/bin/svc.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#![no_main]
55

66
// pull in our start-up code
7-
use cortex_r as _;
7+
use cortex_ar as _;
88
use cortex_r_examples as _;
99

1010
use semihosting::println;
@@ -27,7 +27,7 @@ fn main() -> Result<(), core::fmt::Error> {
2727
let y = x + 1;
2828
let z = (y as f64) * 1.5;
2929
println!("x = {}, y = {}, z = {:0.3}", x, y, z);
30-
cortex_r::svc!(0xABCDEF);
30+
cortex_ar::svc!(0xABCDEF);
3131
println!("x = {}, y = {}, z = {:0.3}", x, y, z);
3232
panic!("I am an example panic");
3333
}
@@ -38,6 +38,6 @@ unsafe extern "C" fn _svc_handler(arg: u32) {
3838
println!("In _svc_handler, with arg={:#06x}", arg);
3939
if arg == 0xABCDEF {
4040
// test nested SVC calls
41-
cortex_r::svc!(0x456789);
41+
cortex_ar::svc!(0x456789);
4242
}
4343
}

cortex-r-rt/Cargo.toml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,22 @@
11
[package]
2-
authors = ["Jonathan Pallant <[email protected]>", "The Cortex-R Team <[email protected]>"]
2+
authors = [
3+
"Jonathan Pallant <[email protected]>",
4+
"The Cortex-R Team <[email protected]>"
5+
]
6+
categories = [
7+
"embedded",
8+
"no-std",
9+
]
310
description = "Run-time support for Arm Cortex-R"
411
edition = "2021"
12+
keywords = [
13+
"arm",
14+
"cortex-r",
15+
"embedded",
16+
"no_std",
17+
"no-std",
18+
"run-time",
19+
]
520
license = "MIT OR Apache-2.0"
621
name = "cortex-r-rt"
722
readme = "README.md"
@@ -10,7 +25,7 @@ rust-version = "1.82"
1025
version = "0.1.0"
1126

1227
[dependencies]
13-
cortex-r = {version = "0.1.0", path = "../cortex-r"}
28+
cortex-ar = {version = "0.1.0", path = "../cortex-ar"}
1429
semihosting = {version = "0.1.18", features = ["stdio"]}
1530

1631
[features]

cortex-r-rt/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@
8585
8686
#![no_std]
8787

88-
use cortex_r::register::{cpsr::ProcessorMode, Cpsr};
88+
use cortex_ar::register::{cpsr::ProcessorMode, Cpsr};
8989

9090
#[cfg(arm_architecture = "v8-r")]
91-
use cortex_r::register::Hactlr;
91+
use cortex_ar::register::Hactlr;
9292

9393
/// Our default exception handler.
9494
///
@@ -424,7 +424,7 @@ core::arch::global_asm!(
424424
.raw_value()
425425
},
426426
te_bit = const {
427-
cortex_r::register::Sctlr::new_with_raw_value(0)
427+
cortex_ar::register::Sctlr::new_with_raw_value(0)
428428
.with_te(true)
429429
.raw_value()
430430
}

0 commit comments

Comments
 (0)