Skip to content
Open
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
26 changes: 26 additions & 0 deletions mdbook/src/appendix/1-general-troubleshooting/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,29 @@ Install the proper target.
``` console
$ rustup target add thumbv7em-none-eabihf
```

### Unable to flash the device: `No loadable segments were found in the ELF file`

*Symptoms:*
```console
> cargo embed
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.04s
Config default
Target /home/user/embedded/target/thumbv7em-none-eabihf/debug/examples/init
WARN probe_rs::flashing::loader: No loadable segments were found in the ELF file.
Error No loadable segments were found in the ELF file.
```

*Cause:*

Cargo needs to know how to build and link the program to the requirements of the target device.
You therefore need to set the correct parameters in the `.cargo/config.toml` file.

*Fix:*

Add a `.cargo/config.toml` file with the correct parameters:
```toml
{{#include ../../05-meet-your-software/.cargo/config.toml}}
```

See [Embedded Setup](../../05-meet-your-software/embedded-setup.md) for further details.
Loading