rp2040

RP2040 Programming without SDK
Log | Files | Refs

commit 29c72bf617e7dfc6f2edf5c0cdec860119296ff4
parent 3aec87288c7bdb8b9e8fdf55f2410ed0a5629818
Author: Matsuda Kenji <info@mtkn.jp>
Date:   Tue, 11 Apr 2023 08:44:46 +0900

change section name

Diffstat:
Mmach.s | 12++++++++----
Mmemmap.ld | 1+
2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/mach.s b/mach.s @@ -4,12 +4,14 @@ .section .vectors, "ax" vectors: .word 0x20040000 // initial SP - .word reset // entry point + .word reset // entry point - .section .text, "ax" + .section .sram_cpy + .global reset .thumb_func reset: ldr r0, init_sp + ldr r0, [r0, #0] // initial SP mov sp, r0 ldr r2, xip_copy_base @@ -24,22 +26,24 @@ sram_cpy: add r3, r3, #0x4 sub r0, r0, #0x4 bne sram_cpy + bl main hang: b hang .align 2 +init_sp: + .word 0x20000000 xip_copy_base: .word 0x10000200 sram_copy_base: .word 0x20000100 -init_sp: - .word 0x20040000 etext: .word _etext .ltorg + .section .text, "ax" .global init .thumb_func init: diff --git a/memmap.ld b/memmap.ld @@ -12,6 +12,7 @@ SECTIONS .text 0x20000000 : AT (0x10000100) { *(.vectors) + *(.sram_cpy) *(.text) _etext = .; }