Commit graph

1222 commits

Author SHA1 Message Date
Jorge Aparicio
d6c240f974 also cache the Xargo directory 2017-12-09 15:25:46 +01:00
Jorge Aparicio
8f23fdc934 deny warnings and unsafe code in tests and examples 2017-12-09 15:12:42 +01:00
Jorge Aparicio
9865a7246d make resource proxies !Send 2017-12-09 15:10:29 +01:00
homunkulus
0a0e0e2b38 Auto merge of #55 - japaric:late-resources, r=japaric
[RFC] rename LateResourceValues to LateResources

After writing `LateResourceValues` several times I now think it's too long to type. I'd like that
struct to be renamed to `LateResources`. I don't think there would be a loss in readability with the
rename because you can think of "late resources" as resources that "don't exist" until `init` ends
instead of as resources that are not initialized after `init` ends -- the second meaning maps better
to `LateResourceValues`.

This would be a breaking-change but we are moving to v0.3.0 due to #50 in any case.

cc jonas-schievink
2017-12-09 13:47:10 +00:00
Jorge Aparicio
512091e8a3 fix the "generics" example 2017-12-09 14:45:59 +01:00
Jorge Aparicio
79e2b7dc2e rename LateResourceValues to LateResources 2017-12-09 13:20:41 +01:00
homunkulus
e78ca98c42 Auto merge of #50 - japaric:singletons, r=japaric
Peripherals as scoped singletons

See this RFC for details: japaric/svd2rust#157

- The first commit adapts this crate to the changes in japaric/cortex-m#65 and japaric/svd2rust#158
- ~~The second commit is an alternative implementation of RFC #47 (there's another implementation in #49. This second commit is not required for RFC157 but let us experiment with safe DMA abstractions.~~ postponed

### TODO

- [x] un-bless peripherals as resources. Peripherals as resources were special cased: if resource listed in e.g. `app.tasks.FOO.resources` didn't appear in `app.resources` then it was assumed to be a peripheral and special code was generated for it. This is no longer required under RFC157.

~~This depends on PR japaric/rtfm-syntax#2~~ postponed
2017-12-09 12:09:35 +00:00
Jorge Aparicio
1830bdbe5c remove special case around peripherals from codegen 2017-12-09 13:08:08 +01:00
Jorge Aparicio
e97afa71ce peripherals as scoped singletons 2017-12-09 12:45:57 +01:00
homunkulus
e620b1e57a Auto merge of #54 - japaric:fix-tests, r=japaric
fix cfail tests

None
2017-12-08 12:38:07 +00:00
Jorge Aparicio
815c3d960d ci: switch back to a recent nightly 2017-12-08 13:37:46 +01:00
Jorge Aparicio
8e523d036c fix cfail tests 2017-12-08 13:28:27 +01:00
homunkulus
99df0776c6 Auto merge of #51 - japaric:ci, r=japaric
fix ci

None
2017-11-22 08:56:45 +00:00
Jorge Aparicio
cdb2118cd3 use older nightly for the x86_64 linux target 2017-11-22 09:56:17 +01:00
Jorge Aparicio
e90cf07dd6 fix ci 2017-11-22 09:40:36 +01:00
Jorge Aparicio
948e1fd0fb v0.2.2 2017-11-22 09:29:01 +01:00
Jorge Aparicio
c184f91e3c fix the example 2017-10-02 15:11:37 +02:00
Jorge Aparicio
2415a640af fix idle::Resources::new
it assumed that all resources were "early" resources
2017-10-02 14:49:40 +02:00
Jonas Schievink
a190da3e3f Use true as the armv6 linker
Horrible hack until we switch to a Cortex-M0 device crate that works with armv6.
2017-09-22 22:44:31 +02:00
Jonas Schievink
df85298c5a Pin Travis to Xargo 0.3.8 2017-09-22 20:20:13 +02:00
Jonas Schievink
b50c9095c0 Use rtfm-syntax 0.2.0 2017-09-22 20:11:39 +02:00
Jonas Schievink
be1a27ccf9 Add cfail test for late resources 2017-09-22 18:21:12 +02:00
Jonas Schievink
1556948458 Fix shared resource handling and extend example.
The extended example tests that this actually works this time.
2017-09-22 18:19:18 +02:00
Jonas Schievink
70e243694d Simplify iterator usage 2017-09-22 18:10:00 +02:00
Jonas Schievink
b1777ebd68 Fix warning in wrong-threshold cfail test 2017-09-22 13:46:30 +02:00
Jonas Schievink
21d1f6b9ad Don't use deprecated method to create compiletest config 2017-09-22 13:46:05 +02:00
Jonas Schievink
bbc873622d Hide UntaggedOption reexport 2017-09-22 13:45:28 +02:00
Jonas Schievink
ee59e8711f Bump stm32f103xx version
Fixes compilation on x86-64
2017-09-22 13:44:36 +02:00
Jonas Schievink
57ed0963ff Use untagged_option crate 2017-09-06 19:06:43 +02:00
Jonas Schievink
c8bdb7329f Add late resources example 2017-09-04 23:31:14 +02:00
Jonas Schievink
7ebba49644 Allow initialization of resources in init. 2017-09-03 18:19:21 +02:00
Jorge Aparicio
27fc7e99d2 extend v0.2.0 CHANGELOG 2017-07-29 01:57:45 -05:00
Jorge Aparicio
a43c8a4d57 v0.2.1 2017-07-29 01:50:04 -05:00
Jorge Aparicio
6160548153 v0.2.0 2017-07-29 01:17:54 -05:00
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