vivado: resolve install path from ~/skills_env.md instead of hardcoding D:\Xilinx
The Vivado install root differs per machine (C:\Xilinx here, D:\Xilinx on the box these skills were written on), so every hardcoded path was already wrong on this machine. - new fpga_flash/scripts/vivado_env.py: resolves --vivado-dir > env var > VIVADO_ROOT (falling back to VIVADO_PATH) from ~/skills_env.md - gen_mcs / program_flash / check_flash_csv: --vivado-dir now optional - fpga_update/gen_update_mcs.py: same precedence for --vivado - fpga_flash / smod_atsc_dev / vivado-prj-create SKILL.md: document the lookup instead of naming a drive letter - skills_env template: VIVADO_ROOT/VIVADO_PATH are now blanks to fill in, so a new machine can't inherit a wrong default Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
fbfa060b67
commit
88f96fa5fa
@@ -7,7 +7,6 @@ via -tclargs so no temporary script files are created.
|
||||
|
||||
Usage:
|
||||
python program_flash.py \
|
||||
--vivado-dir "D:/Xilinx/Vivado/2018.1" \
|
||||
--flash-part "w25q128bv-spi-x1_x2_x4" \
|
||||
--bit-file "E:/project/impl_1/RU_golden_top.bit" \
|
||||
--mcs-file "E:/project/impl_1/RU_golden_smod.mcs" \
|
||||
@@ -29,6 +28,8 @@ import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
from vivado_env import resolve_vivado_dir
|
||||
|
||||
|
||||
def norm(path: str) -> str:
|
||||
"""Normalize path to forward slashes (Vivado on Windows accepts both)."""
|
||||
@@ -41,8 +42,8 @@ def main():
|
||||
)
|
||||
parser.add_argument(
|
||||
"--vivado-dir",
|
||||
required=True,
|
||||
help="Vivado install root, e.g. D:/Xilinx/Vivado/2018.1",
|
||||
default=None,
|
||||
help="Vivado install root; defaults to VIVADO_ROOT from ~/skills_env.md",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--flash-part",
|
||||
@@ -66,7 +67,7 @@ def main():
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
vivado_dir = norm(args.vivado_dir)
|
||||
vivado_dir = norm(resolve_vivado_dir(args.vivado_dir))
|
||||
bit_file = norm(args.bit_file)
|
||||
mcs_file = norm(args.mcs_file)
|
||||
ltx_file = norm(args.ltx_file) if args.ltx_file else ""
|
||||
|
||||
Reference in New Issue
Block a user