Commit graph

136 commits

Author SHA1 Message Date
Per Lindgren
e297ceb1ad rtic::export::Peripherals created by into instead of transmute 2020-07-09 19:37:04 +02:00
Emil Fresk
d9e8b68662 Fixes an issue where one could double take the cortex_m Peripheral
Added qemu test

Added comment

Typo

Add cfg for homogeneous

More cfg

Now multicore working

Add .run file
2020-06-30 22:06:57 +02:00
Henrik Tjäder
602a5b4374 Rename RTFM to RTIC 2020-06-11 17:18:29 +00:00
Emil Fresk
eb6406da7e Fmt 2020-06-11 19:00:52 +02:00
bors[bot]
8898224950
Merge #314
314: do not optimize build deps r=korken89 a=japaric

this may make CI faster

Co-authored-by: Jorge Aparicio <jorge@japaric.io>
2020-06-11 16:33:39 +00:00
bors[bot]
4795c1dba3
Merge #315
315: allow handlers to be named 'main' r=korken89 a=japaric

`#[init]`, `#[idle]` and `#[task]` handlers can now be named `main`

fixes #311

Co-authored-by: Jorge Aparicio <jorge.aparicio@ferrous-systems.com>
2020-06-11 16:22:33 +00:00
Henrik Tjäder
137283959c Run cargo fmt 2020-06-03 10:34:01 +00:00
Jorge Aparicio
0ad311074e allow handlers to be named 'main'
`#[init]`, `#[idle]` and `#[task]` handlers can now be named `main`

fixes #311
2020-05-29 14:50:28 +02:00
Jorge Aparicio
3ed4fe3771 TODO(remove) codegen no-op 2020-05-26 22:21:32 +02:00
Henrik Tjäder
f58f37b2b9 Retain cfg-attributes on resources 2020-04-22 09:26:13 +00:00
Jorge Aparicio
4fcb6ab7cc v0.5.0 final release 2019-11-14 17:47:17 -05:00
Jorge Aparicio
9f092efe24 do not zero late resource memory on boot 2019-10-21 16:38:04 -05:00
Jorge Aparicio
eb2ec7a4c8 v0.5.0 beta release 2019-10-15 16:35:00 -05:00
Jorge Aparicio
7f1b493c7d turn git deps into crates.io deps 2019-09-15 22:57:43 +02:00
Jorge Aparicio
c8197f524e fix gh-pages build 2019-09-15 20:19:48 +02:00
Jorge Aparicio
7aa270cb92 don't use deprecated API 2019-09-15 18:36:00 +02:00
Jorge Aparicio
996bdf8f0c doc tweaks 2019-08-21 12:33:04 +02:00
Jorge Aparicio
45f9faae9c document #[app] 2019-08-21 12:19:38 +02:00
Jorge Aparicio
0e146f8d11 adapt to changes in rtfm-syntax 2019-08-20 15:17:37 +02:00
Jorge Aparicio
fb84029bee implement the #[shared] attribute as specified in RFC #211 2019-07-11 12:53:58 +02:00
Jorge Aparicio
9195038c87 implement RFC #212 2019-07-10 22:42:44 +02:00
Jorge Aparicio
14d63f4961 fix (cross-core) initialization barriers 2019-07-03 20:36:52 +02:00
Jorge Aparicio
be92041a59 WIP 2019-06-29 09:11:57 +02:00
Jorge Aparicio
df4a7fd3e5 check that the app is not compiled for more cores than were specified 2019-06-24 14:15:00 +02:00
Jorge Aparicio
596cf585ea Monotonic trait is safe; add MultiCore trait 2019-06-24 14:09:12 +02:00
Jorge Aparicio
4e51bb68b9 RFC #207 2019-06-20 06:19:59 +02:00
Jorge Aparicio
9897728709 add homogeneous multi-core support 2019-06-18 10:31:31 +02:00
Jorge Aparicio
81275bfa4f rtfm-syntax refactor + heterogeneous multi-core support 2019-06-13 23:56:59 +02:00
bors[bot]
fafeeb2727 Merge #194
194: bump heapless dependency to v0.5.0; remove "nightly" feature r=japaric a=japaric

with the upcoming version of heapless we are able to initialize all internal
queues in const context removing the need for late initialization

this commit also removes the "nightly" feature because all the optimization
provided by it are now enabled by default

