Commit graph

538 commits

Author SHA1 Message Date
Jorge Aparicio
2d80f3631b update examples 2017-07-29 00:46:38 -05:00
Jorge Aparicio
e85d6e53c8 update examples 2017-07-27 22:40:47 -05:00
Jorge Aparicio
271df39bdb Send-ness check is now in rtfm-core 2017-07-27 21:30:24 -05:00
Jorge Aparicio
b9f50e432e make task.$T.path mandatory 2017-07-27 19:39:18 -05:00
Jorge Aparicio
d396da5950 make task.$T.enabled optional
and move the logic that differentiates interrupts from exceptions from the crate
to the procedural macro logic
2017-07-27 17:08:42 -05:00
Jorge Aparicio
ad2a523cf9 fix yet another warning on ARMv6-M 2017-07-27 15:15:19 -05:00
Jorge Aparicio
7d0c07cd39 travis: install linker 2017-07-27 15:02:25 -05:00
Jorge Aparicio
5e83dc295e fix warning on ARMv6-M 2017-07-27 14:59:31 -05:00
Jorge Aparicio
dd539d114f don't generate empty modules 2017-07-27 12:29:52 -05:00
Jorge Aparicio
b37c45ad2a make task.$T.priority optional
default the value to 1 if omitted
2017-07-27 12:11:22 -05:00
Jorge Aparicio
aa22494549 update tests and examples
with task! gone 3 types of errors / gotchas have been eliminated 🎉
2017-07-27 11:40:15 -05:00
Jorge Aparicio
0b5afce771 refactor Resource / Threshold into its own crate, drop task!, tweak rtfm::atomic
task! can be re-added in a backward compatible fashion and I'd like to not have
two ways to assign a task handler to an interrupt / exception in the first
release.

rtfm::atomic now uses the `Threshold` token instead of the `CriticalSection`
token. This reduces overhead by dropping the "are interrupts enabled?" check.
2017-07-27 11:37:58 -05:00
Jorge Aparicio
dee2fcde71 provide a Threshold token even when all resources are lockless
because the token will always be required for calling generic functions
2017-07-26 19:30:47 -05:00
Jorge Aparicio
4a1509cb53 fix around owned idle resource 2017-07-26 17:01:53 -05:00
Jorge Aparicio
6a2ff0aede inline claim
because it's needed for proper optimization / inlining
2017-07-25 22:30:41 -05:00
Jorge Aparicio
8aa3621034 fix errors around the use of super in relative paths 2017-07-25 22:27:57 -05:00
Jorge Aparicio
0e05682d09 more "hygiene"
prepend an underscore to the name of the statics generated in the root of the
crate
2017-07-24 23:07:11 -05:00
Jorge Aparicio
a14b0121b7 add another duplicated-handler cfail test 2017-07-24 22:52:12 -05:00
Jorge Aparicio
fb4542818b task! is not needed if tasks.$T.path is specified 2017-07-24 22:46:29 -05:00
Jorge Aparicio
74daa77fe0 document task! more 2017-07-23 22:35:05 -05:00
Jorge Aparicio
4139b47d4b add cfail test: borrow can't escape critical sections 2017-07-23 22:18:44 -05:00
Jorge Aparicio
749ce810d5 bump the static-ref dependency 2017-07-23 21:08:52 -05:00
Jorge Aparicio
f5a4d8e904 don't wrap static references in a Static 2017-07-23 20:59:35 -05:00
Jorge Aparicio
6ea9cda663 update cfail tests 2017-07-23 20:51:58 -05:00
Jorge Aparicio
05feb7b018 update examples 2017-07-23 20:51:52 -05:00
Jorge Aparicio
f3b397f460 drop rtfm::Cell 2017-07-23 20:51:37 -05:00
Jorge Aparicio
03f373fb24 drop idle.locals 2017-07-23 20:03:59 -05:00
Jorge Aparicio
e56ab1334e add example about placing init, idle and tasks in modules 2017-07-23 12:29:33 -05:00
Jorge Aparicio
bf4eabf287 misc fixes 2017-07-20 23:47:14 -05:00
Jorge Aparicio
c64e7decfe doc tweaks 2017-07-20 23:14:41 -05:00
Jorge Aparicio
0788a15a39 update CI 2017-07-20 23:03:45 -05:00
Jorge Aparicio
c7b9507a57 Resource trait, docs, examples and rtfm-syntax related changes 2017-07-20 22:53:44 -05:00
Jorge Aparicio
23425f2f06 more cfail tests 2017-07-20 16:16:40 -05:00
Jorge Aparicio
6577f4a91a bump cortex-m version to v0.3.1
barrier! is no longer needed
2017-07-20 16:13:02 -05:00
Jorge Aparicio
877a32448f make compatible with the unsafe_code lint 2017-07-18 20:17:09 -05:00
Jorge Aparicio
97a7e38db7 tasks / idle have exclusive access to Threshold, but do not own the token 2017-07-18 20:03:22 -05:00
Jorge Aparicio
a2b0c9e0d0 resources owned by idle have 'static lifetime 2017-07-18 19:49:52 -05:00
Jorge Aparicio
5824f837e1 adapt to changes in rtfm-syntax 2017-07-18 16:49:59 -05:00
Jorge Aparicio
1f1cf84ab4 add cfail tests 2017-07-18 15:14:39 -05:00
Jorge Aparicio
e9788ff9b6 rename rtfm! to app! and adapt to changes in rtfm-syntax 2017-07-14 20:47:06 -05:00
Jorge Aparicio
98596554b3 split macro parser into its own crate and improve error handling / reporting 2017-07-14 18:57:02 -05:00
Jorge Aparicio
59afbf02aa compiler plugin -> proc macro 2017-07-11 23:44:54 -05:00
Jorge Aparicio
8485a24d36 make the init::Resources argument optional 2017-07-09 16:30:04 -05:00
Jorge Aparicio
b7e43c1dbc make the tasks and resources fields optional 2017-07-08 21:56:39 -05:00
Jorge Aparicio
e18eb9610e fix unused variable warning around interrupt::free 2017-07-08 21:56:15 -05:00
Jorge Aparicio
17b252a8b6 rename rtfm-macros to cortex-m-rtfm-macros 2017-07-08 21:44:22 -05:00
Jorge Aparicio
3cebf49a2f syntax tweaks, relax check, add set_pending(), deal with imported types
- allow trailing commas in list of resources

- make task.resources optional

- add rtfm::set_pending function which can be used to force an interrupt into
  the pending state. This is a replacement of the old rtfm::request.
  rtfm::set_pending takes the Interrupt enum provided by the device crate as
  argument. (The old rtfm::request took a task function as argument)

- the user may want to use types they imported into the root of the crate. These
  types are not available in e.g. `mod idle` so `idle::Resources` *can't* be
  defined in that module. To workaround this problem `idle::Resources` will be
  defined in the root, with some other name, and then be re-exported in the
  `idle` module.

- remove the "a resource only used by one task should be local data" check. In
  some cases you do want a resource owned by a single task instead of local
  data since `init` can access resources but not a task local data.
2017-07-06 23:25:29 -05:00
Jorge Aparicio
4b0c3bff87 rtfm!: remove init.resources and make idle.local optional 2017-07-06 17:51:34 -05:00
Jorge Aparicio
86a360a396 rtfm! macro take 2 2017-07-04 11:26:11 -05:00
Jorge Aparicio
2bf5401439 v0.1.1 2017-06-05 21:05:29 -05:00