commit 89819ff7438c15b89c7beac659605a2248f77661
parent 41e23304c01b0cb5a9357064ff5216361f91dc48
Author: Matsuda Kenji <info@mtkn.jp>
Date: Fri, 23 Feb 2024 15:04:11 +0900
worked, although still slow after reset.
Diffstat:
3 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/ex3/boot2.s b/ex3/boot2.s
@@ -11,13 +11,11 @@ setup_xip:
blx r2
blx r0
- //ldr r0, =vectors
- //ldr r1, m0plus_vtor
- //str r0, [r1, #0] // M0PLUS: VTOR
- //ldr r1, [r0, #4] // entry point
- //ldr r0, [r0, #0] // stack pointer
- ldr r1, =0x10000101
- ldr r0, =0x20040000
+ ldr r0, =vectors
+ ldr r1, m0plus_vtor
+ str r0, [r1, #0] // M0PLUS: VTOR
+ ldr r1, [r0, #4] // entry point
+ ldr r0, [r0, #0] // stack pointer
mov sp, r0
bx r1
diff --git a/ex3/main.s b/ex3/main.s
@@ -104,16 +104,14 @@ wait_vco:
sub r1, r1, #4
mov r0, #1
str r0, [r3, r1] // M0PLUS: SYST_CSR
-/*
debug:
ldr r0, ='\r'
bl putbyte
- ldr r4, =0x20000000
- ldr r0, [r4, #0]
+ ldr r4, =(0xe0000000 + 0xed08)
+ ldr r0, [r4, #0] // M0PLUS: VTOR
bl printh
ldr r0, ='\n'
bl putbyte
-*/
ldr r4, ppb_base
ldr r5, =0xe018
diff --git a/ex3/memmap.ld b/ex3/memmap.ld
@@ -12,8 +12,9 @@ SECTIONS
} > FLASH
.text : {
- *(.vectors)
*(.text)
+ . = ALIGN(256);
+ *(.vectors)
} > FLASH
}