Skip to content

Commit

Permalink
port it support Pro Micro RP2040(16M)
Browse files Browse the repository at this point in the history
  • Loading branch information
sndnvaps committed Jun 2, 2024
1 parent 19c5249 commit 29bd805
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 35 deletions.
4 changes: 2 additions & 2 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
35 changes: 4 additions & 31 deletions Embed.toml
Original file line number Diff line number Diff line change
@@ -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
Binary file added rp2040-project-template.uf2
Binary file not shown.
5 changes: 3 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 29bd805

Please sign in to comment.