When modifying the example so that it is indipended of the paths (using the upstream hal libraries) the example works only when it is in the examples folder. Copying out did not work.
I found the .cargo/config.toml file in the examples folder makes the difference.
Steps to reproduce
1) Get for example hello-world running in the examples folder (remove all cfg, and change depedencies to use the upstream)
2) Check the size with cargo size --bin hello-world --release -- -A
When modifying the example so that it is indipended of the paths (using the upstream hal libraries) the example works only when it is in the examples folder. Copying out did not work. I found the .cargo/config.toml file in the examples folder makes the difference.
Steps to reproduce
1) Get for example hello-world running in the examples folder (remove all cfg, and change depedencies to use the upstream) 2) Check the size with
cargo size --bin hello-world --release -- -A
3) Copy the example project somewhere else and repeat step 2 again.
Observed
No program in binary
Expected
The result is the same as in step 2
How to fix
Copy the
config.toml
file into the project.cargo
folder and set correct target for running.I did not found any documentation that this step is required.