Skip to content

Commit

Permalink
Merge #520
Browse files Browse the repository at this point in the history
520: Add a note regarding `target` dir location r=eldruin a=arr-ee

Closes #270, #495, #511.

Shout out to `@mike2ykme` for the original PR, not sure if I should mess with commit metadata to add credit.

Co-authored-by: Max Barnash <[email protected]>
  • Loading branch information
bors[bot] and arr-ee authored Mar 30, 2023
2 parents edca904 + fd17c3e commit 14d9b6e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
11 changes: 11 additions & 0 deletions f3discovery/src/05-led-roulette/flash-it.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,17 @@ gdb-multiarch -q -ex "target remote :3333" target/thumbv7em-none-eabihf/debug/le
``` console
gdb -q -ex "target remote :3333" target/thumbv7em-none-eabihf/debug/led-roulette
```

> **NOTE**: If you are getting `target/thumbv7em-none-eabihf/debug/led-roulette: No such file or directory`
> error, try adding `../../` to the file path, for example:
>
> ```shell
> $ gdb -q -ex "target remote :3333" ../../target/thumbv7em-none-eabihf/debug/led-roulette
> ```
>
> This is caused by each example project being in a `workspace` that contains the entire book, and workspaces have
> a single `target` directory. Check out [Workspaces chapter in Rust Book] for more.
### **Failing case**
You can detect a failing case if there is a `warning` or `error` after the `Remote debugging using :3333` line:
Expand Down
12 changes: 12 additions & 0 deletions microbit/src/05-led-roulette/debug-it.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,18 @@ $ gdb target/thumbv6m-none-eabi/debug/led-roulette
[chapter 3]: ../03-setup/index.md#tools

> **NOTE**: If you are getting `target/thumbv7em-none-eabihf/debug/led-roulette: No such file or directory`
> error, try adding `../../` to the file path, for example:
>
> ```shell
> $ gdb ../../target/thumbv7em-none-eabihf/debug/led-roulette
> ```
>
> This is caused by each example project being in a `workspace` that contains the entire book, and workspaces have
> a single `target` directory. Check out [Workspaces chapter in Rust Book] for more.
[Workspaces chapter in Rust Book]: https://doc.rust-lang.org/book/ch14-03-cargo-workspaces.html#creating-a-workspace
> **NOTE**: If `cargo-embed` prints a lot of warnings here don't worry about it. As of now it does not fully
> implement the GDB protocol and thus might not recognize all the commands your GDB is sending to it,
> as long as it does not crash, you are fine.
Expand Down

0 comments on commit 14d9b6e

Please sign in to comment.