Simplify memory.x by adding link-rp.x to cargo rustflags. Closes #1.

This commit is contained in:
SupImDos 2022-09-30 20:13:02 +08:00
parent ced9529639
commit 650e5530b7
2 changed files with 2 additions and 11 deletions

View file

@ -6,6 +6,7 @@ runner = "probe-run --chip RP2040" # "elf2uf2-rs -d"
rustflags = [
"-C", "link-arg=--nmagic",
"-C", "link-arg=-Tlink.x",
"-C", "link-arg=-Tlink-rp.x",
"-C", "link-arg=-Tdefmt.x",
"-C", "linker=flip-link",
"-C", "inline-threshold=5",

View file

@ -2,14 +2,4 @@ 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;
}