This program builds and/or loads MiSoC components.
One or several actions can be specified:
+clean delete previous build(s).
build-bitstream build FPGA bitstream. Implies build-bios on targets with
integrated BIOS.
build-headers build software header files with CSR/IRQ/SDRAM_PHY definitions.
flash-bitstream load bitstream into non-volatile storage.
flash-bios load BIOS into non-volatile storage.
-all build-bitstream, build-bios, flash-bitstream, flash-bios.
+all clean, build-bitstream, build-bios, flash-bitstream, flash-bios.
Load/flash actions use the existing outputs, and do not trigger new builds.
""")
soc.finalize()
# decode actions
- action_list = ["build-bitstream", "build-headers", "build-csr-csv", "build-bios",
+ action_list = ["clean", "build-bitstream", "build-headers", "build-csr-csv", "build-bios",
"load-bitstream", "flash-bitstream", "flash-bios", "all"]
actions = {k: False for k in action_list}
for action in args.action:
# dependencies
if actions["all"]:
+ actions["clean"] = True
actions["build-bitstream"] = True
actions["build-bios"] = True
actions["flash-bitstream"] = True
if actions["build-bios"]:
actions["build-headers"] = True
+ if actions["clean"]:
+ subprocess.call(["rm", "-rf", "build/*"])
+
if actions["build-headers"]:
boilerplate = """/*
* Platform: {}