rp2040

RP2040 Programming without SDK
Log | Files | Refs

commit b5299ae51ab72bb44bfab55faff2b1916880898a
parent 6e8afae69eb00f0b428fca5b9f5ee1afc54ecb74
Author: Matsuda Kenji <info@mtkn.jp>
Date:   Thu,  7 Mar 2024 09:44:35 +0900

add rodata section and modify boot.s

Diffstat:
Mex3/boot2.s | 2+-
Mex3/main.c | 8++++++--
Mex3/memmap.ld | 5++++-
3 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/ex3/boot2.s b/ex3/boot2.s @@ -18,7 +18,7 @@ boot2: ldr r3, sram_base copy: cmp r1, r2 - beq end + blt end ldr r4, [r0, r2] str r4, [r3, r2] add r2, #4 diff --git a/ex3/main.c b/ex3/main.c @@ -10,13 +10,17 @@ main(void) { } void +scheduler(void) { + puts("scheduler calledabc"); +} + +void isr_svcall(void) { puts("svcall"); } void isr_alarm(void) { - char *msg = "hello"; - puts(msg); + scheduler(); set_alarm(1000 * 1000); } diff --git a/ex3/memmap.ld b/ex3/memmap.ld @@ -17,7 +17,10 @@ SECTIONS .data : { *(.data) } > SRAM AT > FLASH + .rodata : { + *(.rodata) + } > SRAM AT > FLASH prog_start = LOADADDR(.text); - prog_size = SIZEOF(.text) + SIZEOF(.data); + prog_size = SIZEOF(.text) + SIZEOF(.data) + SIZEOF(.rodata); }