diff --git a/.cargo/config.toml b/.cargo/config.toml index 8cce891..4b25ad0 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -2,8 +2,8 @@ # Choose a default "cargo run" tool (see README for more info) # - `probe-rs` provides flashing and defmt via a hardware debugger, and stack unwind on panic # - elf2uf2-rs loads firmware over USB when the rp2040 is in boot mode -runner = "probe-rs run --chip RP2040 --protocol swd" -# runner = "elf2uf2-rs -d" +# runner = "probe-rs run --chip RP2040 --protocol swd" +runner = "elf2uf2-rs -d" rustflags = [ "-C", "linker=flip-link", diff --git a/Embed.toml b/Embed.toml index 9c91b13..7281254 100644 --- a/Embed.toml +++ b/Embed.toml @@ -1,39 +1,12 @@ -[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.general] +chip = "RP2040" [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" +# channels = [{ up = 0, down = 0, name = "debug", format = "Defmt" }] [default.gdb] -enabled = false -gdb_connection_string = "127.0.0.1:2345" +enabled = true diff --git a/rp2040-project-template.uf2 b/rp2040-project-template.uf2 new file mode 100644 index 0000000..e48d18c Binary files /dev/null and b/rp2040-project-template.uf2 differ diff --git a/src/main.rs b/src/main.rs index 684e0e5..cba6611 100644 --- a/src/main.rs +++ b/src/main.rs @@ -62,8 +62,9 @@ fn main() -> ! { // If you have a Pico W and want to toggle a LED with a simple GPIO output pin, you can connect an external // LED to one of the GPIO pins, and reference that pin here. Don't forget adding an appropriate resistor // in series with the LED. - let mut led_pin = pins.led.into_push_pull_output(); - + // let mut led_pin = pins.led.into_push_pull_output(); + // In this case gpio17 is the led pin(for Pro Micro RP2040 16MB) + let mut led_pin = pins.gpio17.into_push_pull_output(); loop { info!("on!"); led_pin.set_high().unwrap();