Commit graph

325 commits

Author SHA1 Message Date
Emil Fresk
95e4949680 Start CI, disable docs building 2023-03-01 00:33:29 +01:00
Emil Fresk
c40c89bb4e Clippy fixes 2023-03-01 00:33:29 +01:00
Emil Fresk
6d252785e8 Support 0 prio tasks 2023-03-01 00:33:28 +01:00
Emil Fresk
9a67f00a30 Fix typos 2023-03-01 00:33:28 +01:00
Emil Fresk
cbe5926880 Fix failing UI test 2023-03-01 00:33:27 +01:00
Emil Fresk
584ac7e1b3 Update UI tests, 1 failing that needs fixing 2023-03-01 00:33:27 +01:00
Emil Fresk
76595b7aed All codegen is now explicit 2023-03-01 00:31:08 +01:00
Emil Fresk
b9b3ded5e2 Cleanup weird locals in codegen 2023-03-01 00:31:07 +01:00
Emil Fresk
29228c4723 Main in main codegen 2023-03-01 00:31:07 +01:00
Emil Fresk
fe2b5cc52e Removed same prio spawn 2023-03-01 00:31:06 +01:00
Emil Fresk
2ad36a6efe Lifetime cleanup 2023-03-01 00:31:06 +01:00
Emil Fresk
511ff675b5 Break codegen for 0-prio async 2023-03-01 00:31:06 +01:00
Emil Fresk
714020a624 Removed Priority, simplified lifetime handling 2023-03-01 00:31:06 +01:00
Emil Fresk
3b97531a5c First example builds again 2023-03-01 00:31:05 +01:00
Emil Fresk
858320cbfc Even more cleanup 2023-03-01 00:31:05 +01:00
Emil Fresk
5c3cedf69a Fix fences 2023-03-01 00:31:05 +01:00
Emil Fresk
d27d0fe33f Added software task codegen back 2023-03-01 00:31:05 +01:00
Emil Fresk
f8352122a3 Min codegen 2023-03-01 00:31:04 +01:00
Emil Fresk
d7ed7a8b9f syntax: Remove parse settings struct 2023-03-01 00:31:04 +01:00
Emil Fresk
9829d0ac07 Add check again 2023-03-01 00:31:04 +01:00
Emil Fresk
582c602912 Old xtask test pass 2023-03-01 00:31:01 +01:00
Emil Fresk
7614b96fe4 RTIC v2: Initial commit
rtic-syntax is now part of RTIC repository
2023-03-01 00:29:10 +01:00
Henrik Tjäder
e1a0987dc2 Release: v1.1.4 2023-02-26 17:30:10 +01:00
Henrik Tjäder
800904a105 Handle more cfgs, support cfg on HW/SW tasks 2023-01-22 13:38:43 +01:00
Henrik Tjäder
be74469ab7 Enable at least masking out a Monotonic
Simplest case working, but leaves a lot to ask
as shown by examples/cfg-monotonic.rs

Current `rtic-syntax` is unable to validate and
handle the `cfgs[]` which limits the usefulness
of this.
2023-01-22 12:00:08 +01:00
Henrik Tjäder
3f74f3b845 Make clippy happy 2023-01-22 00:35:03 +01:00
Henrik Tjäder
f6b0d18e24 Improve RTIC doc handling
Enable use of

```
 #![deny(missing_docs)]
```
2023-01-22 00:26:23 +01:00
Henrik Tjäder
10d2a59356 Clippy: Fix (clippy::needless_borrow) 2022-12-15 22:09:09 +01:00
Emil Fresk
d6edeb6a64 Fix CI error caused by critical-section 0.2.8 2022-12-14 21:28:29 +01:00
bors[bot]
b87fca3d21
Merge #652
652: Remove use of basepri register on thumbv8m.base r=AfoHT a=neonquill

The basepri register appears to be aviable on thumbv8m.main but not thumbv8m.base. At the very least, attempting to compile against a Cortex-M23 based Microchip ATSAML10E16A generates an error:

```
error[E0432]: unresolved import `cortex_m::register::basepri`
  --> /Users/dwatson/.cargo/registry/src/github.com-1ecc6299db9ec823/cortex-m-rtic-1.1.3/src/export.rs:25:5
   |
25 | use cortex_m::register::basepri;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `basepri` in `register`
```

I wasn't sure if it made more sense to replace the `armv7m` config flag with something related to basepri availability or to get closer to matching the cortex-m use of several architecture specific flags. In the end i chose to make the minimal change possible and just narrowed the existing `thumbv8m` check.

Context:
[cortex-m:src/register/mod.rs](4e90862520/src/register/mod.rs (L33)):
```
#[cfg(all(not(armv6m), not(armv8m_base)))]
pub mod basepri;
```

[cortex-m:build.rs](4e90862520/build.rs (L21)):
```
    } else if target.starts_with("thumbv8m.base") {
        println!("cargo:rustc-cfg=cortex_m");
        println!("cargo:rustc-cfg=armv8m");
        println!("cargo:rustc-cfg=armv8m_base");
```

