reduce debug in sim and add PREFIX to makefile

This commit is contained in:
Yehowshua Immanuel 2025-03-07 22:04:40 -05:00
parent 63a73d3f71
commit 171fcece98
2 changed files with 5 additions and 5 deletions

View file

@ -46,7 +46,6 @@ simulationLoop n machine = do
fetchResult <- fetchInstruction machinePeripherals currPc
let decodeResult = decode fetchResult
putStrLn |> show decodeResult P.++ debugInsn fetchResult
putStrLn $ "PC: " P.++ show currPc
let pc' = currPc + 4
cpu' = (cpu machine) { pc = pc' }
machine' = machine { cpu = cpu' }

View file

@ -1,8 +1,9 @@
# RISC-V toolchain
CC = riscv64-unknown-elf-gcc
AS = riscv64-unknown-elf-as
LD = riscv64-unknown-elf-ld
OBJCOPY = riscv64-unknown-elf-objcopy
PREFIX = riscv64-unknown-elf
CC = $(PREFIX)-gcc
AS = $(PREFIX)-as
LD = $(PREFIX)-ld
OBJCOPY = $(PREFIX)-objcopy
QEMU = qemu-system-riscv64
# Compilation flags