Skip to content

Commit 86ce891

Browse files
bors[bot]dependabot[bot]AfoHT
authored
Merge #680
680: Update cortex-m-semihosting requirement from 0.3.3 to 0.5.0 r=AfoHT a=dependabot[bot] Updates the requirements on [cortex-m-semihosting](https://github.com/rust-embedded/cortex-m) to permit the latest version. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/rust-embedded/cortex-m/blob/master/CHANGELOG.md">cortex-m-semihosting's changelog</a>.</em></p> <blockquote> <h2>[v0.5.0] - 2018-05-11</h2> <h3>Added</h3> <ul> <li> <p><code>DebugMonitor</code> and <code>SecureFault</code> variants to the <code>Exception</code> enumeration.</p> </li> <li> <p>An optional <code>&quot;inline-asm&quot;</code> feature</p> </li> </ul> <h3>Changed</h3> <ul> <li> <p>[breaking-change] This crate now requires <code>arm-none-eabi-gcc</code> to be installed and available in <code>$PATH</code> when built with the <code>&quot;inline-asm&quot;</code> feature disabled (which is disabled by default).</p> </li> <li> <p>[breaking-change] The <code>register::{apsr,lr,pc}</code> modules are now behind the <code>&quot;inline-asm&quot;</code> feature.</p> </li> <li> <p>[breaking-change] Some variants of the <code>Exception</code> enumeration are no longer available on <code>thumbv6m-none-eabi</code>. See API docs for details.</p> </li> <li> <p>[breaking-change] Several of the variants of the <code>Exception</code> enumeration have been renamed to match the CMSIS specification.</p> </li> <li> <p>[breaking-change] fixed typo in <code>shcrs</code> field of <code>scb::RegisterBlock</code>; it was previously named <code>shpcrs</code>.</p> </li> <li> <p>[breaking-change] removed several fields from <code>scb::RegisterBlock</code> on ARMv6-M. These registers are not available on that sub-architecture.</p> </li> <li> <p>[breaking-change] changed the type of <code>scb::RegisterBlock.shpr</code> from <code>RW&lt;u8&gt;</code> to <code>RW&lt;u32&gt;</code> on ARMv6-M. These registers are word accessible only on that sub-architecture.</p> </li> <li> <p>[breaking-change] renamed the <code>mmar</code> field of <code>scb::RegisterBlock</code> to <code>mmfar</code> to match the CMSIS name.</p> </li> <li> <p>[breaking-change] removed the <code>iabr</code> field from <code>scb::RegisterBlock</code> on ARMv6-M. This register is not available on that sub-architecture.</p> </li> <li> <p>[breaking-change] removed several fields from <code>cpuid::RegisterBlock</code> on ARMv6-M. These registers are not available on that sub-architecture.</p> </li> <li> <p>[breaking-change] The <code>Mutex.new</code> constructor is not a <code>const fn</code> by default. To make it a <code>const fn</code> you have to opt into the <code>&quot;const-fn&quot;</code> feature, which was added in v0.5.1, and switch to a nightly compiler.</p> </li> </ul> <h3>Removed</h3> <ul> <li>[breaking-change] The <code>exception</code> module has been removed. A replacement for <code>Exception::active</code> can be found in <code>SCB::vect_active</code>. A modified version <code>exception::Exception</code> can be found in the <code>peripheral::scb</code> module.</li> </ul> <h2>[v0.4.3] - 2018-01-25</h2> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/rust-embedded/cortex-m/commit/a448e9156e2cb1e556e5441fd65426952ef4b927"><code>a448e91</code></a> v0.5.0</li> <li><a href="https://github.com/rust-embedded/cortex-m/commit/e3217ad94d6c941796c2d7ee8735e7b250a69387"><code>e3217ad</code></a> Merge <a href="https://github-redirect.dependabot.com/rust-embedded/cortex-m/issues/88">#88</a></li> <li><a href="https://github.com/rust-embedded/cortex-m/commit/05bbc3b815703a0654d2e37966547e392f856161"><code>05bbc3b</code></a> always list all the peripherals in <code>Peripherals</code></li> <li><a href="https://github.com/rust-embedded/cortex-m/commit/550f94902fc1f84241c200b5af02a2cc369a56d1"><code>550f949</code></a> fix build for ARMv7E-M + &quot;inline-asm&quot;</li> <li><a href="https://github.com/rust-embedded/cortex-m/commit/7d51707b5f1b19c148ec4c21decd83abcdf7b2ca"><code>7d51707</code></a> simplify #[cfg]s</li> <li><a href="https://github.com/rust-embedded/cortex-m/commit/2cd6092848cfa35ab64fce7ccf87e52402fc41e6"><code>2cd6092</code></a> ARMv6-M: remove fields that are not available from cpuid::RegisterBlock</li> <li><a href="https://github.com/rust-embedded/cortex-m/commit/17bd0c8e88e1bbd036f940df80e8d047a46025e1"><code>17bd0c8</code></a> fix x86_64 tests</li> <li><a href="https://github.com/rust-embedded/cortex-m/commit/c290aa4ee89951a0ea503b129f6c5bd3d47a663d"><code>c290aa4</code></a> ARMv6-M: remove fields that are not available from NVIC and SCB</li> <li><a href="https://github.com/rust-embedded/cortex-m/commit/716398ce542798aff238abc6a978d3b64a1c0dd4"><code>716398c</code></a> fix build on ARMv6-M</li> <li><a href="https://github.com/rust-embedded/cortex-m/commit/1d6864377202bc64e522deeb5dd044e593d83ebb"><code>1d68643</code></a> fix build on ARMv7E-M</li> <li>Additional commits viewable in <a href="https://github.com/rust-embedded/cortex-m/compare/c-m-sh-v0.3.5...v0.5.0">compare view</a></li> </ul> </details> <br /> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting ``@dependabot` rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - ``@dependabot` rebase` will rebase this PR - ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it - ``@dependabot` merge` will merge this PR after your CI passes on it - ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it - ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging - ``@dependabot` reopen` will reopen this PR if it is closed - ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Henrik Tjäder <[email protected]>
2 parents b1fda94 + de3056e commit 86ce891

35 files changed

+113
-112
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ For each category, *Added*, *Changed*, *Fixed* add new entries at the top!
1919

2020
### Changed
2121

22+
- Updated dev-dependency cortex-m-semihosting to v0.5
2223
- CI: Updated to setup-python@v4
2324
- CI: Updated to checkout@v3
2425
- Tuned redirect message for rtic.rs/meeting

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ version_check = "0.9"
3232

3333
[dev-dependencies]
3434
lm3s6965 = "0.1.3"
35-
cortex-m-semihosting = "0.3.3"
35+
cortex-m-semihosting = "0.5.0"
3636
systick-monotonic = "1.0.0"
3737

3838
[dev-dependencies.panic-semihosting]

examples/binds.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,22 @@ mod app {
2323
fn init(_: init::Context) -> (Shared, Local, init::Monotonics) {
2424
rtic::pend(Interrupt::UART0);
2525

26-
hprintln!("init").unwrap();
26+
hprintln!("init");
2727

2828
(Shared {}, Local {}, init::Monotonics())
2929
}
3030

3131
#[idle]
3232
fn idle(_: idle::Context) -> ! {
33-
hprintln!("idle").unwrap();
33+
hprintln!("idle");
3434

3535
rtic::pend(Interrupt::UART0);
3636

37-
debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
38-
3937
loop {
38+
// Exit moved after nop to ensure that rtic::pend gets
39+
// to run before exiting
4040
cortex_m::asm::nop();
41+
debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
4142
}
4243
}
4344

@@ -49,7 +50,6 @@ mod app {
4950
"foo called {} time{}",
5051
*cx.local.times,
5152
if *cx.local.times > 1 { "s" } else { "" }
52-
)
53-
.unwrap();
53+
);
5454
}
5555
}

