This commit is contained in:
William Henderson
2025-07-23 11:59:43 +01:00
parent 463fb482b3
commit 001014099f
13 changed files with 26 additions and 4 deletions
+5 -2
View File
@@ -13,6 +13,8 @@ class RP2040UploaderApp:
self.folder_path = os.path.join(os.getcwd(), "Resources/RP2040")
self.config_path = os.path.join(self.folder_path, "config.json")
self.mpremote_path = os.path.join(os.getcwd(), "Resources", "mpremote.exe")
self.label = tk.Label(master, text="Searching for RP2040...")
self.label.pack(pady=10)
@@ -93,10 +95,11 @@ class RP2040UploaderApp:
self.label.config(text=f"Uploading {filename}...")
self.master.update()
result = subprocess.run(
["mpremote", "connect", self.port, "fs", "cp", full_path, f":{filename}"],
[self.mpremote_path, "connect", self.port, "fs", "cp", full_path, f":{filename}"],
capture_output=True,
text=True
)
if result.returncode != 0:
success = False
messagebox.showerror("Upload Failed", f"Failed to upload {filename}:\n{result.stderr}")
@@ -111,7 +114,7 @@ class RP2040UploaderApp:
if __name__ == "__main__":
root = tk.Tk()
app = RP2040UploaderApp(root)
root.title("RP2040 Flasher V1.0.0")
root.title("RP2040 Loader V1.0.1")
root.iconbitmap(r'Resources/icon1.ico')