diff --git a/fw/rtl/n64/n64_cic.sv b/fw/rtl/n64/n64_cic.sv index 498f19c..e76ff6c 100644 --- a/fw/rtl/n64/n64_cic.sv +++ b/fw/rtl/n64/n64_cic.sv @@ -103,7 +103,7 @@ module n64_cic ( end initial begin - $readmemh("../../../sw/cic/cic.mem", ram); + $readmemh("../../../sw/cic/build/cic.mem", ram); end diff --git a/sw/cic/.gitignore b/sw/cic/.gitignore index 58e68f7..796b96d 100644 --- a/sw/cic/.gitignore +++ b/sw/cic/.gitignore @@ -1,4 +1 @@ -*.bin -*.elf -*.lst -*.mem +/build diff --git a/sw/cic/build.sh b/sw/cic/build.sh index 5e370a8..6826512 100755 --- a/sw/cic/build.sh +++ b/sw/cic/build.sh @@ -20,14 +20,15 @@ CFLAGS=" \ case "$1" in all) - ${TOOLCHAIN}gcc $CFLAGS -T cic.ld -o cic.elf startup.S cic.c + mkdir -p ./build + ${TOOLCHAIN}gcc $CFLAGS -T cic.ld -o ./build/cic.elf startup.S cic.c echo "Size of cic:" - ${TOOLCHAIN}size -B -d cic.elf - ${TOOLCHAIN}objdump -S -D cic.elf > cic.lst - ${TOOLCHAIN}objcopy -O binary cic.elf cic.bin - python3 ./convert.py cic.bin cic.mem + ${TOOLCHAIN}size -B -d ./build/cic.elf + ${TOOLCHAIN}objdump -S -D ./build/cic.elf > ./build/cic.lst + ${TOOLCHAIN}objcopy -O binary ./build/cic.elf ./build/cic.bin + python3 ./convert.py ./build/cic.bin ./build/cic.mem ;; clean) - rm -f cic.elf cic.lst cic.bin cic.mem + rm -rf ./build/* ;; esac