Commit graph

1616 commits

Author SHA1 Message Date
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
bors[bot]
3b68816a75 Merge #191
191: generate resource proxies only when needed r=japaric a=japaric

only `static mut` resources need proxies

just a codegen optimization

Co-authored-by: Jorge Aparicio <jorge@japaric.io>
2019-05-09 19:44:20 +00:00
bors[bot]
2596ea0e46 Merge #175
175: document internals r=japaric a=japaric

note that this assumes that RFC #155 has been implemented

[Rendered text](https://japaric.github.io/rtfm5/book/en/internals.html)

Do not merge this before PR #176

Co-authored-by: Jorge Aparicio <jorge@japaric.io>
2019-05-09 19:33:42 +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
ea02405ef0 document resolution and range of Instant and Duration 2019-05-08 19:48:12 +02:00
Jorge Aparicio
d1d2aff34b fix typo 2019-05-08 14:12:07 +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
09ec5a7a41 document internals
note that this assumes that RFC #155 has been implemented
2019-05-01 22:36:54 +02:00
bors[bot]
bc024f1979 Merge #176
176:  implement RFCs 147 and 155, fix #141, etc. r=japaric a=japaric

This PR:

- 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 (see PR #175).

- 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 (TODO backport this into the v0.4.x branch).

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

- Removes the integration with `owned_singleton`.

closes #141
closes #147
closes #155

Additionally:

- This changes CI to push v0.5.x docs to
  https://japaric.github.io/rtfm5/book/en/ -- we need to do this because our
  official docs are hosted on https://japaric.github.io/cortex-m-rtfm and we
  need to keep them on v0.4.x until we release v0.5.0

- I propose that we use the master branch to develop the upcoming v0.5.0.

- I have created a branch v0.4.x for backports; new v0.4.x releases will come
  from that branch.

r? @korken89 @texitoi, sorry for doing all the impl work in a single commit --
I know that makes things harder to review for you.

Suggestions for compile-pass and compile-fail tests are welcome


Co-authored-by: Jorge Aparicio <jorge@japaric.io>
2019-05-01 19:50:50 +00:00
Jorge Aparicio
ccd7f4586b book: indirection for faster message passing 2019-05-01 21:32:00 +02:00
Jorge Aparicio
485601245b rtfm::app: update error message 2019-05-01 20:49:25 +02:00
Jorge Aparicio
f30743f52a push docs to another repo & update README 2019-05-01 20:49:25 +02:00
Jorge Aparicio
4a7dc22259 travis: disable builds on stable 2019-05-01 20:49:25 +02:00
Jorge Aparicio
fa22145363 ci: the singleton example has been removed 2019-05-01 20:49:25 +02:00
Jorge Aparicio
3adc9c31f3 update the book 2019-05-01 20:49:25 +02:00
Jorge Aparicio
d538f5b17c test RFC 147 2019-05-01 20:49:25 +02:00
Jorge Aparicio
d0aaa2a805 update compile-fail tests 2019-05-01 20:49:25 +02:00
Jorge Aparicio
d2fb62f729 update compile-pass tests 2019-05-01 20:49:25 +02:00
Jorge Aparicio
1b4b006bab update examples 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
e6fb2f216f
bors: do not merge PRs labeled S-blocked 2019-04-21 21:05:57 +02:00
bors[bot]
852337e03b Merge #174
174: v0.4.3 r=japaric a=japaric

prepares a new release

Co-authored-by: Jorge Aparicio <jorge@japaric.io>
2019-04-21 16:21:57 +00:00
Jorge Aparicio
a562fb3232 v0.4.3 2019-04-21 18:20:57 +02:00
Jorge Aparicio
b5a756bd7d
Merge pull request #169 from japaric/late-must-be-send
book: note that late resources must be Send
2019-04-21 18:20:15 +02:00
Jorge Aparicio
473a0e7bb5 add .run file 2019-04-21 18:05:24 +02:00
Jorge Aparicio
e865cbb2e5 book: resources shared with init must also be Send 2019-04-21 18:00:22 +02:00
Jorge Aparicio
c4bad51deb note that late resources must be Send 2019-04-21 18:00:22 +02:00
Eric Trombly
19212a9f70 update commit for example link and specify RTFM version 2019-04-21 09:21:33 -05:00
Eric Trombly
21db4d1df4 add sandbox example 2019-04-19 10:50:43 -05: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
bors[bot]
e1e4c98cb9 Merge #171
171: [NFC] fix nightly ci r=japaric a=japaric



Co-authored-by: Jorge Aparicio <jorge@japaric.io>
2019-04-16 22:18:27 +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
bors[bot]
8da925647e Merge #162
162: v0.4.2 r=TeXitoi a=japaric

this PR prepares a new release

r? @korken89 || @TeXitoi 

Co-authored-by: Jorge Aparicio <jorge@japaric.io>
2019-02-27 01:27:16 +00:00
Jorge Aparicio
3310f507c0 v0.4.2 2019-02-27 00:56:56 +01:00
bors[bot]
692876649c Merge #161
161: (ru) binds r=japaric a=japaric

resubmitting PR #160 

Co-authored-by: Andrey Zgarbul <zgarbul.andrey@gmail.com>
2019-02-26 23:28:02 +00:00
Andrey Zgarbul
028d5325ae (ru) binds 2019-02-27 00:27:05 +01:00
bors[bot]
6d1d84980a Merge #158
158: implement RFC #128: #[interrupt(binds = ..)] r=korken89 a=japaric

closes #128 

r? @korken89 or @TeXitoi 

suggestions for tests are welcome! (2 of the 3 tests I added hit bugs in my implementation)

Co-authored-by: Jorge Aparicio <jorge@japaric.io>
2019-02-26 22:26:52 +00: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
e167af01f0 document the binds feature
cc @burrbull
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
a233808280 fix warnings in cpass test 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
c749979c45 add some tests 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
bors[bot]
bbdc3221f6 Merge #159
159: reject duplicate arguments in #[interrupt] and #[exception] r=TeXitoi a=japaric

This program was being accepted:

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

now it will trigger a compiler error

r? @korken89 || @TeXitoi 

Co-authored-by: Jorge Aparicio <jorge@japaric.io>
2019-02-24 16:42:33 +00:00