Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo in md document #82

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/asm.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ by writing a very simple program.
Here's the disassembly. Look at the address of `HardFaultTrampoline`.

``` console
$ cargo objdump --bin app --release -- -d -no-show-raw-insn -print-imm-hex
$ cargo objdump --bin app --release -- -d --no-show-raw-insn --print-imm-hex
```

``` text
Expand Down Expand Up @@ -178,7 +178,7 @@ Now we can test this new version against the simple program from before and
we'll get the same output.

``` console
$ cargo objdump --bin app --release -- -d -no-show-raw-insn -print-imm-hex
$ cargo objdump --bin app --release -- -d --no-show-raw-insn --print-imm-hex
```

``` text
Expand Down
2 changes: 1 addition & 1 deletion src/compiler-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ following command:

``` console
$ # you need to have `cargo-binutils` installed to run this command
$ cargo objdump -- -version
$ cargo objdump -- --version
LLVM (http://llvm.org/):
LLVM version 7.0.0svn
Optimized build.
Expand Down
2 changes: 1 addition & 1 deletion src/exceptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ Breakpoint 1, DefaultExceptionHandler ()
And for completeness, here's the disassembly of the optimized version of the program:

``` console
$ cargo objdump --bin app --release -- -d -no-show-raw-insn -print-imm-hex
$ cargo objdump --bin app --release -- -d --no-show-raw-insn --print-imm-hex
```

``` text
Expand Down
2 changes: 1 addition & 1 deletion src/main.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ $ cat src/main.rs
The disassembly will be similar but will now include the user `main` function.

``` console
$ cargo objdump --bin app -- -d -no-show-raw-insn
$ cargo objdump --bin app -- -d --no-show-raw-insn
```

``` text
Expand Down
27 changes: 21 additions & 6 deletions src/preface.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,21 +69,36 @@ book:

Instructions common to all OSes

``` console
$ # Rust toolchain
$ # If you start from scratch, get rustup from https://rustup.rs/
```
console
# Rust toolchain
# If you start from scratch, get rustup from https://rustup.rs/

# Change rustc to default stable version.
$ rustup default stable
$ rustc -V
$ rustc +nightly -V

$ # toolchain should be newer than this one
# Change rustc to default nightly version.
$ rustup default nightly
$ rustc -V
rustc 1.31.0 (abe02cefd 2018-12-04)

# toolchain should be newer than this one.
$ rustc -V
rustc 1.59.0 (9d1b2106e 2022-02-23)

$ rustc +nightly -V
rustc 1.61.0-nightly (9c06e1ba4 2022-03-29)

$ rustup target add thumbv7m-none-eabi
$ rustup +nightly target add thumbv7m-none-eabi

$ # cargo-binutils
# cargo-binutils
$ cargo install cargo-binutils
$ cargo +nightly install cargo-binutils

$ rustup component add llvm-tools-preview
$ rustup +nightly component add llvm-tools-preview

```

Expand Down