rp2040

RP2040 Programming without SDK
Log | Files | Refs

commit d87427e253fed2f078fe90e9105b4a4783c5981d
parent da33981896d672ce74d31c0c776ceffbc1ff9e6a
Author: Matsuda Kenji <info@mtkn.jp>
Date:   Wed, 28 Feb 2024 14:34:45 +0900

move isr_svcall to c file

Diffstat:
Mex3/main.c | 3++-
Mex3/start.s | 24+-----------------------
2 files changed, 3 insertions(+), 24 deletions(-)

diff --git a/ex3/main.c b/ex3/main.c @@ -7,5 +7,6 @@ main(void) { } void -isr_alarm(void) { +isr_svcall(void) { + puts("svcall\n"); } diff --git a/ex3/start.s b/ex3/start.s @@ -129,33 +129,11 @@ loop: ldr r0, =message bl puts wfi + svc #0 b loop // functions -isr_svcall: - push {r4, lr} - mov r4, lr - mov r0, #'s' - bl putbyte - mov r0, #'v' - bl putbyte - mov r0, #'c' - bl putbyte - mov r0, #'a' - bl putbyte - mov r0, #'l' - bl putbyte - mov r0, #'l' - bl putbyte - mov r0, r4 - bl printh - mov r0, #'\r' - bl putbyte - mov r0, #'\n' - bl putbyte - pop {r4, pc} - isr_systick: push {lr} mov r0, #'\r'