Skip to content

Commit 8f9fb1d

Browse files
committed
Merge upstream
2 parents a180cc1 + 78add9d commit 8f9fb1d

File tree

4 files changed

+26
-13
lines changed

4 files changed

+26
-13
lines changed

CHANGELOG.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,22 @@
55
### New Features
66

77
- Add support for the Watchdog Timer peripheral ([#175])
8-
- Renamed RTFM examples to RTIC examples ([#183])
9-
- Updated comment style ([#180])
108
- Support VDD source for the ADC ([#181])
119

12-
[#175]: https://github.com/nrf-rs/nrf-hal/pull/175
13-
[#180]: https://github.com/nrf-rs/nrf-hal/pull/180
14-
[#181]: https://github.com/nrf-rs/nrf-hal/pull/181
15-
[#183]: https://github.com/nrf-rs/nrf-hal/pull/183
16-
1710
### Fixes
1811

19-
None
12+
- Renamed RTFM examples to RTIC examples ([#183])
13+
- Updated comment style ([#180])
2014

2115
### Breaking Changes
2216

2317
None
2418

19+
[#175]: https://github.com/nrf-rs/nrf-hal/pull/175
20+
[#180]: https://github.com/nrf-rs/nrf-hal/pull/180
21+
[#181]: https://github.com/nrf-rs/nrf-hal/pull/181
22+
[#183]: https://github.com/nrf-rs/nrf-hal/pull/183
23+
2524
## [0.11.0]
2625

2726
### New Features
@@ -55,5 +54,6 @@ None
5554
[#168]: https://github.com/nrf-rs/nrf-hal/pull/168
5655
[#167]: https://github.com/nrf-rs/nrf-hal/pull/167
5756
[#172]: https://github.com/nrf-rs/nrf-hal/pull/172
57+
5858
[0.11.0]: https://github.com/nrf-rs/nrf-hal/releases/tag/v0.11.0
5959
[0.11.1]: https://github.com/nrf-rs/nrf-hal/releases/tag/v0.11.1

nrf51-hal/build.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ use std::io::Write;
44
use std::path::PathBuf;
55

66
fn main() {
7+
let target = env::var("TARGET").unwrap();
8+
if target.starts_with("thumbv7") || target.starts_with("thumbv8") {
9+
panic!(
10+
"nrf51-hal only supports thumbv6 targets (attempting to build for `{}`)",
11+
target
12+
);
13+
}
14+
715
if let Some((flash, mem)) = memory_sizes() {
816
let out = &PathBuf::from(env::var_os("OUT_DIR").unwrap());
917

nrf52810-hal/build.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ use std::io::Write;
44
use std::path::PathBuf;
55

66
fn main() {
7+
let target = env::var("TARGET").unwrap();
8+
if target.ends_with("eabihf") {
9+
panic!("attempting to build nrf52810-hal for target `{}`, but the nRF52810 does not have an FPU", target);
10+
}
11+
712
// Put the linker script somewhere the linker can find it
813
let out = &PathBuf::from(env::var_os("OUT_DIR").unwrap());
914
File::create(out.join("memory.x"))

scripts/build.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ cargo build --manifest-path nrf52840-hal/Cargo.toml
2121
# Build all the example projects.
2222

2323
echo Building examples/ccm-demo...
24-
cargo build --manifest-path examples/ccm-demo/Cargo.toml --features=52810
24+
cargo build --manifest-path examples/ccm-demo/Cargo.toml --features=52810 --target thumbv7em-none-eabi
2525
cargo build --manifest-path examples/ccm-demo/Cargo.toml --features=52832
2626
cargo build --manifest-path examples/ccm-demo/Cargo.toml --features=52833
2727
cargo build --manifest-path examples/ccm-demo/Cargo.toml --features=52840
@@ -30,11 +30,11 @@ echo Building examples/comp-demo...
3030
cargo build --manifest-path examples/comp-demo/Cargo.toml
3131

3232
echo Building examples/ecb-demo...
33-
cargo build --manifest-path examples/ecb-demo/Cargo.toml --features=52810
33+
cargo build --manifest-path examples/ecb-demo/Cargo.toml --features=52810 --target thumbv7em-none-eabi
3434
cargo build --manifest-path examples/ecb-demo/Cargo.toml --features=52832
3535
cargo build --manifest-path examples/ecb-demo/Cargo.toml --features=52833
3636
cargo build --manifest-path examples/ecb-demo/Cargo.toml --features=52840
37-
cargo build --manifest-path examples/ecb-demo/Cargo.toml --features=51
37+
cargo build --manifest-path examples/ecb-demo/Cargo.toml --features=51 --target thumbv6m-none-eabi
3838

3939
echo Building examples/gpiote-demo...
4040
cargo build --manifest-path examples/gpiote-demo/Cargo.toml
@@ -50,8 +50,8 @@ echo Building examples/lpcomp-demo...
5050
cargo build --manifest-path examples/lpcomp-demo/Cargo.toml
5151

5252
echo Building examples/ppi-demo...
53-
cargo build --manifest-path examples/ppi-demo/Cargo.toml --features=51
54-
cargo build --manifest-path examples/ppi-demo/Cargo.toml --features=52810
53+
cargo build --manifest-path examples/ppi-demo/Cargo.toml --features=51 --target thumbv6m-none-eabi
54+
cargo build --manifest-path examples/ppi-demo/Cargo.toml --features=52810 --target thumbv7em-none-eabi
5555
cargo build --manifest-path examples/ppi-demo/Cargo.toml --features=52832
5656
cargo build --manifest-path examples/ppi-demo/Cargo.toml --features=52833
5757
cargo build --manifest-path examples/ppi-demo/Cargo.toml --features=52840

0 commit comments

Comments
 (0)