Co-authored-by: David Watson <david@neonquill.com>
2022-07-27 19:15:09 +00:00
David Watson
368ab1d4fb Remove use of basepri register on thumbv8m.base
The basepri register appears to be aviable on thumbv8m.main but not
thumbv8m.base. At the very least, attempting to compile against a
Cortex-M23 based Microchip ATSAML10E16A generates an error:

```
error[E0432]: unresolved import `cortex_m::register::basepri`
  --> /Users/dwatson/.cargo/registry/src/github.com-1ecc6299db9ec823/cortex-m-rtic-1.1.3/src/export.rs:25:5
   |
25 | use cortex_m::register::basepri;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `basepri` in `register`
```

This is an attempt to account for the fact that thumbv8m.base (M23)
MCUs don't have the BASEPRI register but have more than 32
interrupts. This moves away from the architecture specific config
flags and switches to a more functional flag.

Make the mask size depend on the max interrupt id

Rather than assuming a fixed interrupt count of 32 this code uses an
array of u32 bitmasks to calculate the priority mask. The size of this
array is calculated at compile time based on the size of the largest
interrupt id being used in the target code. For thumbv6m this should
be equivalent to the previous version that used a single u32 mask. For
thumbv8m.base it will be larger depending on the interrupts used.

Don't write 0s to the ISER and ICER registers

Writing 0s to these registers is a no-op. Since these masks should be
calculated at compile time, this conditional should result in writes
being optimized out of the code.

Prevent panic on non-arm targets

Panicking on unknown targets was breaking things like the doc build on
linux. This change should only panic when building on unknown arm
targets.
2022-07-27 21:04:24 +02:00
Gabriel Górski
b4cfc4db84 Fix missing formatting 2022-07-27 20:25:34 +02:00
Gabriel Górski
c6fd3cdd0a Allow custom link_section attributes for late resources
This commit makes RTIC aware of user-provided `link_section` attributes,
letting user override default section mapping.
2022-07-06 17:43:38 +02:00
Henrik Tjäder
8af754fc72 Bump rtic-syntax to v1.0.2 and fix Changelog 2022-06-23 13:36:14 +02:00
Emil Fresk
5c47aba1a1 Fix macros to Rust 2021 2022-05-24 19:42:02 +02:00
Emil Fresk
b15bda2d39 Fix clash with defmt 2022-05-24 08:31:31 +02:00
Emil Fresk
cd445165c5 More ergonomic error from static asserts messages 2022-05-17 20:20:59 +02:00
Emil Fresk
e5643ee94e Fixed warning from Rust Analyzer 2022-05-10 13:38:23 +02:00
Emil Fresk
906abba71e Prepare v1.1.2 2022-05-09 13:33:49 +02:00
Emil Fresk
0f8bdbdd3f Added check for resource usage and to generate an compile error for thumbv6 exceptions 2022-04-20 13:05:22 +02:00
Emil Fresk
9f38a39377 Masks take 3 2022-04-20 10:56:13 +02:00
Henrik Tjäder
4f99399e29 Release RTIC v1.1
Bump versions, including using using latest rtic-syntax
2022-04-13 08:27:17 +02:00
Per Lindgren
f86dab5ff3 Added support for SRP based scheduling for armv6m 2022-03-02 13:23:47 +01:00
Henrik Tjäder
5ed93bd1bf Clippy with pedantic suggestions 2022-02-22 18:56:21 +01:00
Henrik Tjäder
2c14c9bce3 rtic::mutex::prelude::* fixes glob import lint
rtic-core Mutex, Exclusive and multi-lock retained in
old location to not be backwards breaking
2022-02-18 18:42:19 +01:00
Henrik Tjäder
099544f655 Fix/mute clippy errors 2022-02-09 18:58:50 +01:00
Henrik Tjäder
9f54b4aca8 RTIC macro expansion: Try to find target-dir 2022-01-28 21:21:06 +01:00
bors[bot]
bc883e393d
Merge #565 #566
565: Edition: Bump to 2021 r=korken89 a=AfoHT



566: v1.0.0 r=korken89 a=AfoHT

This should fail building until all deps are released and accessible on crates.io

(There are some required PRs for edition2021 for each repo, alternatively just bringing in the v1.0 PR should have commits included, we can drop the extra PRs later on)

https://github.com/rtic-rs/rtic-monotonic/pull/6
https://github.com/rtic-rs/rtic-core/pull/22
https://github.com/rtic-rs/rtic-syntax/pull/68


Co-authored-by: Henrik Tjäder <henrik@grepit.se>
2021-12-25 15:05:26 +00:00
Henrik Tjäder
2b90cd3433 Bump version to 1.0.0 2021-12-25 14:59:27 +01:00
Henrik Tjäder
c297b4ee8d Clippy lints 2021-12-25 13:17:16 +01:00