diff --git a/mdbook/src/appendix/1-general-troubleshooting/README.md b/mdbook/src/appendix/1-general-troubleshooting/README.md index 1099eea0..19f8e049 100644 --- a/mdbook/src/appendix/1-general-troubleshooting/README.md +++ b/mdbook/src/appendix/1-general-troubleshooting/README.md @@ -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.