Commit Graph
1 Commits
Author SHA1 Message Date
Joni Hendrickson 01d5d2814f fix(fpga): Use --project-dir for harden and configure
Right now, running `tt_fpga.py --project-dir example/<projectname>
harden` will fail if previously, `tt_fpga.py harden` was ran against a
project in the root folder. This is because the `_tt_fpga_top.v` file is
always read from `src/_tt_fpga_top.v`, even though it's generated in the
proper --project-dir location.

Similar problem affects the `configure` command, where it looks for the
bitstream in `build/<name>.bin` relative to the current dir even with
`--project-dir` set.

Commit prepends the source_dir from `--project-dir` in the appropriate
places such that it's used for both harden and configure.

Tested by observing that running the following commands in sequence now
succeeds against one of my projects:
- tt_fpga.py harden
- tt_fpga.py --project-dir examples/tt_um_vga_example_gamepad harden
- tt_fpga.py --project-dir examples/tt_um_vga_example_gamepad configure
  --upload --port /dev/ttyACM0
2026-08-20 11:42:53 +02:00