283 Commits

Author SHA1 Message Date
原田莓莓
b46dbba837 修正 no_std 翻译错误
In a bare metal environment no code has been loaded before your program.
2020-05-26 21:33:35 +08:00
bai
f718cb36aa 更新地址信息 2020-05-26 20:25:04 +08:00
bai
7c56bf812f 校正2 2020-05-26 20:13:57 +08:00
bai
753b654ef9 校正 2020-05-06 13:26:23 +08:00
bai
69f9a39b72 第一版本,完整翻译 2020-05-06 11:27:43 +08:00
bors[bot]
40beccdf1b Merge #215
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>
2020-04-26 17:44:14 +00:00
bors[bot]
e3b0e42b2a Merge #213
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>
2020-04-26 17:42:57 +00:00
bors[bot]
ba921b06e2 Merge #206
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>
2020-04-26 17:40:46 +00:00
bors[bot]
773d7d6c74 Merge #233
233: Flip111/patch 8 r=adamgreig a=jamesmunns

Supersedes #164

Co-authored-by: flip111 <flip101@gmail.com>
Co-authored-by: James Munns <james.munns@ferrous-systems.com>
2020-04-26 17:29:51 +00:00
James Munns
a65223fe58 Apply suggestions from @adamgreig 2020-04-26 19:23:36 +02:00
James Irwin
eeb96b8029 Updated documentation on profile-overrides
This feature has now been stabilized, also syntax was changed to use "package" instead of "overrides"
2020-03-03 18:40:57 -08:00
Tomasz Różański
5df288c774 Update information on Cargo profile-overrides
Because `profile-overrides` feature is now stabilized, I removed unnecesary warnings and pieces of code.
2020-03-02 16:34:50 +01:00
Tomasz Różański
fb382e5fa6 Setting output to high needs a true argument 2020-02-27 01:30:57 +01:00
Jonathan 'theJPster' Pallant
7edcc136ae Add licence notes to index.md
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).
2020-02-17 15:55:12 +00:00
Logan Hunter
ba253673bb Make typestate initialization notes correct
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.
2020-01-29 21:03:51 -07:00
bors[bot]
0a6af4da99 Merge #219
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>
2020-01-27 21:18:08 +00:00
bors[bot]
6126e21792 Merge #222
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>
2020-01-27 21:14:59 +00:00
Philipp Hansch
6622409b81 Add a Glossary appendix page
Same structure as the [rustc-guide] basically.

I added some initial abbreviations and hope the explanations are correct.

[rustc-guide]: https://rust-lang.github.io/rustc-guide/appendix/glossary.html#appendix-c-glossary
2020-01-27 08:08:53 +01:00
Philipp Hansch
103e14698e Replace nursery links with rust-lang links
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.
2020-01-27 07:11:13 +01:00
Philipp Hansch
9070d63581 Mention discovery book more prominently 2020-01-06 07:39:27 +01:00
Philipp Tessenow
b0caac378c fixed typo in Interrupts.md 2019-12-27 20:49:12 +01:00
Björn Andersson
5e193988db Fix impl Gpio -> impl GpioConfig`
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.
2019-12-07 18:11:22 +01:00
Ariel Ladegaard
384106f6cf Add hint on memory config to GDB debugging section
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.
2019-12-03 16:19:04 +00:00
Christopher J. McClellan
4498062af7 Adds cargo-generate to installation instructions
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.
2019-11-19 19:42:11 -05:00
Oliver O'Halloran
8bae60aca0 collections: Fix example allocator
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>
2019-10-12 13:14:59 +11:00
Antonio Gutierrez
75a8510f59 semihosting: add comment adding feature flag to panic-semihosting
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>
2019-08-10 01:11:12 +02:00
Antonio Gutierrez
db6bd32c66 install/verify: Fix broken link pointed by bors
Signed-off-by: Antonio Gutierrez <chibby0ne@gmail.com>
2019-08-06 00:56:25 +02:00
Antonio Gutierrez
f106cba28e install/verify: fix next section link
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>
2019-08-05 23:58:42 +02:00
thalesfragoso
1b25e043e6 syst small fix 2019-07-18 12:41:56 -03:00
david-perez
8b72c1e16a use_core() is required for #![no_std] compatible generated bindings 2019-07-16 00:08:35 +01:00
Sergey Matyukevich
314a00be58 fixup: address review comments
Address review comments by @andre-richter: proof-reading

Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
2019-07-11 21:43:19 +03:00
Sergey Matyukevich
18557e7486 concurrency: add note about const-fn feature in cortex-m crate
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>
2019-07-09 23:15:49 +03:00
Sergey Matyukevich
a0f62dd355 concurrency: example of mutable reference to shared resource
Add example of mutable reference to shared resource
using borrow_mut and deref_mut.

Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
2019-07-09 22:39:50 +03:00
Eric Huss
a7da551162 Fix link for more strict commonmark interpretation.
mdbook will be moving to a newer version of pulldown-cmark which more
closely follows the commonmark spec. Link labels do not allow square brackets.
2019-06-18 15:55:07 -07:00
Stefan Eicher
b003f33afa create section ## Program Overview
to make obvious that this is no part of those sections
### Using `cargo-generate`
### Using `git`
### Using neither
2019-06-03 11:05:36 +02:00
Stefan Eicher
a9e976af03 move "**IMPORTANT** We'll use the name "app" for the project name"
since the term app is already used before
2019-06-03 11:05:36 +02:00
Stefan Eicher
c0f7b63c30 delete "Using the command line:" to make the documentation style consistent to the previous command line blocks 2019-06-03 11:05:36 +02:00
Stefan Eicher
753d71acb9 add comment to run "cargo install cargo-generate" first 2019-06-03 11:05:36 +02:00
Stefan Eicher
51845ac403 Update headings to get the the following TOC
# 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
2019-06-03 11:05:29 +02:00
Vadim Kaushan
abb79175fb Remove obsoleve AUR instructions 2019-05-01 21:38:22 +02:00
Vadim Kaushan
4f7338edc9 Merge branch 'master' into patch-10 2019-05-01 21:36:31 +02:00
bors[bot]
8f366fec4f Merge #165
165: Clarify list of available targets for installation r=korken89 a=adamgreig



Co-authored-by: Adam Greig <adam@adamgreig.com>
2019-05-01 15:35:35 +00:00
Erich Schroeter
df601ce501 minor grammar fix 2019-04-29 13:30:12 -05:00
nickgolangi
6e2cc8fc49 Change to first person and improve tone 2019-04-20 12:03:22 -04:00
nickgolangi
2546d1771b Grammar fix 2019-04-20 12:01:43 -04:00
Tim Small
5c6b0165c0 Whitespace (re-wrap). 2019-04-04 12:53:09 +01:00
Tim Small
d5fd57d9a5 Fix grammar-o https://github.com/rust-embedded/book/issues/182 2019-04-04 12:52:01 +01:00
bors[bot]
ee6d62c1e7 Merge #179
179: Add openocd to list of installable packages r=therealprof a=TheNeikos

The openocd package is now in the community repository of Archlinux.

https://www.archlinux.org/packages/community/x86_64/openocd/

Co-authored-by: Marcel Müller <com2040@gmail.com>
2019-03-28 10:27:31 +00:00
Eric Huss
9f103c2a8a Fix test errors. 2019-03-24 10:38:01 -07:00
Marcel Müller
b85f872b72 Add openocd to list of installable packages
The openocd package is now in the community repository of Archlinux.

https://www.archlinux.org/packages/community/x86_64/openocd/
2019-03-14 16:31:21 +01:00