Commit graph

1266 commits

Author SHA1 Message Date
bors[bot]
6b9966678c
Merge #511
511: Remove linked list impl - use heapless, linked list init now const fn r=AfoHT a=korken89



Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
2021-08-17 12:21:20 +00:00
Emil Fresk
bc3eb5c547 Remove linked list impl - use heapless, linked list init now const fn 2021-08-16 15:38:31 +02:00
bors[bot]
74b3964978
Merge #508
508: update russian book r=AfoHT a=burrbull



Co-authored-by: Andrey Zgarbul <zgarbul.andrey@gmail.com>
2021-08-16 11:41:49 +00:00
Jorgeig
a4b6fb3404 Add branches to CI 2021-08-11 11:28:23 +08:00
Jorgeig
c5585271e6 Add branches to CI 2021-08-11 11:27:27 +08:00
Jorge Iglesias Garcia
50ff1bfae4
Update build.yml
Add a "test" branch
2021-08-11 00:50:37 +08:00
Andrey Zgarbul
9134f7d36a update russian book 2021-08-03 22:40:33 +03:00
bors[bot]
8ddfcf8efc
Merge #504
504: Add links to RTIC book dev version and rtic-examples r=japaric a=AfoHT



Co-authored-by: Henrik Tjäder <henrik@grepit.se>
2021-08-03 15:32:52 +00:00
bors[bot]
6674848111
Merge #506
506: book: Add note to remember to choose target r=AfoHT a=CuriouslyCurious

While following the instructions in the book I ran into a wall. I was getting linker errors and had no idea why. Turns out trying to run `cargo build --example init` on an x86 build target maybe doesn't work too well, so I added a note about it. 😅

I'll leave this as a draft since my Russian isn't fluent enough to add the note there as well. Also, adding a modified version of `.config/cargo.toml` from the embedded example might be a decent idea but wanted to hear from you guys first. :P

Co-authored-by: CuriouslyCurious <thecuriouslycurious@protonmail.com>
2021-08-02 14:56:06 +00:00
bors[bot]
c867f5ff9a
Merge #507
507: GHA: Fix 1.54 formatting change r=korken89 a=AfoHT



Co-authored-by: Henrik Tjäder <henrik@grepit.se>
2021-08-02 14:24:52 +00:00
Henrik Tjäder
fe1de5cbf7 GHA: Fix 1.54 formatting change 2021-08-02 14:56:15 +02:00
CuriouslyCurious
f6f61f95a6 book: Properly update the note with a link 2021-07-30 12:44:35 +02:00
CuriouslyCurious
ae7b444f3d Revert "book: Add link to new.md"
This reverts commit 7a977f3fa9.
2021-07-30 12:43:35 +02:00
CuriouslyCurious
7a977f3fa9 book: Add link to new.md 2021-07-29 13:58:21 +02:00
CuriouslyCurious
e90e6332f6 book: Clarify target notice 2021-07-29 00:29:34 +02:00
CuriouslyCurious
007665eeee book: Add note to remember to choose target 2021-07-28 13:55:12 +02:00
Henrik Tjäder
5477ae288f Also link to rtic-examples in the tips section of the book 2021-07-27 20:04:56 +02:00
Henrik Tjäder
1e2fb2eeb2 Add links to RTIC book dev version and rtic-examples 2021-07-27 19:41:15 +02:00
bors[bot]
49d4185e3b
Merge #501
501: Propogate the task attributes to the spawn handles r=AfoHT a=crawford

This allows tasks to be gated by `cfg` attributes when also using
monotonics. For example:

```rust
#[cfg(feature = "logging")]
#[task(shared = [logger])]
fn logger_init(mut cx: logger_init::Context) {
    /* ... */
}
```

Without this change, the reschedule_at() implementation is
unconditionally included even though it references the SpawnHandle from
its task module, which is _conditionally_ included. This resulted in
compiler errors like the following:

```
error[E0433]: failed to resolve: use of undeclared crate or module `logger_init`
   --> src/main.rs:243:8
    |
243 |     fn logger_init(mut cx: logger_init::Context) {
    |        ^^^^^^^^^^^ use of undeclared crate or module `logger_init`
```

Co-authored-by: Alex Crawford <rtic@code.acrawford.com>
2021-07-22 10:57:49 +00:00
bors[bot]
adb4bc4c4e
Merge #502
502: book/resources: highlight that `#[lock_free]` includes a compile-time check r=AfoHT a=japaric

for the "same priority requirement"; this prevents data races

Co-authored-by: Jorge Aparicio <jorge.aparicio@ferrous-systems.com>
2021-07-22 10:51:16 +00:00
bors[bot]
b6e8e37c3c
Merge #500
500: migration/0.5: cover #[lock_free] r=AfoHT a=japaric

I think this completes #488

Co-authored-by: Jorge Aparicio <jorge.aparicio@ferrous-systems.com>
2021-07-22 10:45:46 +00:00
Jorge Aparicio
3eac8b91cf book/resources: highlight that #[lock_free] includes a compile-time check
for the "same priority requirement"; this prevents data races
2021-07-22 10:35:09 +02:00
Alex Crawford
5f395658f0 Propogate the task attributes to the spawn handles
This allows tasks to be gated by `cfg` attributes when also using
monotonics. For example:

