diff --git a/.cargo/config.toml b/.cargo/config.toml index 311682e..783e7c5 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -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", diff --git a/Cargo.lock b/Cargo.lock index 89935a2..239aa84 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -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]] diff --git a/Cargo.toml b/Cargo.toml index 2f25e39..9731023 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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"] } diff --git a/memory.x b/memory.x index aba861a..070eac7 100644 --- a/memory.x +++ b/memory.x @@ -2,4 +2,14 @@ MEMORY { BOOT2 : ORIGIN = 0x10000000, LENGTH = 0x100 FLASH : ORIGIN = 0x10000100, LENGTH = 2048K - 0x100 RAM : ORIGIN = 0x20000000, LENGTH = 256K -} \ No newline at end of file +} + +EXTERN(BOOT2_FIRMWARE) + +SECTIONS { + /* ### Boot loader */ + .boot2 ORIGIN(BOOT2) : + { + KEEP(*(.boot2)); + } > BOOT2 +} INSERT BEFORE .text; \ No newline at end of file