wrote a shell but have an error will debug tomorrow

This commit is contained in:
2025-07-29 21:48:16 +03:00
parent bc9fa4eac7
commit cfffd14b4b
7 changed files with 86 additions and 22 deletions

3
run.sh
View File

@@ -9,7 +9,8 @@ OBJCOPY=/usr/bin/llvm-objcopy
CC=clang
CFLAGS="-std=c11 -O2 -g3 -Wall -Wextra --target=riscv32-unknown-elf -fno-stack-protector -ffreestanding -nostdlib"
$CC $CFLAGS -Wl,-Tuser.ld -Wl,-Map=shell.map -o shell.elf shell.c user.c common.c
# Build the shell
$CC $CFLAGS -Wl,-Tuser.ld -Wl,-Map=shell.map -o shell.elf shell.c user.c common.c
$OBJCOPY --set-section-flags .bss=alloc,contents -O binary shell.elf shell.bin
$OBJCOPY -Ibinary -Oelf32-littleriscv shell.bin shell.bin.o