Commit graph

676 commits

Author SHA1 Message Date
bors[bot]
ffe4c07869
Merge #283
283: Include DWT enable in migration guide r=korken89 a=MabezDev

Makes note of the fact the DWT has to be enabled manually in rtfm 0.5.0; an easy one to miss considering debuggers generally enable the DWT automatically.

Co-authored-by: Scott Mabin <scott@mabez.dev>
2019-12-03 16:15:26 +00:00
Scott Mabin
864ec2ebc9 Update migration guide to include the enabling of the the DWT peripheral. Also makes note of enable trace with the DCB to allow the DWT to work without a debugger connected. 2019-12-03 11:33:24 +00:00
bors[bot]
11d9bcdbd1
Merge #280
280: Fixed link to API reference r=TeXitoi a=korken89



Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
2019-11-19 19:01:04 +00:00
Emil Fresk
b6927fa63a Fixed link to API reference 2019-11-19 19:49:59 +01:00
bors[bot]
c103d46c00
Merge #279
279: Preparation for v0.5.1 r=perlindgren a=korken89



Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
2019-11-19 15:01:06 +00:00
Emil Fresk
370cd54971 Preparation for v0.5.1 2019-11-19 15:46:07 +01:00
bors[bot]
82efffd706
Merge #277
277: TimerQueue.dequeue: don't set SYST reload to 0 r=korken89 a=mpasternacki

ARM Architecture Reference Manual says: "Setting SYST_RVR to zero has the effect of disabling the SysTick counter independently of the counter enable bit."

If Monotonic's ratio is less than one, the timeout calculations
can compute zero if next task is scheduled after current instant, but
before next timer tick. This results in disabling SYST and freezing the
timer queue.

The division by ratio's denominator rounds downward and the dequeue
condition is `if instant < now`. If ratio is small enough, this results
in unnecessary interrupts:

Let's say `instant - now` is 99 and ratio is 1/25. Then, `dur` will
equal 3 and the next tick will happen at `now + 75`. In the next
interrupt, `instant > now` and additional tick needs to be scheduled
(which doesn't happen, because now `instant - now` is less than 25, so
reload will be set to 0 and timer queue will stop). Adding one to
computed duration will prevent both freezing and additional interrupts.

When ratio is 1 or close, timer queue code overhead will prevent this
from happening. I am working with a chip where CPU is clocked at 600MHz
and SysTick is 100kHz and the freeze happens quite often.

Co-authored-by: Maciej Pasternacki <maciej@3ofcoins.net>
2019-11-19 14:00:22 +00:00
Maciej Pasternacki
fef738e832 TimerQueue.dequeue: don't set SYST reload to 0
ARM Architecture Reference Manual says: "Setting SYST_RVR to zero has the effect of disabling the SysTick counter independently of the counter enable bit."

If Monotonic's ratio is less than one, the timeout calculations
can compute zero if next task is scheduled after current instant, but
before next timer tick. This results in disabling SYST and freezing the
timer queue.
2019-11-19 00:07:14 +01:00
bors[bot]
8374fce0df
Merge #278
278: Cyccnt r=texitoi a=perlindgren

The subtractions in `elapsed` and `duration` may cause an overflow panic in debug mode. This is solved by using wrapping arithmetics.  


Co-authored-by: Per Lindgren <per.lindgren@ltu.se>
2019-11-18 20:07:06 +00:00
Per Lindgren
ebd62215ff Bumped version to 0.5.1, cyccntr bugfix 2019-11-18 16:38:52 +01:00
Per Lindgren
dfab15ed78 Fixed internal overflow on subtraiton in elapsed and duration 2019-11-18 16:36:17 +01:00
bors[bot]
725d5e1aa9
Merge #274
274: remove references to 'beta' from the docs r=perlindgren a=japaric



Co-authored-by: Jorge Aparicio <jorge@japaric.io>
2019-11-15 00:28:33 +00:00
bors[bot]
dc8115b5ab
Merge #275
275: fix CI r=perlindgren a=japaric

after caching was enabled binary install through the trust/install.sh script
stopped working (due to permissions?). This updates crate installation to use
`cargo-install` iff the requested version of a crate is not already installed

