Build system: Added help text and target mrproper which also deletes downloaded source code

This commit is contained in:
(Tim) Efthimis Kritikos 2023-12-08 22:10:11 +00:00
parent 8544764612
commit 94bc6eba39
4 changed files with 37 additions and 0 deletions

View File

@ -49,8 +49,37 @@ clean:
${Q}make ${MAKEOPTS} PRINT_PATH_PREFIX=system/ -C system clean ${Q}make ${MAKEOPTS} PRINT_PATH_PREFIX=system/ -C system clean
${Q}make ${MAKEOPTS} PRINT_PATH_PREFIX=boot_code/ -C boot_code clean ${Q}make ${MAKEOPTS} PRINT_PATH_PREFIX=boot_code/ -C boot_code clean
.PHONY: mrproper
mrproper: clean
${Q}make ${MAKEOPTS} PRINT_PATH_PREFIX=system/ -C system mrproper
${Q}make ${MAKEOPTS} PRINT_PATH_PREFIX=boot_code/ -C boot_code mrproper
.PHONY: upload
upload: boot_code/bios.stxt upload: boot_code/bios.stxt
${Q}make ${MAKEOPTS} PRINT_PATH_PREFIX=system/ -C system upload ${Q}make ${MAKEOPTS} PRINT_PATH_PREFIX=system/ -C system upload
.PHONY: fpga_sim
fpga_sim: boot_code/bios.stxt fpga_sim: boot_code/bios.stxt
${Q}make ${MAKEOPTS} PRINT_PATH_PREFIX=system/ -C system fpga_sim ${Q}make ${MAKEOPTS} PRINT_PATH_PREFIX=system/ -C system fpga_sim
.PHONY: fpga
help:
@echo 'Simulation targets:'
@echo ' - No target will start a simulation with the default'
@echo ' program loaded to memory'
@echo ' boot_code/[name].run - Start a simulation and load memory with the'
@echo ' assembled code from boot_code/[name].asm'
@echo ' boot_code/[name].wave - like the above but write trace file and start'
@echo ' gtkwave with it'
@echo ' boot_code/[name].disas - assemble and show the disassembly of the binary'
@echo ''
@echo 'Synthesis targets:'
@echo ' upload - Build a bitstream for the board selected in'
@echo ' common.mk and upload it if possible'
@echo ' fpga_sim - Simulate the SoC that gets build for the configured'
@echo ' fpga board'
@echo ''
@echo 'Cleaning targets:'
@echo ' clean - Delete all non-source files generated by the build'
@echo ' system'
@echo ' mrproper - clean + delete downloaded external source IP files'

View File

@ -46,3 +46,5 @@ include ../common.mk
clean: clean:
$(call QUIET_CLEAN,boot_code) $(call QUIET_CLEAN,boot_code)
${Q}rm -f $(BUILD_FILES) *.bf.asm ${Q}rm -f $(BUILD_FILES) *.bf.asm
mrproper:

View File

@ -51,6 +51,7 @@ ifeq "${QUIET}" "1"
QUIET_DOWNLOAD = @echo ' DOWNLOAD '${PRINT_PATH_PREFIX}$@; QUIET_DOWNLOAD = @echo ' DOWNLOAD '${PRINT_PATH_PREFIX}$@;
QUIET_CLEAN = @echo ' CLEAN '${PRINT_PATH_PREFIX}; QUIET_CLEAN = @echo ' CLEAN '${PRINT_PATH_PREFIX};
QUIET_MRPROPER = @echo ' MRPROPER '${PRINT_PATH_PREFIX};
QUIET_VERILATOR_RUN = @printf ' %s %s\n' $1 $2; QUIET_VERILATOR_RUN = @printf ' %s %s\n' $1 $2;
Q = @ Q = @
MAKEOPTS=--no-print-directory MAKEOPTS=--no-print-directory

View File

@ -165,3 +165,8 @@ dfu_upload:${BUILD_FILES_PREFIX}bitstream_${BUILD_NAME}.dfu
clean: clean:
$(call QUIET_CLEAN,system) $(call QUIET_CLEAN,system)
${Q}rm -rf ${SYSTEM_VVP} *.fst boot_code.txt boot_code.bin *memdump *memdumptxt obj_dir simplified_ucode.txt abc.history build ${Q}rm -rf ${SYSTEM_VVP} *.fst boot_code.txt boot_code.bin *memdump *memdumptxt obj_dir simplified_ucode.txt abc.history build
.PHONY: mrproper
mrproper:
$(call QUIET_MRPROPER,system)
${Q}rm -f external_ip/litedram_core_ecp5_phy.v external_ip/litedram_core_ecp5_phy_sim.v