rp2040

RP2040 Programming without SDK
Log | Files | Refs

commit 8bef3e89b1889e621d867ec07dfe76f41a61ebcd
parent 2775db91ea25347616694020b2429fb76b9ed27a
Author: Matsuda Kenji <info@mtkn.jp>
Date:   Sat,  8 Apr 2023 11:12:25 +0900

change memmmap.ld to use VMA

Diffstat:
Mmemmap.ld | 7+++----
Mstart.s | 5+----
2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/memmap.ld b/memmap.ld @@ -1,19 +1,18 @@ MEMORY { FLASH(rx) : ORIGIN = 0x10000000, LENGTH = 2048k + SRAM(rwx) : ORIGIN = 0x20000000, LENGTH = 264k } -ENTRY(reset) - SECTIONS { .boot2 : { boot2/*(.boot2) } > FLASH - .text : { + .text 0x20000000 : AT (0x10000100) { *(.vectors) *(.text) - } > FLASH + } } diff --git a/start.s b/start.s @@ -1,18 +1,15 @@ - .section .vectors, "ax" - .global __vectors __vectors: .word 0x20040000 .word reset .thumb_func - .global reset reset: ldr r0, =0x20040000 mov sp, r0 bl main b hang -.thumb_func + .thumb_func hang: b hang