]> datadissipation.net git - wsl-litex-quartus.git/commitdiff
fix crash caused by --win32-quartus being unset master
authorgit <redacted>
Sun, 12 Apr 2026 13:31:02 +0000 (09:31 -0400)
committergit <redacted>
Sun, 12 Apr 2026 13:31:02 +0000 (09:31 -0400)
wsl-litex-quartus.diff

index 8ae3e4d32c7b1164de880a99ee55b70472d10909..3124af9aa54acd50b9ce3af3ccb1809b6411d387 100644 (file)
@@ -1,5 +1,5 @@
 diff --git a/litex/build/altera/programmer.py b/litex/build/altera/programmer.py
-index c797c564f..e25af5565 100644
+index c797c564f..9056cbef9 100644
 --- a/litex/build/altera/programmer.py
 +++ b/litex/build/altera/programmer.py
 @@ -4,20 +4,49 @@
@@ -53,11 +53,11 @@ index c797c564f..e25af5565 100644
              "-m", "jtag",
 -             "-c", "{}{}".format(self.cable_name, cable_suffix),
 -             "-o", "p;{}@{}".format(bitstream_file, self.device_id)
-+             "-c", f"{self.cable_name}{cable_suffix}"
-+             "-o", f"p;{bitstream_file}@{self.device_id}"
++             "-c", f"{self.cable_name}{cable_suffix}",
++             "-o", f"P;{bitstream_file}@{self.device_id}",
          ])
 diff --git a/litex/build/altera/quartus.py b/litex/build/altera/quartus.py
-index 786e89f3c..38b1b3932 100644
+index 786e89f3c..c14be3bdd 100644
 --- a/litex/build/altera/quartus.py
 +++ b/litex/build/altera/quartus.py
 @@ -18,6 +18,7 @@ from migen.fhdl.simplify import FullMemoryWE
@@ -176,7 +176,7 @@ index 786e89f3c..38b1b3932 100644
          tools.write_to_file(script_file, script_contents, force_unix=True)
  
          return script_file
-@@ -251,21 +265,45 @@ fi
+@@ -251,21 +265,47 @@ fi
          else:
              shell = ["bash"]
  
@@ -209,13 +209,15 @@ index 786e89f3c..38b1b3932 100644
 -    return {
 -        "synth_tool" : args.synth_tool,
 -        "conv_tool"  : args.conv_tool,
++    quartus_path = ""
++    wsl_path     = ""
 +    if args.win32_quartus:
 +            if args.win32_quartus_path:
 +                quartus_path = args.win32_quartus_path
 +            else:
 +                quartus_path = os.getenv("LITEX_WIN32_QUARTUS_PATH", "/mnt/c/altera_lite/25.1std/quartus/bin64")
-+
 +            quartus_path += "/" # Double slash is OK
++            wsl_path = f"//wsl.localhost/{os.getenv("WSL_DISTRO_NAME", "")}"
 +    
 +    args_dict = {
 +        "synth_tool"         : args.synth_tool,
@@ -223,7 +225,7 @@ index 786e89f3c..38b1b3932 100644
 +        "win32_quartus"      : args.win32_quartus,
 +        "win32_quartus_path" : args.win32_quartus_path,
 +        "quartus_path"       : quartus_path,
-+        "wsl_path"           : f"//wsl.localhost/{os.getenv("WSL_DISTRO_NAME", "")}",
++        "wsl_path"           : wsl_path,
      }
 +    
 +    programmer.set_toolchain_args(args_dict)