Co-authored-by: Jorge Aparicio <jorge@japaric.io>
2019-05-21 19:15:18 +00:00
Jorge Aparicio
30d6327001 bump heapless dependency to v0.5.0; remove "nightly" feature
with the upcoming version of heapless we are able to initialize all internal
queues in const context removing the need for late initialization

this commit also removes the "nightly" feature because all the optimization
provided by it are now enabled by default
2019-05-21 15:22:25 +02:00
Jorge Aparicio
0fb2726e6c remove unused check
that was added in #140 but it's no longer required
2019-05-21 14:43:05 +02:00
Jorge Aparicio
fafc94ccfb removes the maybe_uninit feature gate
and stop newtyping `core::mem::MaybeUninit`
2019-05-21 14:18:43 +02:00
bors[bot]
6acb156482 Merge #189
189: write generated code to disk for easier inspection r=japaric a=japaric

now that the generated code is actually readable let's make it easier to access

this commit also documents how to inspect the generated code via
`rtfm-expansion.rs` and `cargo-expand`

Co-authored-by: Jorge Aparicio <jorge@japaric.io>
2019-05-09 19:53:56 +00:00
Jorge Aparicio
36073a6342 generate resource proxies only when needed
only `static mut` resources need proxies
2019-05-09 18:25:34 +02:00
Jorge Aparicio
d4eb4d2c47 write generated code to disk for easier inspection
now that the generated code is actually readable let's make it easier to access

this commit also documents how to inspect the generated code via
`rtfm-expansion.rs` and `cargo-expand`
2019-05-08 14:08:09 +02:00
Jorge Aparicio
485601245b rtfm::app: update error message 2019-05-01 20:49:25 +02:00
Jorge Aparicio
a452700628 implement RFCs 147 and 155, etc.
This commit:

- Implements RFC 147: "all functions must be safe"

- Implements RFC 155: "explicit Context parameter"

- Implements the pending breaking change #141: reject assign syntax in `init`
  (which was used to initialize late resources)

- Refactors code generation to make it more readable -- there are no more random
  identifiers in the output -- and align it with the book description of RTFM
  internals.

- Makes the framework hard depend on `core::mem::MaybeUninit` and thus will
  require nightly until that API is stabilized.

- Fixes a ceiling analysis bug where the priority of the system timer was not
  considered in the analysis.

- Shrinks the size of all the internal queues by turning `AtomicUsize` indices
  into `AtomicU8`s.

- Removes the integration with `owned_singleton`.
2019-05-01 20:49:25 +02:00
Jorge Aparicio
a562fb3232 v0.4.3 2019-04-21 18:20:57 +02:00
bors[bot]
77def32454 Merge #170
170: check task priority at compile time r=TeXitoi a=japaric

before we were checking the priority at runtime. The compile time error message
when the priority is too high is kind of awful though.

Co-authored-by: Jorge Aparicio <jorge@japaric.io>
2019-04-16 22:54:18 +00:00
Jorge Aparicio
210921e06c now fix the fix 2019-04-17 00:18:02 +02:00
Jorge Aparicio
53f0ca1504 more nightly fixes 2019-04-16 23:41:00 +02:00
Jorge Aparicio
10d2638488 [NFC] fix nightly ci 2019-04-16 23:17:28 +02:00
Jorge Aparicio
aa7eec0299 check task priority at compile time
before we were checking the priority at runtime. The compile time error message
when the priority is too high is kind of awful though.
2019-04-16 23:04:24 +02:00
Jorge Aparicio
3310f507c0 v0.4.2 2019-02-27 00:56:56 +01:00
Jorge Aparicio
8eccef7d9c refactor: make binds harder to misuse 2019-02-26 23:25:16 +01:00
Jorge Aparicio
2fd6ae69d1 binds can only appear once in the argument list 2019-02-26 23:22:34 +01:00
Jorge Aparicio
11f795aaf6 add binds example and make it work 2019-02-26 23:22:34 +01:00
Jorge Aparicio
72f0cc505a make cfail test actually fail 2019-02-26 23:22:34 +01:00
Jorge Aparicio
d0f33add0a add binds argument to the interrupt and exception attributes 2019-02-26 23:22:31 +01:00
Jorge Aparicio
73529ea650 reject duplicate arguments in #[interrupt] and #[exception]
This program was being accepted:

``` rust
 #[task(
    capacity = 1,
    capacity = 2,
    priority = 1,
    priority = 2,
)]
fn foo() {}
```

now it will trigger a compiler error
2019-02-23 22:35:29 +01:00