rp2040

RP2040 Programming without SDK
Log | Files | Refs

commit 341b64f1ff8b26c48d8b3d547ddf319c5d140a39
parent 9de2a0a6db76aa2ddcd58091928a549007d9148f
Author: Matsuda Kenji <info@mtkn.jp>
Date:   Sat,  2 Mar 2024 08:19:19 +0900

need to copy rodata section, need to understand linker script

Diffstat:
Mex3/main.c | 3++-
Mex3/memmap.ld | 5+++++
2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/ex3/main.c b/ex3/main.c @@ -16,6 +16,7 @@ isr_svcall(void) { void isr_alarm(void) { - printh(0xdeadbeef); + char *msg = "hello"; + puts(msg); set_alarm(1000 * 1000); } diff --git a/ex3/memmap.ld b/ex3/memmap.ld @@ -20,5 +20,10 @@ SECTIONS *(.text) } > SRAM AT > FLASH text_size = SIZEOF(.text); + .rodata : { + *(.rodata) + } > SRAM AT > FLASH + text_size += SIZEOF(.rodata); + text_size = 0x300; }