commit ae57314d2087496956761b5a4b8e05ea14967a94
parent a3157fd6220eb81509b1007815db8602b3297566
Author: Matsuda Kenji <info@mtkn.jp>
Date:   Fri,  1 Mar 2024 13:02:06 +0900
toriaezu ugoita
Diffstat:
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/ex3/main.c b/ex3/main.c
@@ -6,8 +6,9 @@ void set_alarm(unsigned int);
 int
 main(void) {
 	init();
+	puts("");
 	for ( int i = 0; i < 10; i++ ) {
-		printh(*(unsigned int *)(0x20000000 + 4 * i));
+		printh(*(int *)(0x20000000 + 4 * i));
 		puts("");
 	}
 	return 0;
diff --git a/ex3/memmap.ld b/ex3/memmap.ld
@@ -12,11 +12,12 @@ SECTIONS
 	} > FLASH
 	.vectors : {
 		*(.vectors)
+		. += SIZEOF(.vectors);
 	} > FLASH
-	text_start = .;
 	.text : {
+		text_start = .;
 		*(.text)
-	} > FLASH
+	} > SRAM AT > FLASH
 	text_size = SIZEOF(.text);
 }
 
diff --git a/ex3/start.s b/ex3/start.s
@@ -23,7 +23,6 @@ vectors:
 	.word reset+1  // 15 systick
 	.word isr_alarm+1  // 16 alarm_0
 
-	.align 2
 	.section .text
 reset:
 	bl main