10000 Docs 2 by datdenkikniet · Pull Request #741 · rtic-rs/rtic · GitHub
[go: up one dir, main page]

Skip to content

Docs 2 #741

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 31 commits into from
May 23, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
16f8ea9
Fix this link
datdenkikniet Apr 22, 2023
1dc2f80
Begin migration guide
datdenkikniet Apr 22, 2023
d90fa95
Add some more
datdenkikniet Apr 22, 2023
6c91ff2
Include the examples
datdenkikniet Apr 22, 2023
825b2c2
Update tips on Monotonic implemenations
datdenkikniet Apr 22, 2023
4437f12
Remove link to inactive `embedded_time`
datdenkikniet Apr 22, 2023
9ddae20
Fix links & info
datdenkikniet Apr 22, 2023
d22faec
Fix run-on sentence
datdenkikniet Apr 22, 2023
ed465b0
Fix #699
datdenkikniet Apr 22, 2023
3d97c9e
Move deprecated migration guides to deprecated folder
datdenkikniet Apr 22, 2023
3d98102
Refer to rtic-rs/rtic/examples instead
datdenkikniet Apr 22, 2023
a14d240
Update delay.md file to be a bit easier to read, and add spoiler tags…
datdenkikniet Apr 22, 2023
552ecd4
Promote starting a new project to it's own chapter
datdenkikniet Apr 22, 2023
a76f4cd
monotonic.md is now deprecated
datdenkikniet Apr 22, 2023
6c2c1ab
Clarify delay and timeout uses monotonics
datdenkikniet Apr 22, 2023
cb0ceea
Remove v1 reference here
datdenkikniet Apr 23, 2023
e51146a
Move tips into their own subdir
datdenkikniet Apr 23, 2023
0807aa5
Include this code as blocks instead
datdenkikniet Apr 23, 2023
a66540e
Disable the playground on all of these
datdenkikniet Apr 23, 2023
d41d28b
Add check-book.sh script
datdenkikniet May 5, 2023
0b8ea07
Fix links
datdenkikniet May 5, 2023
e3603d1
Rename deprecated to archive
datdenkikniet May 5, 2023
f2a57de
taste the rainbow!
datdenkikniet May 5, 2023
5b705dd
Don't build core and alloc & update Cargo.lock
datdenkikniet May 5, 2023
03b16a3
Archive app_task.md
datdenkikniet May 5, 2023
5c6483f
Update these
datdenkikniet May 5, 2023
ab17bbf
Demarcate a bit more
datdenkikniet May 5, 2023
4b3bf59
Move some more stuff to the archive, update this link
datdenkikniet May 20, 2023
039c2b8
Add some docs on RTIC AND embassy
datdenkikniet May 20, 2023
311291b
Make Monotonic implementation more obvious
datdenkikniet May 20, 2023
9fa073f
Fix link
datdenkikniet May 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add some docs on RTIC AND embassy
  • Loading branch information
datdenkikniet committed May 20, 2023
commit 039c2b8bd440018531d79785c63bbfb74f0e686c
1 change: 1 addition & 0 deletions book/en/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
- [`'static` super-powers](./by-example/tips/static_lifetimes.md)
- [Inspecting generated code](./by-example/tips/view_code.md)
- [RTIC vs. the world](./rtic_vs.md)
- [RTIC and Embassy](./rtic_and_embassy.md)
- [Awesome RTIC examples](./awesome_rtic.md)

---
Expand Down
17 changes: 17 additions & 0 deletions book/en/src/rtic_and_embassy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# RTIC vs. Embassy

## Differences

Embassy provides both Hardware Abstraction Layers, and an executor/runtime, while RTIC aims to only provide an execution framework. For example, embassy provides `embassy-stm32` (a HAL), and `embassy-executor` (an executor). On the other hand, RTIC provides the framework in the form of [`rtic`], and the user is responsible for providing a PAC and HAL implementation (generally from the [`stm32-rs`] project).

Additionally, RTIC aims to provide exclusive access to resources on as low a level of possible, ideally guarded by some form of hardware protection. This allows for access to hardware while not necessarily requiring locking mechanisms on the software level.

## Mixing use of Embassy and RTIC

Since most Embassy and RTIC libraries are runtime agnostic, many details from one project can be used in the other. For example, using [`rtic-monotonics`] in an `embassy-executor` powered project works, and using [`embassy-sync`] (though [`rtic-sync`] is recommended) in an RTIC project works.

[`stm32-rs`]: https://github.com/stm32-rs
[`rtic`]: https://docs.rs/rtic/latest/rtic/
[`rtic-monotonics`]: https://docs.rs/rtic-monotonics/latest/rtic_monotonics/
[`embassy-sync`]: https://docs.rs/embassy-sync/latest/embassy_sync/
[`rtic-sync`]: https://docs.rs/rtic-sync/latest/rtic_sync/
6 changes: 2 additions & 4 deletions book/en/src/rtic_vs.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ RTIC aims to provide the lowest level of abstraction needed for developing robus

It provides a minimal set of required mechanisms for safe sharing of mutable resources among interrupts and asynchronously executing tasks. The scheduling primitives leverages on the underlying hardware for unparalleled performance and predictability, in effect RTIC provides in Rust terms a zero-cost abstraction to concurrent real-time programming.



## Comparison regarding safety and security

Comparing RTIC to traditional a Real-Time Operating System (RTOS) is hard. Firstly, a traditional RTOS typically comes with no guarantees regarding system safety, even the most hardened kernels like the formally verified [seL4] kernel. Their claims to integrity, confidentiality, and availability regards only the kernel itself (under additional assumptions its configuration and environment). They even state:
Expand All @@ -16,7 +14,7 @@ Comparing RTIC to traditional a Real-Time Operating System (RTOS) is hard. First

[seL4]: https://sel4.systems/

### Security by design
## Security by design

In the world of information security we commonly find:

Expand All @@ -30,4 +28,4 @@ Thus their claim is correct, security is completely out of hands for the OS, the

RTIC on the other hand holds your back. The declarative system wide model gives you a static set of tasks and resources, with precise control over what data is shared and between which parties. Moreover, Rust as a programming language comes with strong properties regarding integrity (compile time aliasing, mutability and lifetime guarantees, together with ensured data validity).

Using RTIC these properties propagate to the system wide model, without interference of other applications running. The RTIC kernel is internally infallible without any need of dynamically allocated data.
Using RTIC these properties propagate to the system wide model, without interference of other applications running. The RTIC kernel is internally infallible without any need of dynamically allocated data.
0