aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWade Fife <wade.fife@ettus.com>2024-03-06 11:32:01 -0600
committerWade Fife <wade.fife@ettus.com>2024-03-15 20:05:39 -0500
commit0ec8e95576ff9f4bb1e66684558cf0c4b687c483 (patch)
treebf71bb1d3f6230a8ae639c033a40c8d534296ab2
parentfpga: Add Vivado project option to USRP FPGA builds (diff)
downloaduhd-0ec8e95576ff9f4bb1e66684558cf0c4b687c483.tar.xz
uhd-0ec8e95576ff9f4bb1e66684558cf0c4b687c483.zip
rfnoc: image builder: Add project save option to image builder
-rw-r--r--host/python/uhd/imgbuilder/image_builder.py4
-rwxr-xr-xhost/utils/rfnoc_image_builder.py5
2 files changed, 9 insertions, 0 deletions
diff --git a/host/python/uhd/imgbuilder/image_builder.py b/host/python/uhd/imgbuilder/image_builder.py
index 3228e57c2..9a743296e 100644
--- a/host/python/uhd/imgbuilder/image_builder.py
+++ b/host/python/uhd/imgbuilder/image_builder.py
@@ -956,6 +956,7 @@ def build(fpga_path, device, image_core_path, edge_file, **args):
target: The target to build (leave empty for default).
clean_all: passed to Makefile
GUI: passed to Makefile
+ save_project: passed to Makefile
source: The source of the build (YAML or GRC file path)
include_paths: List of paths to OOT modules
extra_makefile_srcs: An additional list of paths to modules
@@ -990,6 +991,8 @@ def build(fpga_path, device, image_core_path, edge_file, **args):
make_cmd += " RFNOC_OOT_MAKEFILE_SRCS=" + "\\ ".join(makefile_src_paths)
if "GUI" in args and args["GUI"]:
make_cmd = make_cmd + " GUI=1"
+ if "save_project" in args and args["save_project"]:
+ make_cmd = make_cmd + " PROJECT=1"
if args.get('generate_only'):
logging.info("Skip build (generate only option given)")
@@ -1097,6 +1100,7 @@ def build_image(config, fpga_path, config_path, device, **args):
generate_only: Do not build the code after generation.
clean_all: passed to Makefile
GUI: passed to Makefile
+ save_project: passed to Makefile
include_paths: Paths to additional blocks
:return: Exit result of build process or 0 if generate-only is given.
"""
diff --git a/host/utils/rfnoc_image_builder.py b/host/utils/rfnoc_image_builder.py
index 6c41fe6e8..09a26aeb7 100755
--- a/host/utils/rfnoc_image_builder.py
+++ b/host/utils/rfnoc_image_builder.py
@@ -97,6 +97,10 @@ def setup_parser():
help="Open Vivado GUI during the FPGA building process",
action="store_true")
parser.add_argument(
+ "-s", "--save-project",
+ help="Save Vivado project to disk",
+ action="store_true")
+ parser.add_argument(
"-c", "--clean-all",
help="Cleans the IP before a new build",
action="store_true")
@@ -226,6 +230,7 @@ def main():
generate_only=args.generate_only,
clean_all=args.clean_all,
GUI=args.GUI,
+ save_project=args.save_project,
source=source,
source_hash=source_hash.hexdigest(),
output_path=args.image_core_output,