From 3474f7b108853631f42ddac3ce17256a7428edaa Mon Sep 17 00:00:00 2001 From: 9names <60134748+9names@users.noreply.github.com> Date: Sun, 26 Jun 2022 13:42:31 +1000 Subject: [PATCH] Add Embed.toml and runner settings for cargo embed --- .cargo/config.toml | 9 ++++++--- Embed.toml | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 Embed.toml diff --git a/.cargo/config.toml b/.cargo/config.toml index 82a4b24..e6676fc 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,8 +1,11 @@ -# Choose a default "cargo run" tool. -# probe-run is recommended if you have a debugger -# elf2uf2-rs loads firmware over USB when the rp2040 is in boot mode [target.'cfg(all(target_arch = "arm", target_os = "none"))'] +# Choose a default "cargo run" tool: +# - probe-run provides flashing and defmt via a hardware debugger +# - cargo embed offers flashing, rtt, defmt and a gdb server via a hardware debugger +# it is configured via the Embed.toml in the root of this project +# - elf2uf2-rs loads firmware over USB when the rp2040 is in boot mode runner = "probe-run --chip RP2040" +# runner = "cargo embed" # runner = "elf2uf2-rs -d" rustflags = [ diff --git a/Embed.toml b/Embed.toml new file mode 100644 index 0000000..9c91b13 --- /dev/null +++ b/Embed.toml @@ -0,0 +1,39 @@ +[default.probe] +protocol = "Swd" +speed = 20000 +# If you only have one probe cargo embed will pick automatically +# Otherwise: add your probe's VID/PID/serial to filter + +## rust-dap +# usb_vid = "6666" +# usb_pid = "4444" +# serial = "test" + + +[default.flashing] +enabled = true + +[default.reset] +enabled = true +halt_afterwards = false + +[default.general] +chip = "RP2040" +log_level = "WARN" +# RP2040 does not support connect_under_reset +connect_under_reset = false + +[default.rtt] +enabled = true +up_mode = "NoBlockSkip" +channels = [ + { up = 0, down = 0, name = "name", up_mode = "NoBlockSkip", format = "Defmt" }, +] +timeout = 3000 +show_timestamps = true +log_enabled = false +log_path = "./logs" + +[default.gdb] +enabled = false +gdb_connection_string = "127.0.0.1:2345"