From b1817f87dfdac750296c2918acd004e95b8f6ab0 Mon Sep 17 00:00:00 2001 From: Chas Leichner Date: Wed, 23 Jun 2021 16:50:39 -0700 Subject: [PATCH] Update book to track quickstart changes - .cargo/config -> .cargo/config.toml --- src/start/hardware.md | 8 ++++---- src/start/qemu.md | 10 +++++----- src/start/semihosting.md | 2 +- src/unsorted/speed-vs-size.md | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/start/hardware.md b/src/start/hardware.md index 94221e42..5af7804a 100644 --- a/src/start/hardware.md +++ b/src/start/hardware.md @@ -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 @@ -320,10 +320,10 @@ OpenOCD, enable semihosting, load the program and start the process. Alternatively, you can turn ` -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 diff --git a/src/start/qemu.md b/src/start/qemu.md index 69866569..a56f7394 100644 --- a/src/start/qemu.md +++ b/src/start/qemu.md @@ -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 @@ -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 @@ -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 diff --git a/src/start/semihosting.md b/src/start/semihosting.md index feae1a07..cf4626f4 100644 --- a/src/start/semihosting.md +++ b/src/start/semihosting.md @@ -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 diff --git a/src/unsorted/speed-vs-size.md b/src/unsorted/speed-vs-size.md index da914e6a..6538d94b 100644 --- a/src/unsorted/speed-vs-size.md +++ b/src/unsorted/speed-vs-size.md @@ -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 = [