Co-authored-by: Jorge Aparicio <jorge@japaric.io>
2019-11-14 23:57:48 +00:00
Jorge Aparicio
7f863a9579 fix CI
after caching was enabled binary install through the trust/install.sh script
stopped working (due to permissions?). This updates crate installation to use
`cargo-install` iff the requested version of a crate is not already installed
2019-11-14 18:55:07 -05:00
Jorge Aparicio
73d5fa31c2 remove references to 'beta' from the docs 2019-11-14 18:19:57 -05:00
bors[bot]
f5655d6556
Merge #273
273: CI: fix caching mechanism r=perlindgren a=japaric



Co-authored-by: Jorge Aparicio <jorge@japaric.io>
2019-11-14 23:19:45 +00:00
Jorge Aparicio
8502fc262b CI: fix caching mechanism 2019-11-14 18:17:34 -05:00
bors[bot]
6b0a2df41c
Merge #272
272: v0.5.0 final release r=perlindgren a=japaric



Co-authored-by: Jorge Aparicio <jorge@japaric.io>
2019-11-14 22:49:56 +00:00
Jorge Aparicio
4fcb6ab7cc v0.5.0 final release 2019-11-14 17:47:17 -05:00
bors[bot]
e28294b220
Merge #271
271: Minor docs update to monotonic r=japaric a=korken89



Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
2019-11-13 20:20:30 +00:00
Emil Fresk
2441b7e389 Minor docs update to monotonic 2019-11-13 21:19:59 +01:00
bors[bot]
85463ed6c3
Merge #268 #270
268: CI: replace compiletest-rs with trybuild r=japaric a=japaric

We use compiletest to run compile-fail tests but compiletest depends on compiler
internals so it breaks every now and then and requires nightly. With trybuild we
can also run compile-fail tests but it works on stable and it already has
reached version 1.0

270: Added struct de-structure-ing example in tips & tricks r=japaric a=korken89

As per last meeting, a bare-bones added that we can improve

Co-authored-by: Jorge Aparicio <jorge@japaric.io>
Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
2019-11-13 19:50:15 +00:00
Emil Fresk
76e234599f Added struct de-structure-ing example in tips & tricks 2019-11-07 14:12:16 +01:00
Jorge Aparicio
e9a83947bc fix bash comparison 2019-11-06 19:48:02 -05:00
Jorge Aparicio
da9c6a714e run cfail tests only when rustc --version == $MSRV
this version is more or less fixed so new releases of Rust (stable or nightly
channel) are unlikely to break to build due to changes in diagnostic messages
2019-11-06 19:39:57 -05:00
Jorge Aparicio
31b392fe3a CI: replace compiletest-rs with trybuild
We use compiletest to run compile-fail tests but compiletest depends on compiler
internals so it breaks every now and then and requires nightly. With trybuild we
can also run compile-fail tests but it works on stable and it already has
reached version 1.0
2019-11-06 19:05:37 -05:00
bors[bot]
72e84cb297
Merge #266
266: CI: build 0.4 docs from the v0.4.x branch r=korken89 a=japaric

instead of using a specific tag; this way documentation changes done to the
v0.4.x branch will show up on the site as soon as they land -- right now they
require publishing a new v0.4.x release on crates.io

Co-authored-by: Jorge Aparicio <jorge@japaric.io>
2019-11-06 20:53:56 +00:00
bors[bot]
2cae8c3e8b
Merge #267
267: fix CI: use an older nightly on the x86_64 build r=korken89 a=japaric



Co-authored-by: Jorge Aparicio <jorge@japaric.io>
2019-11-06 19:38:22 +00:00
Jorge Aparicio
1e49de60cb fix CI: use an older nightly on the x86_64 build 2019-11-06 14:24:53 -05:00
Jorge Aparicio
3dd6df0bd0 CI: build 0.4 docs from the v0.4.x branch
instead of using a specific tag; this way documentation changes done to the
v0.4.x branch will show up on the site as soon as they land -- right now they
require publishing a new v0.4.x release on crates.io and manually updating the
`after-success.sh` build script on master
2019-10-25 13:59:23 -05:00
bors[bot]
f9b30a1ff8
Merge #259
259: Fixed peripherals -> device typo r=japaric a=korken89



Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
2019-10-23 18:34:01 +00:00
Emil Fresk
1ba2b5abbe Fixed peripherals -> device typo 2019-10-23 20:31:33 +02:00
bors[bot]
7d2fa7014d
Merge #257
257: do not zero late resource memory on boot r=korken89 a=japaric

this is done using the `.uninit` linker section; this optimization was already
being applied to message buffers but I forgot to also apply it to late resources

