215: Add hint on memory config to GDB debugging section r=jamesmunns a=LandingEllipse
If `memory.x` is misconfigured, the hello example can potentially still be built and flashed, only to fail without a proper error message when the user attempts to continue to the main breakpoint during the debugging section, as exemplified by #199 .
This PR adds a note after the relevant step, directing the user to examine `memory.x` for errors.
Co-authored-by: Ariel Ladegaard <104284+LandingEllipse@users.noreply.github.com>
213: Adds cargo-generate to installation instructions r=jamesmunns a=rubberduck203
Fixes#186
Related to 753d71ac, which added instructions close to use in the qemu
page, this commit adds the information directly to install where it's
less likely to be overlooked.
Co-authored-by: Christopher J. McClellan <cmcclellan@pillartechnology.com>
206: collections: Fix example allocator r=jamesmunns a=oohal
The example bump-pointer allocator doesn't take into account the size of
the allocation, just the alignment. As a result it'll work fine for small
allocations where alignment >= size (e.g. a single int), but it results in
overlapping allocations for anything larger.
Also, change the alignment calculation to find the aligment using the
add-then-mask method rather than screwing around with remainders.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Co-authored-by: Oliver O'Halloran <oohall@gmail.com>
230: Updated documentation on profile-overrides r=therealprof a=irwineffect
Profile-overrides has now been stabilized (rust-lang/cargo#7591), so the book has been updated to point to the stable documentation.
During stabilization, syntax was changed to use "package" instead of "overrides" (rust-lang/cargo#7504), documentation updated to match.
Co-authored-by: James Irwin <irwineffect@gmail.com>
229: Update information on Cargo `profile-overrides` r=adamgreig a=tomaszrozanski
Because `profile-overrides` feature is now stabilized, I removed unnecesary warnings and pieces of code.
Co-authored-by: Tomasz Różański <tomasz.rozanski@fastmail.com>
227: Setting output to `high` needs a `true` argument r=therealprof a=Rosto75
See the comment in line 239.
Co-authored-by: Tomasz Różański <rosto@tlen.pl>
226: Add licence notes to index.md r=therealprof a=thejpster
After discussions with someone who had re-used material without attribution, we agreed it would be useful to make the licence terms more prominent to those reading the rendered book (as opposed to browsing the Github repo).
Co-authored-by: Jonathan 'theJPster' Pallant <github@thejpster.org.uk>
After discussions with someone who had re-used material without attribution, we agreed it would be useful to make the licence terms more prominent to those reading the rendered book (as opposed to browsing the Github repo).
224: Make typestate initialization notes correct r=therealprof a=Logan-Hunter
As written previously, the note after the initial typestate
programming example saying that there's no direct way to create
a Foo object wasn't quite accurate; in the sample given you
definitely could, since Foo and FooBuilder weren't isolated
into a module. Isolated Foo and FooBuilder into a module to
make the statement correct.
Co-authored-by: Logan Hunter <loganhunter27@gmail.com>
As written previously, the note after the initial typestate
programming example saying that there's no direct way to create
a Foo object wasn't quite accurate; in the sample given you
definitely could, since Foo and FooBuilder weren't isolated
into a module. Isolated Foo and FooBuilder into a module to
make the statement correct.
219: Mention discovery book more prominently r=thejpster a=phansch
Hi, I just started reading the book and only by chance found the discovery book via the bookshelf.
I think it's worth mentioning it explicitly somewhere on this page for people who are not familiar with embedded development.
Co-authored-by: Philipp Hansch <dev@phansch.net>
222: Replace nursery links with rust-lang links r=thejpster a=phansch
Both repos have been moved to the `rust-lang` org and the links are
still redirecting properly. This way we just avoid the redirect and make
the link shorter.
Co-authored-by: Philipp Hansch <dev@phansch.net>
223: Add a Glossary appendix page r=thejpster a=phansch
Same structure as the [rustc-guide] basically.
I added some initial abbreviations and hope the explanations are correct.
I think it would be nice to get this merged without much iteration, so other people can start filling things in, too.
Closes#220
[rustc-guide]: https://rust-lang.github.io/rustc-guide/appendix/glossary.html#appendix-c-glossary
Co-authored-by: Philipp Hansch <dev@phansch.net>
Both repos have been moved to the `rust-lang` org and the links are
still redirecting properly. This way we just avoid the redirect and make
the link shorter.
218: fixed typo in Interrupts.md r=therealprof a=tessi
Just fixing a double-`to` I encountered while reading the book.
Thanks for the great content ❤️
Co-authored-by: Philipp Tessenow <philipp@tessenow.org>
216: Fix `impl Gpio` -> `impl GpioConfig` r=andre-richter a=andebjor
In the two sections "Peripherals as State Machines" and "Design
Contracts" of the "Static Guarantees" chapter, `impl Gpio` was
incorrectly used in place of `impl GpioConfig` at one place in each
section.
Co-authored-by: Björn Andersson <andebjor@gmail.com>
In the two sections "Peripherals as State Machines" and "Design
Contracts" of the "Static Guarantees" chapter, `impl Gpio` was
incorrectly used in place of `impl GpioConfig` at one place in each
section.
This commit fixes that.
If memory.x is misconfigured, the hello example can potentially still be built and flashed, only to fail without a proper error message when the user attempts to continue to the main breakpoint during the debugging section, as exemplified by #199 .
This commit adds a note after the relevant step, directing the user to examine memory.x for errors.
Fixes#186
Related to 753d71ac, which added instructions close to use in the qemu
page, this commit adds the information directly to install where it's
less likely to be overlooked.
The example bump-pointer allocator doesn't take into account the size of
the allocation, just the alignment. As a result it'll work fine for small
allocations where alignment >= size (e.g. a single int), but it results in
overlapping allocations for anything larger.
Also, change the alignment calculation to find the aligment using the
add-then-mask method rather than screwing around with remainders.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
203: semihosting: add comment adding feature flag to panic-semihosting r=therealprof a=chibby0ne
This wasn't entirely trivial to find if you've never worked with feature
flags for dependencies. Hopefully it helps others out there.
Signed-off-by: Antonio Gutierrez <chibby0ne@gmail.com>
Co-authored-by: Antonio Gutierrez <chibby0ne@gmail.com>
This wasn't entirely trivial to find if you've never worked with feature
flags for dependencies. Hopefully it helps others out there.
Signed-off-by: Antonio Gutierrez <chibby0ne@gmail.com>
202: install/verify: fix next section link r=jamesmunns a=chibby0ne
The next section in the book is the "Getting Started", not the already
seen section Hardware in the same chapter.
Signed-off-by: Antonio Gutierrez <chibby0ne@gmail.com>
Co-authored-by: Antonio Gutierrez <chibby0ne@gmail.com>
The next section in the book is the "Getting Started", not the already
seen section Hardware in the same chapter.
Signed-off-by: Antonio Gutierrez <chibby0ne@gmail.com>
198: Syst small fix r=adamgreig a=thalesfragoso
To comply with `cortex-m` docs (https://docs.rs/cortex-m/0.6.0/cortex_m/peripheral/struct.SYST.html)
> NOTE The reference manual indicates that:
>
>"The SysTick counter reload and current value are undefined at reset, the correct initialization >sequence for the SysTick counter is:
>
> Program reload value
> Clear current value
> Program Control and Status register"
>
>The sequence translates to self.set_reload(x); self.clear_current(); self.enable_counter()
I think this just slipped through, since the other example on systick does that.
Co-authored-by: thalesfragoso <thales.fragosoz@gmail.com>