reduce debug in sim and add PREFIX to makefile
This commit is contained in:
parent
63a73d3f71
commit
171fcece98
|
@ -46,7 +46,6 @@ simulationLoop n machine = do
|
||||||
fetchResult <- fetchInstruction machinePeripherals currPc
|
fetchResult <- fetchInstruction machinePeripherals currPc
|
||||||
let decodeResult = decode fetchResult
|
let decodeResult = decode fetchResult
|
||||||
putStrLn |> show decodeResult P.++ debugInsn fetchResult
|
putStrLn |> show decodeResult P.++ debugInsn fetchResult
|
||||||
putStrLn $ "PC: " P.++ show currPc
|
|
||||||
let pc' = currPc + 4
|
let pc' = currPc + 4
|
||||||
cpu' = (cpu machine) { pc = pc' }
|
cpu' = (cpu machine) { pc = pc' }
|
||||||
machine' = machine { cpu = cpu' }
|
machine' = machine { cpu = cpu' }
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
# RISC-V toolchain
|
# RISC-V toolchain
|
||||||
CC = riscv64-unknown-elf-gcc
|
PREFIX = riscv64-unknown-elf
|
||||||
AS = riscv64-unknown-elf-as
|
CC = $(PREFIX)-gcc
|
||||||
LD = riscv64-unknown-elf-ld
|
AS = $(PREFIX)-as
|
||||||
OBJCOPY = riscv64-unknown-elf-objcopy
|
LD = $(PREFIX)-ld
|
||||||
|
OBJCOPY = $(PREFIX)-objcopy
|
||||||
QEMU = qemu-system-riscv64
|
QEMU = qemu-system-riscv64
|
||||||
|
|
||||||
# Compilation flags
|
# Compilation flags
|
||||||
|
|
Loading…
Reference in a new issue