Commit graph

63 commits

Author SHA1 Message Date
Per Lindgren
45a83c0056 systic example for qemu, longer delay 2020-09-29 23:12:19 +02:00
Per Lindgren
9fdf9955f1 systic example for qemu 2020-09-29 23:11:40 +02:00
Per Lindgren
6c2b02a937 systic example for qemu 2020-09-29 23:10:50 +02:00
Per Lindgren
43f11812a1 systic example for qemu 2020-09-29 23:07:37 +02:00
Emil Fresk
7ff35bd041 Fixed example and v7 flag 2020-09-25 14:52:09 +02:00
Emil Fresk
72ba18b0e8 Regression in master on double schedule 2020-09-24 20:56:49 +02:00
Emil Fresk
413f525c93 Fixed so examples do not crash in release mode 2020-09-14 09:35:10 +02:00
bors[bot]
bfb498e722
Merge #337
337: Examples: Clarify extern section r=korken89 a=dbrgn

Some beginners are confused about the "extern" section, so I added an explanation comment to all examples.

![image](https://user-images.githubusercontent.com/105168/85903840-9ad2a780-b807-11ea-943d-3f37b814c23f.png)

Furthermore, using the UARTx interrupts when UART is actually being used in the same example may be confusing, so I changed them all to SSI0/QEI0.

Co-authored-by: Danilo Bargen <mail@dbrgn.ch>
2020-06-30 20:16:46 +00: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
Danilo Bargen
8e636f0d12 Examples: Clarify extern section
Some beginners are confused about the "extern" section, so I added an
explanation comment to all examples. Furthermore, using the UARTx
interrupts when UART is actually being used in the same example may be
confusing, so I changed them all to SSI0/QEI0.
2020-06-26 23:53:11 +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
Emil Fresk
ac0e687431
Merge pull request #313 from russell/patch-1
Update example to use better initial value
2020-06-11 18:45:51 +02: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
5f61f7b75f Use cargo feature instead of conditional compilation hacks 2020-06-10 13:31:48 +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
Russell Sim
7266ffe3a6
Update example to use better initial value
The example above this in the documentation states

```
        // semantically, the monotonic timer is frozen at time "zero" during `init`
        // NOTE do *not* call `Instant::now` in this context; it will return a nonsense value
        let now = cx.start; // the start time of the system
```

It results in weird scheduling issues, but still eventually works.  `cx.start` is much more reliable.

Relates to https://github.com/rtfm-rs/cortex-m-rtfm/issues/196
2020-05-26 07:33:18 +02:00
Henrik Tjäder
f58f37b2b9 Retain cfg-attributes on resources 2020-04-22 09:26:13 +00:00
bors[bot]
60c14ef680
Merge #294
294: use the safe DWT::unlock API r=korken89 a=japaric

instead of a unsafe write_volatile call

Co-authored-by: Jorge Aparicio <jorge@japaric.io>
2020-01-24 15:45:14 +00:00
Jorge Aparicio
b04103f6df docs: do not use Instant::now in #[init] 2020-01-21 22:23:20 +01:00
Jorge Aparicio
60639b3a9c use the safe DWT::unlock API
instead of a unsafe write_volatile call
2020-01-21 22:13:23 +01:00
Emil Fresk
76e234599f Added struct de-structure-ing example in tips & tricks 2019-11-07 14:12:16 +01:00
Jorge Aparicio
eef4e7bf79 more monotonic timer docs
covers

- initialization and configuration of the timer; this is now a responsibility of
  the application author
- correctness of `Monotonic::now()` in `#[init]`
- safety of `Monotonic::reset()`

closes #251
2019-10-15 18:44:49 -05:00
Jorge Aparicio
7ca5bbf404 fix preempt example 2019-08-21 10:53:13 +02:00
Jorge Aparicio
07b2b4d830 doc up 2019-08-21 10:17:27 +02:00
Jorge Aparicio
9195038c87 implement RFC #212 2019-07-10 22:42:44 +02:00
Jorge Aparicio
4e51bb68b9 RFC #207 2019-06-20 06:19:59 +02:00
Jorge Aparicio
81275bfa4f rtfm-syntax refactor + heterogeneous multi-core support 2019-06-13 23:56:59 +02:00
Jorge Aparicio
ccd7f4586b book: indirection for faster message passing 2019-05-01 21:32:00 +02:00
Jorge Aparicio
1b4b006bab update examples 2019-05-01 20:49:25 +02:00
Jorge Aparicio
e865cbb2e5 book: resources shared with init must also be Send 2019-04-21 18:00:22 +02:00
Jorge Aparicio
11f795aaf6 add binds example and make it work 2019-02-26 23:22:34 +01:00
Jorge Aparicio
89c922079e update examples and tests 2019-02-12 15:08:46 +01:00
Jorge Aparicio
34e74f4bb3 book: add an example of conditional compilation of resources and tasks 2018-12-16 20:57:04 +01:00
Jorge Aparicio
a279218295 use new cortex_m_semihosting::hprintln macro 2018-11-04 19:57:39 +01:00
Jorge Aparicio
37a0692a0f impl Mutex on all shared resources
document how to write generic code that operates on resources
2018-11-04 18:50:42 +01:00
Jorge Aparicio
c631049efc v0.4.0
closes #32
closes #33
2018-11-03 17:16:55 +01:00
Jorge Aparicio
abca829926 more fixes 2018-08-24 16:31:04 +02:00
Jorge Aparicio
efca108103 cargo fmt 2018-04-16 21:32:52 +02:00
Jorge Aparicio
def4fc8079 v0.3.0 2018-01-15 23:33:09 +01:00
Jorge Aparicio
1be43fc489 adapt to changes in the cortex-m crate 2018-01-11 20:56:45 +01:00
Jorge Aparicio
d30bdcb096 safe &'static mut references via init.resources 2017-12-09 17:17:56 +01:00
Jorge Aparicio
a6dd004113 implement the Resource trait for owned resources
this unbreaks the "generics" example
2017-12-09 17:17:56 +01:00
Jorge Aparicio
219e172680 drop the Static wrapper 2017-12-09 17:15:15 +01:00
Jorge Aparicio
8f23fdc934 deny warnings and unsafe code in tests and examples 2017-12-09 15:12:42 +01: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
Jorge Aparicio
e97afa71ce peripherals as scoped singletons 2017-12-09 12:45:57 +01:00
Jorge Aparicio
948e1fd0fb v0.2.2 2017-11-22 09:29:01 +01:00