commit b531ac7c4ac8d9a9df07600520ef130a3284ace4
parent 11f4585e9d308df56d2b5cda71f2aaeb8d8bf0e8
Author: Matsuda Kenji <info@mtkn.jp>
Date: Thu, 28 Aug 2025 09:44:56 +0900
use c
Diffstat:
3 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/ex4_shell/Makefile b/ex4_shell/Makefile
@@ -2,12 +2,13 @@ CC = arm-none-eabi-gcc
AS = arm-none-eabi-as
LD = arm-none-eabi-ld
OBJCOPY = arm-none-eabi-objcopy
+OBJDUMP = arm-none-eabi-objdump -Mforce-thumb
BINCRC = ../tools/bincrc
BIN2UF2 = ../tools/bin2uf2
MCPU = -mcpu=cortex-m0plus
ASFLAGS = $(MCPU)
-CFLAGS = $(MCPU) -ffreestanding -nostartfiles -O0 -fpic -mthumb -c
+CFLAGS = $(MCPU) -ffreestanding -nostartfiles -O0 -fpic -mthumb -c -Wall -Wextra
LDFLAGS = --no-relax -nostdlib
OBJS = boot2.o start.o main.o
@@ -41,3 +42,6 @@ flash: all
tools:
cd ../tools && make
+
+dump: a.elf
+ $(OBJDUMP) -D a.elf
diff --git a/ex4_shell/main.c b/ex4_shell/main.c
@@ -1,10 +1,10 @@
-enum reset_num {
+typedef enum reset_bit {
RESET_IOBANK0 = 1 << 5,
RESET_PLL_SYS = 1 << 12,
RESET_UART0 = 1 << 22,
-};
+} reset_bit;
-void unreset(enum reset_num);
+void unreset(reset_bit);
void mains(void);
void
diff --git a/ex4_shell/start.s b/ex4_shell/start.s
@@ -58,7 +58,7 @@ loop:
wfe
b loop
- // void unreset(enum reset_num subsystems);
+ // void unreset(reset_bit subsystems);
// unreset unresets subsystems.
// subsystems is bitwise or.
.global unreset