668: Docs on RTOS r=AfoHT a=korken89



Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
Co-authored-by: Henrik Tjäder <henrik@tjaders.com>
This commit is contained in:
bors[bot] 2022-12-15 21:10:44 +00:00 committed by GitHub
commit 6c1743b553
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 43 additions and 15 deletions

View file

@ -16,7 +16,7 @@ jobs:
# Run cargo fmt --check, includes macros/
style:
name: style
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
@ -41,7 +41,7 @@ jobs:
# Compilation check
check:
name: check
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
matrix:
target:
@ -77,7 +77,7 @@ jobs:
# Clippy
clippy:
name: Cargo clippy
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
@ -104,7 +104,7 @@ jobs:
# Verify all examples, checks
checkexamples:
name: checkexamples
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
matrix:
target:
@ -137,7 +137,7 @@ jobs:
# Verify the example output with run-pass tests
testexamples:
name: testexamples
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
matrix:
target:
@ -182,7 +182,7 @@ jobs:
# Check the correctness of macros/ crate
checkmacros:
name: checkmacros
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
matrix:
target:
@ -216,7 +216,7 @@ jobs:
# Run the macros test-suite
testmacros:
name: testmacros
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
@ -244,7 +244,7 @@ jobs:
# Run test suite
tests:
name: tests
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
@ -271,7 +271,7 @@ jobs:
# Build documentation, check links
docs:
name: docs
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
@ -318,7 +318,7 @@ jobs:
# Build the books
mdbook:
name: mdbook
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
@ -367,7 +367,7 @@ jobs:
# This needs to run before book is built
mergetostablebranch:
name: If CI passes, merge master branch into release/vX
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs:
- style
- check
@ -408,7 +408,7 @@ jobs:
# If all tests pass, then deploy stage is run
deploy:
name: deploy
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs:
mergetostablebranch
@ -561,7 +561,7 @@ jobs:
- tests
- docs
- mdbook
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Mark the job as a success
run: exit 0

View file

@ -70,3 +70,10 @@ overflow-checks = false
[patch.crates-io]
lm3s6965 = { git = "https://github.com/japaric/lm3s6965" }
[features]
test-critical-section = ["cortex-m/critical-section-single-core"]
[[example]]
name = "pool"
required-features = ["test-critical-section"]

View file

@ -21,6 +21,18 @@ This is the documentation of v1.0.x of RTIC; for the documentation of version
* v0.5.x go [here](/0.5).
* v0.4.x go [here](/0.4).
## Is RTIC an RTOS?
A common question is whether RTIC is an RTOS or not, and depending on your background the
answer may vary. From RTIC's developers point of view; RTIC is a hardware accelerated
RTOS that utilizes the NVIC in Cortex-M MCUs to perform scheduling, rather than the more
classical software kernel.
Another common view from the community is that RTIC is a concurrency framework as there
is no software kernel and that it relies on external HALs.
---
{{#include ../../../README.md:7:47}}
{{#include ../../../README.md:48:}}

View file

@ -53,7 +53,7 @@ pub fn app(app: &App, _analysis: &Analysis) -> parse::Result<Extra> {
// If not enough tasks and first still is None, may cause
// "custom attribute panicked" due to unwrap on None
return Err(parse::Error::new(first.unwrap().span(), &s));
return Err(parse::Error::new(first.unwrap().span(), s));
}
// Check that all exceptions are valid; only exceptions with configurable priorities are

View file

@ -147,6 +147,7 @@ pub fn codegen(
None
}
})) {
#[allow(clippy::or_fun_call)]
let v = prio_to_masks.entry(priority - 1).or_insert(Vec::new());
v.push(quote!(#device::Interrupt::#name as u32));
mask_ids.push(quote!(#device::Interrupt::#name as u32));

View file

@ -46,7 +46,15 @@ impl<'a> CargoCommand<'a> {
features,
mode,
} => {
let mut args = vec![self.name(), "--example", example, "--target", target];
let mut args = vec![
self.name(),
"--example",
example,
"--target",
target,
"--features",
"test-critical-section",
];
if let Some(feature_name) = features {
args.extend_from_slice(&["--features", feature_name]);