examples/cancel-reschedule.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ mod app {
2828
// Initialize the monotonic (SysTick rate in QEMU is 12 MHz)
2929
let mono = Systick::new(systick, 12_000_000);
3030

31-
hprintln!("init").ok();
31+
hprintln!("init");
3232

3333
// Schedule `foo` to run 1 second in the future
3434
foo::spawn_after(1.secs()).unwrap();
@@ -42,7 +42,7 @@ mod app {
4242

4343
#[task]
4444
fn foo(_: foo::Context) {
45-
hprintln!("foo").ok();
45+
hprintln!("foo");
4646

4747
// Schedule `bar` to run 2 seconds in the future (1 second after foo runs)
4848
let spawn_handle = baz::spawn_after(2.secs()).unwrap();
@@ -51,7 +51,7 @@ mod app {
5151

5252
#[task]
5353
fn bar(_: bar::Context, baz_handle: baz::SpawnHandle, do_reschedule: bool) {
54-
hprintln!("bar").ok();
54+
hprintln!("bar");
5555

5656
if do_reschedule {
5757
// Reschedule baz 2 seconds from now, instead of the original 1 second
@@ -67,7 +67,7 @@ mod app {
6767

6868
#[task]
6969
fn baz(_: baz::Context) {
70-
hprintln!("baz").ok();
70+
hprintln!("baz");
7171
debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
7272
}
7373
}

examples/capacity.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ mod app {
3737

3838
#[task(capacity = 4)]
3939
fn foo(_: foo::Context, x: u32) {
40-
hprintln!("foo({})", x).unwrap();
40+
hprintln!("foo({})", x);
4141
}
4242

4343
#[task]
4444
fn bar(_: bar::Context) {
45-
hprintln!("bar").unwrap();
45+
hprintln!("bar");
4646

4747
debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
4848
}

examples/cfg-whole-task.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ mod app {
8888
"foo has been called {} time{}",
8989
n,
9090
if n == 1 { "" } else { "s" }
91-
)
92-
.ok();
91+
);
9392
}
9493
}

examples/common.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,15 @@ mod app {
7373
// This task is only spawned once in `init`, hence this task will run
7474
// only once
7575

76-
hprintln!("foo").ok();
76+
hprintln!("foo");
7777
}
7878

7979
// Software task, also not bound to a hardware interrupt
8080
// This task takes the task local resource `l2`
8181
// The resources `s1` and `s2` are shared between all other tasks.
8282
#[task(shared = [s1, s2], local = [l2])]
8383
fn bar(_: bar::Context) {
84-
hprintln!("bar").ok();
84+
hprintln!("bar");
8585

8686
// Run `bar` once per second
8787
bar::spawn_after(1.secs()).unwrap();
@@ -97,6 +97,6 @@ mod app {
9797
// Note that RTIC does NOT clear the interrupt flag, this is up to the
9898
// user
9999

100-
hprintln!("UART0 interrupt!").ok();
100+
hprintln!("UART0 interrupt!");
101101
}
102102
}

examples/complex.rs

Lines changed: 25 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ mod app {
2525

2626
#[init]
2727
fn init(_: init::Context) -> (Shared, Local, init::Monotonics) {
28-
hprintln!("init").unwrap();
28+
hprintln!("init");
2929

3030
(
3131
Shared {
@@ -40,31 +40,31 @@ mod app {
4040

4141
#[idle(shared = [s2, s3])]
4242
fn idle(mut cx: idle::Context) -> ! {
43-
hprintln!("idle p0 started").ok();
43+
hprintln!("idle p0 started");
4444
rtic::pend(Interrupt::GPIOC);
4545
cx.shared.s3.lock(|s| {
46-
hprintln!("idle enter lock s3 {}", s).ok();
47-
hprintln!("idle pend t0").ok();
46+
hprintln!("idle enter lock s3 {}", s);
47+
hprintln!("idle pend t0");
4848
rtic::pend(Interrupt::GPIOA); // t0 p2, with shared ceiling 3
49-
hprintln!("idle pend t1").ok();
49+
hprintln!("idle pend t1");
5050
rtic::pend(Interrupt::GPIOB); // t1 p3, with shared ceiling 3
51-
hprintln!("idle pend t2").ok();
51+
hprintln!("idle pend t2");
5252
rtic::pend(Interrupt::GPIOC); // t2 p4, no sharing
53-
hprintln!("idle still in lock s3 {}", s).ok();
53+
hprintln!("idle still in lock s3 {}", s);
5454
});
55-
hprintln!("\nback in idle").ok();
55+
hprintln!("\nback in idle");
5656

5757
cx.shared.s2.lock(|s| {
58-
hprintln!("enter lock s2 {}", s).ok();
59-
hprintln!("idle pend t0").ok();
58+
hprintln!("enter lock s2 {}", s);
59+
hprintln!("idle pend t0");
6060
rtic::pend(Interrupt::GPIOA); // t0 p2, with shared ceiling 2
61-
hprintln!("idle pend t1").ok();
61+
hprintln!("idle pend t1");
6262
rtic::pend(Interrupt::GPIOB); // t1 p3, no sharing
63-
hprintln!("idle pend t2").ok();
63+
hprintln!("idle pend t2");
6464
rtic::pend(Interrupt::GPIOC); // t2 p4, no sharing
65-
hprintln!("idle still in lock s2 {}", s).ok();
65+
hprintln!("idle still in lock s2 {}", s);
6666
});
67-
hprintln!("\nidle exit").ok();
67+
hprintln!("\nidle exit");
6868

6969
debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
7070

@@ -82,9 +82,8 @@ mod app {
8282
"t0 p2 called {} time{}",
8383
*cx.local.times,
8484
if *cx.local.times > 1 { "s" } else { "" }
85-
)
86-
.ok();
87-
hprintln!("t0 p2 exit").ok();
85+
);
86+
hprintln!("t0 p2 exit");
8887
}
8988

9089
#[task(binds = GPIOB, priority = 3, local = [times: u32 = 0], shared = [s3, s4])]
@@ -96,19 +95,18 @@ mod app {
9695
"t1 p3 called {} time{}",
9796
*cx.local.times,
9897
if *cx.local.times > 1 { "s" } else { "" }
99-
)
100-
.ok();
98+
);
10199

102100
cx.shared.s4.lock(|s| {
103-
hprintln!("t1 enter lock s4 {}", s).ok();
104-
hprintln!("t1 pend t0").ok();
101+
hprintln!("t1 enter lock s4 {}", s);
102+
hprintln!("t1 pend t0");
105103
rtic::pend(Interrupt::GPIOA); // t0 p2, with shared ceiling 2
106-
hprintln!("t1 pend t2").ok();
104+
hprintln!("t1 pend t2");
107105
rtic::pend(Interrupt::GPIOC); // t2 p4, no sharing
108-
hprintln!("t1 still in lock s4 {}", s).ok();
106+
hprintln!("t1 still in lock s4 {}", s);
109107
});
110108

111-
hprintln!("t1 p3 exit").ok();
109+
hprintln!("t1 p3 exit");
112110
}
113111

114112
#[task(binds = GPIOC, priority = 4, local = [times: u32 = 0], shared = [s4])]
@@ -120,13 +118,12 @@ mod app {
120118
"t2 p4 called {} time{}",
121119
*cx.local.times,
122120
if *cx.local.times > 1 { "s" } else { "" }
123-
)
124-
.unwrap();
121+
);
125122

126123
cx.shared.s4.lock(|s| {
127-
hprintln!("enter lock s4 {}", s).ok();
124+
hprintln!("enter lock s4 {}", s);
128125
*s += 1;
129126
});
130-
hprintln!("t3 p4 exit").ok();
127+
hprintln!("t3 p4 exit");
131128
}
132129
}

examples/destructure.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ mod app {
4242
let b = cx.shared.b;
4343
let c = cx.shared.c;
4444

45-
hprintln!("foo: a = {}, b = {}, c = {}", a, b, c).unwrap();
45+
hprintln!("foo: a = {}, b = {}, c = {}", a, b, c);
4646
}
4747

4848
// De-structure-ing syntax
4949
#[task(shared = [&a, &b, &c])]
5050
fn bar(cx: bar::Context) {
5151
let bar::SharedResources { a, b, c } = cx.shared;
5252

53-
hprintln!("bar: a = {}, b = {}, c = {}", a, b, c).unwrap();
53+
hprintln!("bar: a = {}, b = {}, c = {}", a, b, c);
5454
}
5555
}

examples/extern_binds.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use panic_semihosting as _;
1010

1111
// Free function implementing the interrupt bound task `foo`.
1212
fn foo(_: app::foo::Context) {
13-
hprintln!("foo called").ok();
13+
hprintln!("foo called");
1414
}
1515

1616
#[rtic::app(device = lm3s6965)]
@@ -29,21 +29,22 @@ mod app {
2929
fn init(_: init::Context) -> (Shared, Local, init::Monotonics) {
3030
rtic::pend(Interrupt::UART0);
3131

32-
hprintln!("init").unwrap();
32+
hprintln!("init");
3333

3434
(Shared {}, Local {}, init::Monotonics())
3535
}
3636

3737
#[idle]
3838
fn idle(_: idle::Context) -> ! {
39-
hprintln!("idle").unwrap();
39+
hprintln!("idle");
4040

4141
rtic::pend(Interrupt::UART0);
4242

43-
debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
44-
4543
loop {
4644
cortex_m::asm::nop();
45+
// Exit moved after nop to ensure that rtic::pend gets
46+
// to run before exiting
47+
debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
4748
}
4849
}
4950

0 commit comments

Comments
 (0)