```rust
#[cfg(feature = "logging")]
#[task(shared = [logger])]
fn logger_init(mut cx: logger_init::Context) {
    /* ... */
}
```

Without this change, the reschedule_at() implementation is
unconditionally included even though it references the SpawnHandle from
its task module, which is _conditionally_ included. This resulted in
compiler errors like the following:

```
error[E0433]: failed to resolve: use of undeclared crate or module `logger_init`
   --> src/main.rs:243:8
    |
243 |     fn logger_init(mut cx: logger_init::Context) {
    |        ^^^^^^^^^^^ use of undeclared crate or module `logger_init`
```
2021-07-22 01:00:57 -07:00
bors[bot]
c62fd967d7
Merge #498
498: book: update the resources chapter r=AfoHT a=japaric

see individual commit messages for details.

what's still left to do is adjust the very last section about `#[task_local]` and `#[lock_free]` but I plan to do that as a follow up. I didn't find an in-tree example for those two attributes (are they field attributes? where do they fit in the syntax?); a quick scan of the rtic-syntax crate seems to indicate that `task_local` has been removed (?) and that `lock_free` still exists.

Co-authored-by: Jorge Aparicio <jorge.aparicio@ferrous-systems.com>
2021-07-22 07:29:35 +00:00
Jorge Aparicio
a7ed040799 migration/0.5: cover #[lock_free]
I think this completes #488
2021-07-22 09:27:42 +02:00
Jorge Aparicio
5805a05fac book/resources: rm #[task_local] mention; add #[lock_free] example
the #[task_local] attribute was removed
2021-07-22 09:17:39 +02:00
Jorge Aparicio
f9a7efb235 update expected example output (take 2) 2021-07-22 08:58:17 +02:00
Jorge Aparicio
af631719f4 update expected example output 2021-07-22 08:42:44 +02:00
Jorge Aparicio
ae1f9008a4 comment out line that doesn't compile 2021-07-22 08:28:11 +02:00
Jorge Aparicio
cd4e8183f6 book/resources: remove mentions of the field attribute #[init(<expr>)]
it no longer exists. all resources are now late resources
2021-07-21 15:59:08 +02:00
Jorge Aparicio
6bf1c76d84 book/resources: do not use the lock API in the very first example
instead stick to `#[local]` resources
2021-07-21 15:55:14 +02:00
bors[bot]
2f3b5cba80
Merge #496
496: update the 0.5.x -> 0.6.0 migration guide r=AfoHT a=japaric

to use the new resources syntax
I also reordered the sections to cover all the resource API first before covering the spawn API
I've also added a section about the old `static mut` variable transform

Co-authored-by: Jorge Aparicio <jorge.aparicio@ferrous-systems.com>
2021-07-21 08:40:21 +00:00
Jorge Aparicio
18880406cb use tuple struct syntax for Monotonics everywhere 2021-07-21 10:14:00 +02:00
Jorge Aparicio
5f7dc0b903 update the 0.5.x -> 0.6.0 migration guide
to use the new resources syntax
I also reordered the sections to cover all the resource API first before covering the spawn API
I've also added a section about the old `static mut` variable transform
2021-07-21 10:11:43 +02:00
bors[bot]
29aef36f67
Merge #497
497: Change misleading documentation left over by PR #464 r=AfoHT a=Cat-Ion



Co-authored-by: Valentin Ochs <a@0au.de>
2021-07-20 14:14:47 +00:00
Valentin Ochs
c4c964de7b Change misleading documentation left over by PR #464 2021-07-20 14:37:13 +02:00
bors[bot]
78f556f942
Merge #464
464: const generics r=AfoHT a=burrbull



Co-authored-by: Andrey Zgarbul <zgarbul.andrey@gmail.com>
Co-authored-by: mriise <mark.riise26@gmail.com>
Co-authored-by: Zgarbul Andrey <zgarbul.andrey@gmail.com>
2021-07-20 08:51:53 +00:00
Andrey Zgarbul
bf80035aef rustfmt 2021-07-20 11:44:03 +03:00
Zgarbul Andrey
5153ff1715
Merge pull request #1 from mriise/const
fix pool example
2021-07-20 11:38:06 +03:00
mriise
5e92715d8c fix pool example 2021-07-20 01:17:11 -07:00
Andrey Zgarbul
e4319de3d5 const generics 2021-07-09 18:44:19 +03:00
Emil Fresk
c67657371b Version fix 2021-07-09 13:08:37 +02:00
bors[bot]
e1a4d001f8
Merge #494
494: Resoures take 2 r=korken89 a=korken89



Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
2021-07-09 11:00:11 +00:00
Emil Fresk
f3d9fd9b63 Update changelog and version 2021-07-09 12:54:19 +02:00
Emil Fresk
697ab31e6e Final versions 2021-07-08 23:22:23 +02:00
Emil Fresk
8f37043782 Cleanup from review (needs releases to compile) 2021-07-08 23:18:44 +02:00
Emil Fresk
98d2af9d73 Fixing tests 2021-07-07 23:07:09 +02:00
Emil Fresk
633012190b Use git deps 2021-07-07 21:10:06 +02:00
Emil Fresk
d7393c5b27 Full local resource syntax working 2021-07-07 21:04:31 +02:00
Emil Fresk
ef5307d83a Minimal app now compiles 2021-07-06 22:47:48 +02:00