config.toml 928 B

12345678910111213141516171819202122232425262728
  1. [target.'cfg(all(target_arch = "arm", target_os = "none"))']
  2. # Choose a default "cargo run" tool:
  3. # - probe-run provides flashing and defmt via a hardware debugger, and stack unwind on panic
  4. # - elf2uf2-rs loads firmware over USB when the rp2040 is in boot mode
  5. # - "probe-rs-cli run" is similar to probe-run but it uses the latest probe-rs lib crate
  6. # runner = "probe-run --chip RP2040"
  7. runner = "elf2uf2-rs -d"
  8. # runner = "probe-rs-cli run --chip RP2040 --protocol swd"
  9. rustflags = [
  10. "-C", "linker=flip-link",
  11. "-C", "link-arg=--nmagic",
  12. "-C", "link-arg=-Tlink.x",
  13. "-C", "link-arg=-Tdefmt.x",
  14. # Code-size optimizations.
  15. # trap unreachable can save a lot of space, but requires nightly compiler.
  16. # uncomment the next line if you wish to enable it
  17. # "-Z", "trap-unreachable=no",
  18. "-C", "inline-threshold=5",
  19. "-C", "no-vectorize-loops",
  20. ]
  21. [build]
  22. target = "thumbv6m-none-eabi"
  23. [env]
  24. DEFMT_LOG = "debug"