Commit graph

1607 commits

Author SHA1 Message Date
bors[bot]
6de4f1a797
Merge #397
397: Use latest GHA mdBook action r=korken89 a=AfoHT



Co-authored-by: Henrik Tjäder <henrik@tjaders.com>
2020-10-15 18:00:24 +00:00
Henrik Tjäder
484fce9329 Use latest GHA mdBook action 2020-10-15 17:15:06 +00:00
bors[bot]
8b53b9d10c
Merge #393
393: Implement all clippy suggestions r=korken89 a=AfoHT



Co-authored-by: Henrik Tjäder <henrik@tjaders.com>
2020-10-15 17:13:37 +00:00
Henrik Tjäder
21253297e4 Implement all clippy suggestions 2020-10-15 17:09:27 +00:00
bors[bot]
355cb82d06
Merge #390
390: Spawn and schedule from anywhere r=AfoHT a=korken89

This PR moves RTIC to the spawn and schedule from anywhere syntax.

Notable changes:
 * We do no longer support non-`Send` types.
 * Some extra code is generated as any task may spawn/schedule any task. However Rust/LLVM does a great job optimizing away non used instantiations (no real code-size difference observed).
 * Worst case priority inversion has increased, but it is now predictable.

Upsides:
 * With this we should be able to support async/await.
 * RTIC tasks can now be callbacks (spawned and scheduled).
 * RTIC tasks can be stored.

Needs the following PR to land first: https://github.com/rtic-rs/rtic-syntax/pull/34

The following now works:

```rust
#[rtic::app(device = lm3s6965, monotonic = rtic::cyccnt::CYCCNT)]
mod app {
    #[init]
    fn init(mut cx: init::Context) -> init::LateResources {
        // Init stuff...

        // New spawn syntax
        foo::spawn().unwrap();

        // New schedule syntax
        bar::schedule(now + 4_000_000.cycles()).unwrap();

        init::LateResources {}
    }

    #[task]
    fn foo(_: foo::Context) {}

    #[task]
    fn bar(_: bar::Context) {}

    extern "C" {
        fn SSI0();
    }
}

```

Co-authored-by: Per Lindgren <per.lindgren@ltu.se>
Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
2020-10-15 16:42:30 +00:00
Emil Fresk
6808cc7cdf Merge branch 'master' into spawn_experiment 2020-10-15 18:27:48 +02:00
Emil Fresk
c5b5ea60e8 Use master branch on syntax 2020-10-15 18:12:39 +02:00
Emil Fresk
b5779d834e Fix comments in examples 2020-10-15 18:06:03 +02:00
bors[bot]
f9303cef1c
Merge #395
395: Made relation between priority and number explicit r=korken89 a=diondokter

When quickly reading through the priorities chapter, I couldn't find in which order the priorities were, so I assumed it was the same as in the hardware.
In the cortex-m hardware, interrupts with the **lower** priority number will preempt the other interrupts.
RTIC does the reverse, so I think it's good to be more explicit about it.

Co-authored-by: Dion Dokter <diondokter@gmail.com>
2020-10-15 16:05:45 +00:00
bors[bot]
1cda9eaecc
Merge #371
371: task_local and lock_free r=korken89 a=AfoHT

Getting this going to test with GHA

For further discussion see https://github.com/rtic-rs/rfcs/issues/30

Co-authored-by: Per <Per Lindgren>
Co-authored-by: Henrik Tjäder <henrik@tjaders.com>
2020-10-15 16:01:07 +00:00
Emil Fresk
da76894d75 Updated syntax crate 2020-10-15 17:56:29 +02:00
Henrik Tjäder
37ee3a47af Create Enum containing all tasks 2020-10-15 15:56:20 +00:00
Henrik Tjäder
6c1f4a7b5d Changed branch for rtic-syntax 2020-10-15 15:56:20 +00:00
Henrik Tjäder
e2364aae3e Updated examples and rtic-name 2020-10-15 15:56:20 +00:00
Henrik Tjäder
b29a0c1348 Add example with features on all resources combined with lock_free and task_local 2020-10-15 15:56:20 +00:00
Henrik Tjäder
d4439fe73b Print module name and priority 2020-10-15 15:56:20 +00:00
Per
6eafcf10e9 task_local and lock_free analysis (take 1) 2020-10-15 15:56:20 +00:00
Emil Fresk
5ac16f6aae Merge branch 'master' into spawn_experiment 2020-10-15 17:55:00 +02:00
Dion Dokter
7a57f16860
Made relation between priority and number explicit
When quickly reading through the priorities chapter, I couldn't find in which order the priorities were, so I assumed it was the same as in the hardware.
In the cortex-m hardware, interrupts with the **lower** priority number will preempt the other interrupts.
RTIC does the reverse, so I think it's good to be more explicit about it.
2020-10-15 17:45:34 +02:00
bors[bot]
ee0885063d
Merge #394
394: Detect if the rt flag is defined in the PAC/HAL r=AfoHT a=korken89

This stops RTIC applications from compiling if one has forgotten to set the `rt` flag in the PAC/HAL.

The error:

