fix: error in invoke_tool when running vivado.bat on Windows #1559
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Amaranth version
0.5.3
minimal program that demonstrates
C:\xilinx\Vivado\2024.2\bin
,C:\xilinx\Vivado\2024.2\xsct-trim\bin
run
ArtyA7_35Platform().build(Blinky(), do_build=True, do_program=True)
What you expected to happen, and what actually happened
The problem seems to be caused by vivado.bat on Windows.
Here is the result of my experiment by modifying the
build_{name}
.bat generated by platform.py.I am not familiar with batch files, but there seems to be a behavior difference between calling
vivado
and“vivado”
.In the invoked
vivado.bat
,pushd “%~dp0”
failed to move to thevivado.bat
directory and_RDI_BINROOT
became invalid and vivado did not run as expected.However, the fix to remove the double quotes did not work properly in cases where the full path to
vivado.bat
was manually specified inVIVADO
and there was a blank space, so the fix iscall %VIVADO%
.