385 Commits

Author SHA1 Message Date
baizhenxuan
66191cc147 Merge pull request #1 from kingfree/master
修正 `no_std` 翻译错误
2020-05-28 11:16:44 +08:00
bai
b6daab1dcf readme 2020-05-27 08:36:25 +08:00
原田莓莓
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
a6915c68bc build 2020-05-26 20:19:48 +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
bors[bot]
668fb07b61 Merge #232
232: Add triagebot configuration r=adamgreig a=LeSeulArtichaut

This enables [assignment](https://github.com/rust-lang/triagebot/wiki/Assignment) through triagebot on this repository, in preparation for the migration from highfive to triagebot for PR assignment.

cc rust-lang/highfive#258 rust-lang/triagebot#433

Co-authored-by: LeSeulArtichaut <leseulartichaut@gmail.com>
2020-04-13 12:38:16 +00:00
LeSeulArtichaut
098c2835b2 Add triagebot configuration 2020-04-13 14:20:33 +02:00
bors[bot]
d22a9c487c Merge #230
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>
2020-03-04 09:46:30 +00: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
bors[bot]
96e40edcac Merge #229
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>
2020-03-02 22:34:14 +00: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
bors[bot]
b81ffb7a6f Merge #227
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>
2020-02-27 08:06:04 +00:00
Tomasz Różański
fb382e5fa6 Setting output to high needs a true argument 2020-02-27 01:30:57 +01:00
bors[bot]
0056a652c7 Merge #226
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>
2020-02-17 17:50:10 +00: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
bors[bot]
b2e1092bf6 Merge #224
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>
2020-01-30 08:45:46 +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
bors[bot]
ccda305cda Merge #223
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>
2020-01-27 21:12:49 +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
b778f530cc CI: Remove workaround for mdBook issue
rust-lang/mdbook#789 has been fixed and this was working locally without
the `ignore-url`.
2020-01-27 07:27:17 +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
bors[bot]
4d78994915 Merge #221
221: Update .gitattributes r=therealprof a=jethrogb

See https://github.com/rust-lang/rust/pull/57858

Co-authored-by: jethrogb <github@jbeekman.nl>
2020-01-14 08:25:25 +00:00
jethrogb
dde3bbc031 Update .gitattributes
See https://github.com/rust-lang/rust/pull/57858
2020-01-13 20:07:02 -08:00
Philipp Hansch
9070d63581 Mention discovery book more prominently 2020-01-06 07:39:27 +01:00
bors[bot]
9493b7d4dc Merge #218
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>
2019-12-27 20:05:00 +00:00
Philipp Tessenow
b0caac378c fixed typo in Interrupts.md 2019-12-27 20:49:12 +01:00
bors[bot]
c262349302 Merge #216
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>
2019-12-07 17:25:11 +00: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
bors[bot]
5ca585c4a7 Merge #205
205: Fixup book CI r=adamgreig a=jamesmunns

mdbook now has binary releases: https://github.com/rust-lang-nursery/mdBook/releases

Edit:

closes https://github.com/rust-embedded/book/issues/59

Co-authored-by: James Munns <james.munns@ferrous-systems.com>
2019-08-27 13:39:14 +00:00
James Munns
7395ddb811 Fixup book CI 2019-08-27 15:16:57 +02:00
bors[bot]
432ca26686 Merge #203
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>
2019-08-09 23:20:22 +00: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
bors[bot]
c5da1e1191 Merge #202
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>
2019-08-05 23:02:10 +00: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
bors[bot]
f4ce2dfeeb Merge #198
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>
2019-07-18 17:57:58 +00:00
thalesfragoso
1b25e043e6 syst small fix 2019-07-18 12:41:56 -03:00