Co-authored-by: Jorge Aparicio <jorge@japaric.io>
2019-10-22 05:29:23 +00:00
Jorge Aparicio
9f092efe24 do not zero late resource memory on boot 2019-10-21 16:38:04 -05:00
Jorge Aparicio
1fe9767eba version v0.5 is still beta 2019-10-17 12:00:45 -05:00
bors[bot]
e82fb497f0
Merge #256
256: add migration guide r=korken89 a=japaric



Co-authored-by: Jorge Aparicio <jorge@japaric.io>
2019-10-17 06:16:43 +00:00
Jorge Aparicio
4b61c345eb ARMv7-M+ 2019-10-16 16:36:06 -05:00
Jorge Aparicio
66a1993f5d add migration guide 2019-10-16 14:39:02 -05:00
bors[bot]
47e4d99907
Merge #255
255: more monotonic timer docs r=nils-grepit a=japaric

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
cc @jonas-schievink

(EDIT: yay, pull request number 0xFF)

Co-authored-by: Jorge Aparicio <jorge@japaric.io>
2019-10-16 19:07:28 +00:00
Jorge Aparicio
1ccacf2102
Update book/en/src/by-example/timer-queue.md
Co-Authored-By: Jonas Schievink <jonasschievink@gmail.com>
2019-10-16 17:04:42 +00:00
Jorge Aparicio
a458a07031 cyccnt::Instant: simplify the Send / Sync impl
originally the type was made `!Send` because it loses its meaning when
send from one core to another but that was an incorrect use of the `Send`
bound (the send operation makes the value incorrect but that doesn't cause
memory unsafety on its own). So later the type was (explicitly) made `Send`
again resulting in a convoluted implementation -- this commit simplifies things.
2019-10-15 19:31:46 -05:00
Jorge Aparicio
6207008884 document the limitations of cyccnt::{Instant,Duration} 2019-10-15 19:11:35 -05: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
bors[bot]
8a1f009c34
Merge #252
252: critical sections book: each task gets its own context r=japaric a=chrysn

Fixing what was probably a copy-paste error; different tasks each have different types for their context.

Co-authored-by: chrysn <chrysn@fsfe.org>
2019-10-15 22:43:59 +00:00
bors[bot]
6196984d6d
Merge #254
254: v0.5.0 beta release r=texitoi a=japaric

this updates all the remaining references to japaric/cortex-m-rtfm, the Cargo metadata and copyright notice. After this PR the crates will be ready for beta release.

Co-authored-by: Jorge Aparicio <jorge@japaric.io>
2019-10-15 22:01:59 +00:00
Jorge Aparicio
eb2ec7a4c8 v0.5.0 beta release 2019-10-15 16:35:00 -05:00
bors[bot]
61551cd5ce
Merge #253
253: Fix matrix.to web link for the static room view. r=japaric a=tim-seoss

Fix the matrix.to link so that the room history can be viewed in
"Matrix-Static" by users who aren't registered on Matrix (e.g. for
previewing).  Hopefully this will also get the room content into search
engines.

n.b. The new matrix.to URL uses the room name instead of the room ID,
because the ID didn't work with Matrix-Static, and the matrix.to README at:

https://github.com/matrix-org/matrix.to says...

"Note that linking to rooms by ID should only be used for rooms to which
the target user has been invited: these links cannot be assumed to work for
all visitors."

Co-authored-by: Tim Small <tim@seoss.co.uk>
2019-10-15 20:19:15 +00:00
Tim Small
28e61ceaec Fix matrix.to web link for the static room view.
Fix the matrix.to link so that the room history can be viewed in
"Matrix-Static" by users who aren't registered on Matrix (e.g. for
previewing).  Hopefully this will also get the room content into search
engines.

n.b. The new matrix.to URL uses the room name instead of the room ID,
because the ID didn't work with Matrix-Static, and the matrix.to README at:

https://github.com/matrix-org/matrix.to says...

"Note that linking to rooms by ID should only be used for rooms to which
the target user has been invited: these links cannot be assumed to work for
all visitors."
2019-10-11 20:49:47 +01:00
chrysn
bbd47e20ee
critical sections: each task gets its own context
Fixing what was probably a copy-paste error; different tasks each have different types for their context argument.
2019-10-10 16:42:26 +02:00
bors[bot]
38306389ea
Merge #248
248: update the changelog and fix some links r=korken89 a=japaric



Co-authored-by: Jorge Aparicio <jorge@japaric.io>
2019-09-17 18:41:45 +00:00