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

Update book to track quickstart changes #296

Merged
merged 1 commit into from
Jun 24, 2021
Merged
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
8 changes: 4 additions & 4 deletions src/start/hardware.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ $ cargo generate --git https://github.com/rust-embedded/cortex-m-quickstart
$ cd app
```

Step number one is to set a default compilation target in `.cargo/config`.
Step number one is to set a default compilation target in `.cargo/config.toml`.

``` console
tail -n5 .cargo/config
tail -n5 .cargo/config.toml
```

``` toml
Expand Down Expand Up @@ -320,10 +320,10 @@ OpenOCD, enable semihosting, load the program and start the process.

Alternatively, you can turn `<gdb> -x openocd.gdb` into a custom runner to make
`cargo run` build a program *and* start a GDB session. This runner is included
in `.cargo/config` but it's commented out.
in `.cargo/config.toml` but it's commented out.

``` console
head -n10 .cargo/config
head -n10 .cargo/config.toml
```

``` toml
Expand Down
10 changes: 5 additions & 5 deletions src/start/qemu.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@ bit in the function signature) to ensure at compile time that'll be the case.

The next step is to *cross* compile the program for the Cortex-M3 architecture.
That's as simple as running `cargo build --target $TRIPLE` if you know what the
compilation target (`$TRIPLE`) should be. Luckily, the `.cargo/config` in the
compilation target (`$TRIPLE`) should be. Luckily, the `.cargo/config.toml` in the
template has the answer:

```console
tail -n6 .cargo/config
tail -n6 .cargo/config.toml
```

```toml
Expand All @@ -161,7 +161,7 @@ if you haven't done it yet:
rustup target add thumbv7m-none-eabi
```
Since the `thumbv7m-none-eabi` compilation target has been set as the default in
your `.cargo/config` file, the two commands below do the same:
your `.cargo/config.toml` file, the two commands below do the same:

```console
cargo build --target thumbv7m-none-eabi
Expand Down Expand Up @@ -401,11 +401,11 @@ Let's break down that QEMU command:
machine.

Typing out that long QEMU command is too much work! We can set a custom runner
to simplify the process. `.cargo/config` has a commented out runner that invokes
to simplify the process. `.cargo/config.toml` has a commented out runner that invokes
QEMU; let's uncomment it:

```console
head -n3 .cargo/config
head -n3 .cargo/config.toml
```

```toml
Expand Down
2 changes: 1 addition & 1 deletion src/start/semihosting.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ semihosting is enabled
QEMU understands semihosting operations so the above program will also work with
`qemu-system-arm` without having to start a debug session. Note that you'll
need to pass the `-semihosting-config` flag to QEMU to enable semihosting
support; these flags are already included in the `.cargo/config` file of the
support; these flags are already included in the `.cargo/config.toml` file of the
template.

``` text
Expand Down
4 changes: 2 additions & 2 deletions src/unsorted/speed-vs-size.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ closures).
When optimizing for size you may want to try increasing the inline threshold to
see if that has any effect on the binary size. The recommended way to change the
inline threshold is to append the `-C inline-threshold` flag to the other
rustflags in `.cargo/config`.
rustflags in `.cargo/config.toml`.

``` toml
# .cargo/config
# .cargo/config.toml
# this assumes that you are using the cortex-m-quickstart template
[target.'cfg(all(target_arch = "arm", target_os = "none"))']
rustflags = [
Expand Down