diff --git a/Flash Firmware.bat b/FlashFirmware.bat similarity index 52% rename from Flash Firmware.bat rename to FlashFirmware.bat index f785bbf..d11d3e6 100644 --- a/Flash Firmware.bat +++ b/FlashFirmware.bat @@ -16,32 +16,44 @@ 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... 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 - ) + 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 ============================================ 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"