rp2040

RP2040 Programming without SDK
Log | Files | Refs

commit 6a76c5f0738626054d7b9f5e1b2fb41e0c253bea
parent ae57314d2087496956761b5a4b8e05ea14967a94
Author: Matsuda Kenji <info@mtkn.jp>
Date:   Fri,  1 Mar 2024 17:26:34 +0900

wip

Diffstat:
Mex3/main.c | 9+++------
Mex3/memmap.ld | 5+++--
2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/ex3/main.c b/ex3/main.c @@ -6,11 +6,6 @@ void set_alarm(unsigned int); int main(void) { init(); - puts(""); - for ( int i = 0; i < 10; i++ ) { - printh(*(int *)(0x20000000 + 4 * i)); - puts(""); - } return 0; } @@ -19,8 +14,10 @@ isr_svcall(void) { puts("svcall"); } +char *msg = "hello"; + void isr_alarm(void) { - puts("alarm fired"); + puts(msg); set_alarm(1000 * 1000); } diff --git a/ex3/memmap.ld b/ex3/memmap.ld @@ -13,11 +13,12 @@ SECTIONS .vectors : { *(.vectors) . += SIZEOF(.vectors); + . = ALIGN(256); + text_start = .; } > FLASH .text : { - text_start = .; *(.text) - } > SRAM AT > FLASH + } > FLASH text_size = SIZEOF(.text); }