From 4fe3688d0570f699d8945f2bb47169e5e96d1222 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Wed, 3 Mar 2021 09:26:09 +0100 Subject: [PATCH 1/3] Fix the CI tests by using latest mdbook --- .github/workflows/build.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0ec72bb1cb..a2c2911022 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -628,9 +628,9 @@ jobs: run: pip install git+https://github.com/linkchecker/linkchecker.git - name: mdBook Action - uses: peaceiris/actions-mdbook@v1.1.11 + uses: peaceiris/actions-mdbook@v1 with: - mdbook-version: '0.3.1' + mdbook-version: 'latest' - name: Build book in English run: cd book/en && mdbook build @@ -682,10 +682,9 @@ jobs: run: python -c "import sys; print(sys.version)" - name: mdBook Action - uses: peaceiris/actions-mdbook@v1.1.11 + uses: peaceiris/actions-mdbook@v1 with: - mdbook-version: '0.3.1' - # mdbook-version: 'latest' + mdbook-version: 'latest' - name: Remove cargo-config run: rm -f .cargo/config From 612bb60ac6daeb40b71208a4cfe29aab73861767 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Wed, 3 Mar 2021 09:48:54 +0100 Subject: [PATCH 2/3] Make linkchecker happy --- book/en/src/preface.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/book/en/src/preface.md b/book/en/src/preface.md index 0f9da03c9e..4abededffc 100644 --- a/book/en/src/preface.md +++ b/book/en/src/preface.md @@ -18,8 +18,8 @@ There is a translation of this book in [Russian]. This is the documentation of v0.5.x of RTIC; for the documentation of -* development version go [here](/dev). -* v0.4.x go [here](/0.4). +* development version go [here](/dev/). +* v0.4.x go [here](/0.4/). {{#include ../../../README.md:7:46}} From 6d7da143ac3a87663c501c79f4c17c744add33ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Wed, 3 Mar 2021 09:48:54 +0100 Subject: [PATCH 3/3] Use panic-semihosting, fix ui-tests --- Cargo.toml | 1 - examples/not-send.rs | 2 +- examples/not-sync.rs | 2 +- examples/schedule.rs | 2 +- examples/shared-with-init.rs | 2 +- examples/t-binds.rs | 2 +- examples/t-cfg-resources.rs | 2 +- examples/t-cfg.rs | 2 +- examples/t-late-not-send.rs | 2 +- examples/t-resource.rs | 2 +- examples/t-schedule.rs | 2 +- examples/t-spawn.rs | 2 +- ui/single/locals-cfg.stderr | 8 -------- ui/single/task-priority-too-high.rs | 2 -- ui/single/task-priority-too-high.stderr | 12 ++---------- 15 files changed, 13 insertions(+), 32 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index d956113951..1947110d51 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -66,7 +66,6 @@ version = "0.1.0-alpha.2" [dev-dependencies] lm3s6965 = "0.1.3" -panic-halt = "0.2.0" cortex-m-semihosting = "0.3.3" [dev-dependencies.panic-semihosting] diff --git a/examples/not-send.rs b/examples/not-send.rs index 16a874dc0f..2c5c6dc8a0 100644 --- a/examples/not-send.rs +++ b/examples/not-send.rs @@ -8,7 +8,7 @@ use core::marker::PhantomData; use cortex_m_semihosting::debug; -use panic_halt as _; +use panic_semihosting as _; use rtic::app; pub struct NotSend { diff --git a/examples/not-sync.rs b/examples/not-sync.rs index a7eaac8e7f..fbc76472f0 100644 --- a/examples/not-sync.rs +++ b/examples/not-sync.rs @@ -8,7 +8,7 @@ use core::marker::PhantomData; use cortex_m_semihosting::debug; -use panic_halt as _; +use panic_semihosting as _; pub struct NotSync { _0: PhantomData<*const ()>, diff --git a/examples/schedule.rs b/examples/schedule.rs index 70a7a5e328..be86c387a3 100644 --- a/examples/schedule.rs +++ b/examples/schedule.rs @@ -7,7 +7,7 @@ use cortex_m::peripheral::DWT; use cortex_m_semihosting::hprintln; -use panic_halt as _; +use panic_semihosting as _; use rtic::cyccnt::{Instant, U32Ext as _}; // NOTE: does NOT work on QEMU! diff --git a/examples/shared-with-init.rs b/examples/shared-with-init.rs index bd55f7efd5..153a8eaefd 100644 --- a/examples/shared-with-init.rs +++ b/examples/shared-with-init.rs @@ -7,7 +7,7 @@ use cortex_m_semihosting::debug; use lm3s6965::Interrupt; -use panic_halt as _; +use panic_semihosting as _; use rtic::app; pub struct MustBeSend; diff --git a/examples/t-binds.rs b/examples/t-binds.rs index 588ac46fa6..5dcec492f3 100644 --- a/examples/t-binds.rs +++ b/examples/t-binds.rs @@ -5,7 +5,7 @@ #![no_main] #![no_std] -use panic_halt as _; +use panic_semihosting as _; #[rtic::app(device = lm3s6965)] const APP: () = { diff --git a/examples/t-cfg-resources.rs b/examples/t-cfg-resources.rs index eb00fe5923..94ca938e86 100644 --- a/examples/t-cfg-resources.rs +++ b/examples/t-cfg-resources.rs @@ -3,7 +3,7 @@ #![no_main] #![no_std] -use panic_halt as _; +use panic_semihosting as _; #[rtic::app(device = lm3s6965)] const APP: () = { diff --git a/examples/t-cfg.rs b/examples/t-cfg.rs index 52e6d1c9d3..7b98547ba4 100644 --- a/examples/t-cfg.rs +++ b/examples/t-cfg.rs @@ -3,7 +3,7 @@ #![no_main] #![no_std] -use panic_halt as _; +use panic_semihosting as _; #[rtic::app(device = lm3s6965, monotonic = rtic::cyccnt::CYCCNT)] const APP: () = { diff --git a/examples/t-late-not-send.rs b/examples/t-late-not-send.rs index c464e73b64..8b2aa5f94f 100644 --- a/examples/t-late-not-send.rs +++ b/examples/t-late-not-send.rs @@ -5,7 +5,7 @@ use core::marker::PhantomData; -use panic_halt as _; +use panic_semihosting as _; pub struct NotSend { _0: PhantomData<*const ()>, diff --git a/examples/t-resource.rs b/examples/t-resource.rs index 53665dc933..0a0fadfbcb 100644 --- a/examples/t-resource.rs +++ b/examples/t-resource.rs @@ -5,7 +5,7 @@ #![no_main] #![no_std] -use panic_halt as _; +use panic_semihosting as _; #[rtic::app(device = lm3s6965)] const APP: () = { diff --git a/examples/t-schedule.rs b/examples/t-schedule.rs index 4a23182273..bc4fccce90 100644 --- a/examples/t-schedule.rs +++ b/examples/t-schedule.rs @@ -5,7 +5,7 @@ #![no_main] #![no_std] -use panic_halt as _; +use panic_semihosting as _; use rtic::cyccnt::{Instant, U32Ext as _}; #[rtic::app(device = lm3s6965, monotonic = rtic::cyccnt::CYCCNT)] diff --git a/examples/t-spawn.rs b/examples/t-spawn.rs index 2d941b1567..a75a6e916d 100644 --- a/examples/t-spawn.rs +++ b/examples/t-spawn.rs @@ -5,7 +5,7 @@ #![no_main] #![no_std] -use panic_halt as _; +use panic_semihosting as _; #[rtic::app(device = lm3s6965)] const APP: () = { diff --git a/ui/single/locals-cfg.stderr b/ui/single/locals-cfg.stderr index bb558fa60e..8c01407115 100644 --- a/ui/single/locals-cfg.stderr +++ b/ui/single/locals-cfg.stderr @@ -27,11 +27,3 @@ error[E0425]: cannot find value `FOO` in this scope | 44 | FOO; | ^^^ not found in this scope - -error: duplicate lang item in crate `panic_halt`: `panic_impl`. - | - = note: first defined in crate `std`. - -error: duplicate lang item in crate `panic_semihosting`: `panic_impl`. - | - = note: first defined in crate `panic_halt`. diff --git a/ui/single/task-priority-too-high.rs b/ui/single/task-priority-too-high.rs index 539c3f5d0e..76c0a9727b 100644 --- a/ui/single/task-priority-too-high.rs +++ b/ui/single/task-priority-too-high.rs @@ -1,7 +1,5 @@ #![no_main] -use rtic::app; - #[rtic::app(device = lm3s6965)] const APP: () = { #[init] diff --git a/ui/single/task-priority-too-high.stderr b/ui/single/task-priority-too-high.stderr index eae6074df9..4434995b01 100644 --- a/ui/single/task-priority-too-high.stderr +++ b/ui/single/task-priority-too-high.stderr @@ -1,13 +1,5 @@ -warning: unused import: `rtic::app` - --> $DIR/task-priority-too-high.rs:3:5 - | -3 | use rtic::app; - | ^^^^^^^^^ - | - = note: #[warn(unused_imports)] on by default - error[E0080]: evaluation of constant value failed - --> $DIR/task-priority-too-high.rs:5:1 + --> $DIR/task-priority-too-high.rs:3:1 | -5 | #[rtic::app(device = lm3s6965)] +3 | #[rtic::app(device = lm3s6965)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempt to subtract with overflow