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 @@
"-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
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"]
- 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,
+ "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)