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>
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).
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>
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.
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>
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>
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>
At the moment cortex-m crate hides const versions of some functions,
including Mutex::new(), behind the const-fn feature. So this feature
needs to be enabled to cortex-m in Cargo.toml for shared resource
examples.
Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
# QEMU
## Creating a non standard Rust program
### Using `cargo-generate`
### Using `git`
### Using neither
## Cross compiling
## Inspecting
## Running
## Debugging
pull request is related to https://github.com/rust-embedded/book/issues/186