```
error[E0433]: failed to resolve: could not find `interrupt` in `you_must_enable_the_rt_feature_for_the_pac_in_your_cargo_toml`
 --> src/main.rs:8:1
  |
8 | #[rtic::app(device = stm32l4xx_hal::pac)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ could not find `interrupt` in `you_must_enable_the_rt_feature_for_the_pac_in_your_cargo_toml`
  |
  = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
```

Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
2020-10-15 14:15:35 +00:00
Emil Fresk
48abc26e85 Detect if the rt flag is defined in the PAC/HAL
Better error message

Improved error string

Update UI tests
2020-10-15 16:06:30 +02:00
bors[bot]
1db5faad62
Merge #392
392: device path must be absolute; clarify r=AfoHT a=dcarosone

feel free to nitpick path terminology

Co-authored-by: Daniel Carosone <Daniel.Carosone@gmail.com>
2020-10-13 13:14:03 +00:00
Daniel Carosone
efe6b516fb device path must be absolute; clarify 2020-10-13 10:45:03 +11:00
bors[bot]
b8665a2f31
Merge #388
388: Now core contains the same `Peripherals` type based on monotonic r=AfoHT a=korken89



Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
2020-10-12 08:31:18 +00:00
Emil Fresk
1fb42536cf UI fix 2020-10-12 10:25:02 +02:00
Emil Fresk
5b8e6a22ab Fixing examples and tests, modules now import user imports correctly
Fmt

Correct syntax crate

UI test fix

Fix build script

Cleanup

More cleanup
2020-10-11 20:35:50 +02:00
Emil Fresk
524273c96a Now with spawn/schedule from anywhere 2020-10-11 18:38:38 +02:00
Emil Fresk
c83b15b643 Merge branch 'master' into spawn_experiment 2020-10-08 17:33:42 +02:00
Emil Fresk
e8b4fa7b32 Added critical sections 2020-10-08 17:33:16 +02:00
Emil Fresk
6d003e20a8 Now core contains the same Peripherals type based on monotonic 2020-10-07 15:17:00 +02:00
bors[bot]
36781cdd89
Merge #384
384: Fix MD-lints, add Matrix and meeting notes badges r=korken89 a=AfoHT



Co-authored-by: Henrik Tjäder <henrik@tjaders.com>
2020-10-07 04:43:28 +00:00
bors[bot]
593dbeb9bf
Merge #385
385: Doclints r=korken89 a=dcarosone

Some minor doc lints and wording cleanup

Co-authored-by: Daniel Carosone <Daniel.Carosone@gmail.com>
2020-10-07 04:38:51 +00:00
Daniel Carosone
987332b831 minor md lints and wording clarification 2020-10-07 09:31:30 +11:00
Daniel Carosone
f386cb63cb Merge branch 'master'
of https://github.com/rtic-rs/cortex-m-rtic
2020-10-07 09:22:38 +11:00
Henrik Tjäder
f229d2e97f Fix MD-lints, add Matrix and meeting notes badges 2020-10-06 18:48:37 +00:00
bors[bot]
b1e1abae29
Merge #173
173: add sandbox example r=AfoHT a=etrombly

Added a real world example for my sandbox project.

Co-authored-by: Eric Trombly <etrombly@yahoo.com>
2020-10-06 18:37:33 +00:00
bors[bot]
07153a8fca
Merge #346
346: fix badges / clean up README r=AfoHT a=fuchsnj



Co-authored-by: Nathan Fox <fuchsnj@gmail.com>
Co-authored-by: Henrik Tjäder <henrik@tjaders.com>
2020-10-06 18:22:11 +00:00
Henrik Tjäder
a091727e37 Restore links to docs 2020-10-06 18:04:22 +00:00
Per Lindgren
0bc2168cd6 spawn examples updated 2020-10-05 22:30:38 +02:00
Per Lindgren
aac97a2109 spawn POC works, likely unsound, cleanup 2020-10-05 22:02:04 +02:00
Per Lindgren
6bd168d711 spawn POC works, likely unsound 2020-10-05 21:57:44 +02:00
bors[bot]
5794cb75a7
Merge #370
370: Use latest mdBook r=korken89 a=AfoHT

Test to see if latest mdBook works with current formatting, see #369 



Co-authored-by: Henrik Tjäder <henrik@tjaders.com>
2020-10-05 18:49:59 +00:00
bors[bot]
29d10766d3
Merge #383
383: Split up migration guides into its own sections r=AfoHT a=korken89



Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
2020-10-05 18:45:32 +00:00
Emil Fresk
71a279f6d0 Split up migration guides into its own sections 2020-10-05 20:44:25 +02:00
bors[bot]
f5cf64e35c
Merge #382
382: Run the macro tests r=korken89 a=AfoHT



Co-authored-by: Henrik Tjäder <henrik@tjaders.com>
2020-10-05 18:40:28 +00:00
Henrik Tjäder
e17a1fc903 Run the macro tests 2020-10-05 18:37:21 +00:00
bors[bot]
12aa9807c4
Merge #372
372: Now late resources are always used r=AfoHT a=korken89

Awaits the PR in `rtic-syntax`: https://github.com/rtic-rs/rtic-syntax/pull/32

Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
2020-10-05 18:26:00 +00:00
Emil Fresk
8ab7be9871 Added back accidentally removed block 2020-10-05 20:19:52 +02:00
Emil Fresk
44f26fe90c Move to master of rtic-syntax 2020-10-05 20:05:52 +02:00
Emil Fresk
c21ccd04ce Overwrite steerr files 2020-10-05 18:33:11 +02:00