Flashing sort of working
This commit is contained in:
parent
40a618dcaa
commit
ac210156f0
11
Cargo.toml
11
Cargo.toml
@ -6,7 +6,7 @@ name = "rp-test"
|
||||
version = "0.1.0"
|
||||
|
||||
[dependencies]
|
||||
cortex-m = "0.6.0"
|
||||
cortex-m = { version = "0.7.0", features = ["inline-asm"] }
|
||||
cortex-m-rt = "0.6.10"
|
||||
cortex-m-semihosting = "0.3.3"
|
||||
|
||||
@ -14,7 +14,14 @@ defmt = "0.1.3"
|
||||
defmt-rtt = "0.1.0"
|
||||
panic-probe = "0.1.0"
|
||||
|
||||
rp2040-pac = { path = "../rp2040-pac" }
|
||||
rp2040-pac = { git = "https://github.com/rp-rs/rp2040-pac", branch="main" }
|
||||
rp2040-boot2 = { git = "https://github.com/rp-rs/rp2040-boot2-rs" }
|
||||
#rp2040-pac = { path = "../rp2040-pac" }
|
||||
#rp2040-boot2 = { path = "../rp2040-boot2-rs" }
|
||||
|
||||
[patch.crates-io]
|
||||
cortex-m = { git = "https://github.com/rust-embedded/cortex-m" }
|
||||
|
||||
[features]
|
||||
default = [
|
||||
"defmt-default",
|
||||
|
||||
17
memory.x
17
memory.x
@ -1,6 +1,13 @@
|
||||
MEMORY
|
||||
{
|
||||
/* We set "flash" to half the RAM */
|
||||
FLASH : ORIGIN = 0x20000000, LENGTH = 128K
|
||||
RAM : ORIGIN = 0x20020000, LENGTH = 128K
|
||||
MEMORY {
|
||||
BOOT_LOADER : ORIGIN = 0x10000000, LENGTH = 0x100
|
||||
FLASH : ORIGIN = 0x10000100, LENGTH = 2048K - 0x100
|
||||
RAM : ORIGIN = 0x20000000, LENGTH = 256K
|
||||
}
|
||||
|
||||
SECTIONS {
|
||||
/* ### Boot loader */
|
||||
.boot_loader ORIGIN(BOOT_LOADER) :
|
||||
{
|
||||
KEEP(*(.boot_loader));
|
||||
} > BOOT_LOADER
|
||||
} INSERT BEFORE .text;
|
||||
@ -6,6 +6,10 @@ use cortex_m_rt::entry;
|
||||
use defmt::*;
|
||||
use defmt_rtt as _; // global logger
|
||||
use panic_probe as _;
|
||||
|
||||
// this adds boot2 to the .boot_loader section
|
||||
// linker script then places that at start of flash.
|
||||
use rp2040_boot2 as _;
|
||||
use rp2040_pac as pac;
|
||||
|
||||
#[defmt::timestamp]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user