From 5827432a537d1b756f1e5d2c25bf7c90f504984a Mon Sep 17 00:00:00 2001 From: hodasemi Date: Thu, 9 Jan 2025 19:46:02 +0100 Subject: [PATCH] Fix version bump + Add rp235x support --- .cargo/config.toml | 4 ++-- Cargo.toml | 7 ++++++- memory.x | 15 --------------- rust-toolchain.toml | 2 +- 4 files changed, 9 insertions(+), 19 deletions(-) delete mode 100644 memory.x diff --git a/.cargo/config.toml b/.cargo/config.toml index 283569a..f098a22 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,6 +1,6 @@ [build] # Set the default target to match the Cortex-M0+ in the RP2040 -target = "thumbv6m-none-eabi" +target = "thumbv8m.main-none-eabihf" [target.thumbv6m-none-eabi] rustflags = [ @@ -10,5 +10,5 @@ rustflags = [ "-C", "no-vectorize-loops", ] -runner = "elf2uf2-rs -d" +runner = "picotool load -u -v -x -t elf" diff --git a/Cargo.toml b/Cargo.toml index 6028d52..75b7402 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,8 +14,9 @@ categories = ["embedded", "hardware-support", "no-std"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -embassy-rp = { version = "0.2.0", features = ["unstable-pac", "time-driver", "critical-section-impl"] } +embassy-rp = { version = "0.3.0", features = ["unstable-pac", "time-driver", "critical-section-impl"] } embassy-time = { version = "0.4.0" } +cortex-m = { version = "0.7.6", features = ["inline-asm"] } cortex-m-rt = "0.7.3" pio-proc = "0.2.2" @@ -26,3 +27,7 @@ fixed-macro = "1.2" serde = { version = "1.0.203", default-features = false, features = ["derive"] } +[features] +rp235xa = ["embassy-rp/rp235xa"] +rp235xb = ["embassy-rp/rp235xb"] + diff --git a/memory.x b/memory.x deleted file mode 100644 index 070eac7..0000000 --- a/memory.x +++ /dev/null @@ -1,15 +0,0 @@ -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; \ No newline at end of file diff --git a/rust-toolchain.toml b/rust-toolchain.toml index dfac03c..54bcd69 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] components = [ "rust-src", "rustfmt", "llvm-tools" ] -targets = ["thumbv6m-none-eabi"] \ No newline at end of file +targets = ["thumbv6m-none-eabi", "thumbv8m.main-none-eabihf"] \ No newline at end of file