[hardware] Clean the Verilator build folder when rebuilding
Verilator might fail if built in a dirty directory
@@ -169,7 +169,7 @@ VERILATOR_FLAGS += $(VERILATOR_WAIVE)
# VERILATOR_FLAGS += --debug
$(VERILATOR_MK): $(VERILATOR_CONF) $(VERILATOR_WAIVE) $(MEMPOOL_DIR)/Bender.yml $(shell find {src,tb,deps} -type f) $(bender) $(config_mk) Makefile
- mkdir -p $(verilator_build)
+ rm -rf $(verilator_build); mkdir -p $(verilator_build)
# Overwrite Bootaddress to L2 base while we don't have a DPI to write a wake-up
$(eval boot_addr=$(l2_base))
# Create Bender script of all RTL files
