From aca52925b729c08ea604ef7c58c1e0220b73195b Mon Sep 17 00:00:00 2001 From: Corey Thompson Date: Sat, 3 Jan 2026 09:39:04 -0600 Subject: [PATCH 1/5] Fix: Include Flash Firmware.bat and flash_firmware.ps1 in release package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The build_release.sh script was not copying the new flash tool files to the release directory. This caused v1.0.5 releases to be missing the Quick Flash Tool files even though they were in the git repository. Now build_release.sh properly copies: - Flash Firmware.bat (Windows launcher) - flash_firmware.ps1 (PowerShell flash script) To the root of the release package, making them immediately available when users extract the release ZIP. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Haiku 4.5 --- build_release.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build_release.sh b/build_release.sh index 547c7e5..7aec5cd 100644 --- a/build_release.sh +++ b/build_release.sh @@ -70,6 +70,12 @@ mkdir -p "$OUTPUT_DIR/firmware/tools" mkdir -p "$OUTPUT_DIR/tools" mkdir -p "$OUTPUT_DIR/source" +# Copy flash tools +echo "Copying flash tools..." +cp "$SCRIPT_DIR/Flash Firmware.bat" "$OUTPUT_DIR/" +cp "$SCRIPT_DIR/flash_firmware.ps1" "$OUTPUT_DIR/" +chmod +x "$OUTPUT_DIR/flash_firmware.ps1" + # Copy upload tools for compiling from source echo "Copying upload tools..." cp "$SCRIPT_DIR/upload_firmware.sh" "$OUTPUT_DIR/tools/" From 0161142ed64234fb19b98877adc3718e43b65400 Mon Sep 17 00:00:00 2001 From: Corey Thompson Date: Sat, 3 Jan 2026 10:46:11 -0600 Subject: [PATCH 2/5] Fix: Correct Windows batch file syntax for else-if condition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The batch file was using 'else if' which is not valid Windows batch syntax. Changed to nested 'else ( if ... )' structure which is the correct syntax. This fixes the 'or was unexpected at this time' error when running Flash Firmware.bat on Windows. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Haiku 4.5 --- Flash Firmware.bat | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/Flash Firmware.bat b/Flash Firmware.bat index 5ae3ab6..f785bbf 100644 --- a/Flash Firmware.bat +++ b/Flash Firmware.bat @@ -21,23 +21,25 @@ if exist "%~dp0flash_firmware.ps1" ( echo Launching flash tool... echo. PowerShell -ExecutionPolicy Bypass -File "%~dp0flash_firmware.ps1" -) else if exist "%~dp0tools\flash_firmware.ps1" ( - echo Launching flash tool... - echo. - PowerShell -ExecutionPolicy Bypass -File "%~dp0tools\flash_firmware.ps1" ) else ( - echo. - echo ERROR: flash_firmware.ps1 not found! - echo. - echo Make sure you extracted the entire release ZIP file with - echo all directories and files intact. - echo. - echo The flash script should be at: - echo - flash_firmware.ps1 (in release root), or - echo - tools\flash_firmware.ps1 (in release tools folder) - echo. - pause - exit /b 1 + if exist "%~dp0tools\flash_firmware.ps1" ( + echo Launching flash tool... + echo. + PowerShell -ExecutionPolicy Bypass -File "%~dp0tools\flash_firmware.ps1" + ) else ( + echo. + echo ERROR: flash_firmware.ps1 not found! + echo. + echo Make sure you extracted the entire release ZIP file with + echo all directories and files intact. + echo. + echo The flash script should be at: + echo - flash_firmware.ps1 (in release root), or + echo - tools\flash_firmware.ps1 (in release tools folder) + echo. + pause + exit /b 1 + ) ) if %ERRORLEVEL% NEQ 0 ( From b0636750fe9bee847f878629154d47bc9a5c09ef Mon Sep 17 00:00:00 2001 From: Corey Thompson Date: Sun, 4 Jan 2026 08:10:55 -0600 Subject: [PATCH 3/5] Add debug output to Flash Firmware.bat to troubleshoot launch issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Haiku 4.5 --- Flash Firmware.bat | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Flash Firmware.bat b/Flash Firmware.bat index f785bbf..a2a48e2 100644 --- a/Flash Firmware.bat +++ b/Flash Firmware.bat @@ -16,6 +16,9 @@ echo. REM Change to the script directory cd /d "%~dp0" +echo Debug: Script directory is "%~dp0" +echo. + REM Check for flash script if exist "%~dp0flash_firmware.ps1" ( echo Launching flash tool... @@ -23,7 +26,7 @@ if exist "%~dp0flash_firmware.ps1" ( PowerShell -ExecutionPolicy Bypass -File "%~dp0flash_firmware.ps1" ) else ( if exist "%~dp0tools\flash_firmware.ps1" ( - echo Launching flash tool... + echo Launching flash tool from tools... echo. PowerShell -ExecutionPolicy Bypass -File "%~dp0tools\flash_firmware.ps1" ) else ( @@ -37,6 +40,11 @@ if exist "%~dp0flash_firmware.ps1" ( echo - flash_firmware.ps1 (in release root), or echo - tools\flash_firmware.ps1 (in release tools folder) echo. + echo Debugging info: + echo Script batch file is at: "%~dp0Flash Firmware.bat" + echo Looking for PS1 at: "%~dp0flash_firmware.ps1" + echo Or at: "%~dp0tools\flash_firmware.ps1" + echo. pause exit /b 1 ) From f4ea591569631777dd4dea985b4f3cfe0668fcf1 Mon Sep 17 00:00:00 2001 From: Corey Thompson Date: Sun, 4 Jan 2026 08:34:29 -0600 Subject: [PATCH 4/5] remove spaces from script name --- Flash Firmware.bat => FlashFirmware.bat | 2 +- UPLOAD_GUIDE.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) rename Flash Firmware.bat => FlashFirmware.bat (96%) diff --git a/Flash Firmware.bat b/FlashFirmware.bat similarity index 96% rename from Flash Firmware.bat rename to FlashFirmware.bat index a2a48e2..6558ffd 100644 --- a/Flash Firmware.bat +++ b/FlashFirmware.bat @@ -41,7 +41,7 @@ if exist "%~dp0flash_firmware.ps1" ( echo - tools\flash_firmware.ps1 (in release tools folder) echo. echo Debugging info: - echo Script batch file is at: "%~dp0Flash Firmware.bat" + echo Script batch file is at: "%~dp0FlashFirmware.bat" echo Looking for PS1 at: "%~dp0flash_firmware.ps1" echo Or at: "%~dp0tools\flash_firmware.ps1" echo. diff --git a/UPLOAD_GUIDE.md b/UPLOAD_GUIDE.md index 5a8c541..b1f1774 100644 --- a/UPLOAD_GUIDE.md +++ b/UPLOAD_GUIDE.md @@ -38,7 +38,7 @@ Pre-compiled firmware is ready to flash instantly - no compilation needed! 1. **Download the SledLink folder** to your computer from GitHub 2. **Extract the ZIP file** to a convenient location 3. **Connect your controller** via USB cable to your computer -4. **Double-click** `Flash Firmware.bat` in the main folder +4. **Double-click** `FlashFirmware.bat` in the main folder 5. **Select your controller type:** - Type `1` if flashing a SLED Controller (with encoder) - Type `2` if flashing a JUDGE Controller (display only) @@ -118,11 +118,11 @@ If you need to modify the firmware or want the full Arduino development environm ### Flash Method Issues -#### "Flash Firmware.bat won't run" or Windows Defender blocks it +#### "FlashFirmware.bat won't run" or Windows Defender blocks it - **Windows Defender SmartScreen:** Click **"More info"** then **"Run anyway"** - **Right-click** the `.bat` file and select **"Run as administrator"** -- **Temporary solution:** Run from Command Prompt: `Flash Firmware.bat` +- **Temporary solution:** Run from Command Prompt: `FlashFirmware.bat` #### "esptool.exe not found" From 01d7d8fe9af1635adcfc5e81262e6d74ccc7aaa5 Mon Sep 17 00:00:00 2001 From: Corey Thompson Date: Sun, 4 Jan 2026 08:44:37 -0600 Subject: [PATCH 5/5] remove else/if logic --- FlashFirmware.bat | 52 +++++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/FlashFirmware.bat b/FlashFirmware.bat index 6558ffd..d11d3e6 100644 --- a/FlashFirmware.bat +++ b/FlashFirmware.bat @@ -24,32 +24,36 @@ if exist "%~dp0flash_firmware.ps1" ( echo Launching flash tool... echo. PowerShell -ExecutionPolicy Bypass -File "%~dp0flash_firmware.ps1" -) else ( - if exist "%~dp0tools\flash_firmware.ps1" ( - echo Launching flash tool from tools... - echo. - PowerShell -ExecutionPolicy Bypass -File "%~dp0tools\flash_firmware.ps1" - ) else ( - echo. - echo ERROR: flash_firmware.ps1 not found! - echo. - echo Make sure you extracted the entire release ZIP file with - echo all directories and files intact. - echo. - echo The flash script should be at: - echo - flash_firmware.ps1 (in release root), or - echo - tools\flash_firmware.ps1 (in release tools folder) - echo. - echo Debugging info: - echo Script batch file is at: "%~dp0FlashFirmware.bat" - echo Looking for PS1 at: "%~dp0flash_firmware.ps1" - echo Or at: "%~dp0tools\flash_firmware.ps1" - echo. - pause - exit /b 1 - ) + goto :end_check ) +if exist "%~dp0tools\flash_firmware.ps1" ( + echo Launching flash tool from tools... + echo. + PowerShell -ExecutionPolicy Bypass -File "%~dp0tools\flash_firmware.ps1" + goto :end_check +) + +echo. +echo ERROR: flash_firmware.ps1 not found! +echo. +echo Make sure you extracted the entire release ZIP file with +echo all directories and files intact. +echo. +echo The flash script should be at: +echo - flash_firmware.ps1 (in release root), or +echo - tools\flash_firmware.ps1 (in release tools folder) +echo. +echo Debugging info: +echo Script batch file is at: "%~dp0FlashFirmware.bat" +echo Looking for PS1 at: "%~dp0flash_firmware.ps1" +echo Or at: "%~dp0tools\flash_firmware.ps1" +echo. +pause +exit /b 1 + +:end_check + if %ERRORLEVEL% NEQ 0 ( echo. echo ============================================