Allow flashing using DapperMime RP2040 probe

This commit is contained in:
SupImDos 2022-09-09 14:26:11 +08:00
parent 3b4d6269fd
commit 92bba4e46f
4 changed files with 24 additions and 13 deletions

View file

@ -2,7 +2,7 @@
target = "thumbv6m-none-eabi"
[target.thumbv6m-none-eabi]
runner = "elf2uf2-rs -d" # "probe-run --chip RP2040"
runner = "probe-run --chip RP2040" # "elf2uf2-rs -d"
rustflags = [
"-C", "link-arg=--nmagic",
"-C", "link-arg=-Tlink.x",

21
Cargo.lock generated
View file

@ -208,7 +208,7 @@ dependencies = [
[[package]]
name = "embassy-cortex-m"
version = "0.1.0"
source = "git+https://github.com/embassy-rs/embassy#22c32b5d5ccaea49d6cf9a08a88433928c1609d3"
source = "git+https://github.com/embassy-rs/embassy#573c433f64a049d4e0d501df1194c3228aae0863"
dependencies = [
"atomic-polyfill 1.0.1",
"cfg-if",
@ -223,7 +223,7 @@ dependencies = [
[[package]]
name = "embassy-embedded-hal"
version = "0.1.0"
source = "git+https://github.com/embassy-rs/embassy#22c32b5d5ccaea49d6cf9a08a88433928c1609d3"
source = "git+https://github.com/embassy-rs/embassy#573c433f64a049d4e0d501df1194c3228aae0863"
dependencies = [
"embassy-sync",
"embedded-hal 0.2.7",
@ -237,7 +237,7 @@ dependencies = [
[[package]]
name = "embassy-executor"
version = "0.1.0"
source = "git+https://github.com/embassy-rs/embassy#22c32b5d5ccaea49d6cf9a08a88433928c1609d3"
source = "git+https://github.com/embassy-rs/embassy#573c433f64a049d4e0d501df1194c3228aae0863"
dependencies = [
"atomic-polyfill 1.0.1",
"cfg-if",
@ -252,12 +252,12 @@ dependencies = [
[[package]]
name = "embassy-futures"
version = "0.1.0"
source = "git+https://github.com/embassy-rs/embassy#22c32b5d5ccaea49d6cf9a08a88433928c1609d3"
source = "git+https://github.com/embassy-rs/embassy#573c433f64a049d4e0d501df1194c3228aae0863"
[[package]]
name = "embassy-hal-common"
version = "0.1.0"
source = "git+https://github.com/embassy-rs/embassy#22c32b5d5ccaea49d6cf9a08a88433928c1609d3"
source = "git+https://github.com/embassy-rs/embassy#573c433f64a049d4e0d501df1194c3228aae0863"
dependencies = [
"num-traits",
]
@ -265,7 +265,7 @@ dependencies = [
[[package]]
name = "embassy-macros"
version = "0.1.0"
source = "git+https://github.com/embassy-rs/embassy#22c32b5d5ccaea49d6cf9a08a88433928c1609d3"
source = "git+https://github.com/embassy-rs/embassy#573c433f64a049d4e0d501df1194c3228aae0863"
dependencies = [
"darling",
"proc-macro2",
@ -276,7 +276,7 @@ dependencies = [
[[package]]
name = "embassy-rp"
version = "0.1.0"
source = "git+https://github.com/embassy-rs/embassy#22c32b5d5ccaea49d6cf9a08a88433928c1609d3"
source = "git+https://github.com/embassy-rs/embassy#573c433f64a049d4e0d501df1194c3228aae0863"
dependencies = [
"atomic-polyfill 1.0.1",
"cfg-if",
@ -316,7 +316,7 @@ dependencies = [
[[package]]
name = "embassy-sync"
version = "0.1.0"
source = "git+https://github.com/embassy-rs/embassy#22c32b5d5ccaea49d6cf9a08a88433928c1609d3"
source = "git+https://github.com/embassy-rs/embassy#573c433f64a049d4e0d501df1194c3228aae0863"
dependencies = [
"atomic-polyfill 1.0.1",
"cfg-if",
@ -329,7 +329,7 @@ dependencies = [
[[package]]
name = "embassy-time"
version = "0.1.0"
source = "git+https://github.com/embassy-rs/embassy#22c32b5d5ccaea49d6cf9a08a88433928c1609d3"
source = "git+https://github.com/embassy-rs/embassy#573c433f64a049d4e0d501df1194c3228aae0863"
dependencies = [
"atomic-polyfill 1.0.1",
"cfg-if",
@ -343,7 +343,7 @@ dependencies = [
[[package]]
name = "embassy-usb"
version = "0.1.0"
source = "git+https://github.com/embassy-rs/embassy#22c32b5d5ccaea49d6cf9a08a88433928c1609d3"
source = "git+https://github.com/embassy-rs/embassy#573c433f64a049d4e0d501df1194c3228aae0863"
dependencies = [
"defmt",
"embassy-futures",
@ -559,6 +559,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3ab1f00eac22bd18f8e5cae9555f2820b3a0c166b5b556ee3e203746ea6dcf3a"
dependencies = [
"cortex-m",
"defmt",
]
[[package]]

View file

@ -9,7 +9,7 @@ cortex-m-rt = "0.7.0"
defmt = "0.3"
defmt-rtt = "0.3"
panic-probe = "0.3"
panic-probe = { version = "0.3", features = ["print-defmt"] }
embassy-executor = { version = "0.1.0", git = "https://github.com/embassy-rs/embassy", features = ["defmt", "integrated-timers"] }
embassy-time = { version = "0.1.0", git = "https://github.com/embassy-rs/embassy", features = ["defmt", "defmt-timestamp-uptime"] }

View file

@ -2,4 +2,14 @@ MEMORY {
BOOT2 : ORIGIN = 0x10000000, LENGTH = 0x100
FLASH : ORIGIN = 0x10000100, LENGTH = 2048K - 0x100
RAM : ORIGIN = 0x20000000, LENGTH = 256K
}
}
EXTERN(BOOT2_FIRMWARE)
SECTIONS {
/* ### Boot loader */
.boot2 ORIGIN(BOOT2) :
{
KEEP(*(.boot2));
} > BOOT2
} INSERT BEFORE .text;