Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 18 additions & 16 deletions Flash Firmware.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
28 changes: 10 additions & 18 deletions UPLOAD_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,11 @@ Each release includes:

---

## Upload Firmware - Two Methods

There are two ways to update your controller's firmware:

### **Method 1: Quick Flash (RECOMMENDED - 10 seconds)**

Pre-compiled firmware flashes instantly. **This is the easiest method.**

### **Method 2: Compile from Source (Advanced - 60+ seconds)**

Compile the Arduino source code on your computer. For developers or customization.
## Flash Your Firmware

---

## Method 1: Quick Flash (RECOMMENDED)
## Standard Method: Quick Flash (Recommended)

Pre-compiled firmware is ready to flash instantly - no compilation needed!

Expand All @@ -63,19 +53,21 @@ Flashing writes the firmware directly to your controller's memory using pre-comp

---

## Method 2: Compile from Source (Advanced)
## For Advanced Users & Developers

For developers who want to modify the firmware or use the full development environment.
### Compile Firmware from Source Code

This method compiles the Arduino code fresh each time, taking 30-60 seconds longer than flashing.
If you need to modify the firmware or want the full Arduino development environment, you can compile from source instead of flashing pre-compiled binaries. This takes 60+ seconds instead of ~10 seconds.

---

### Windows - Compile from Source

1. **Download the SledLink folder** to your computer
2. **Double-click** `Upload Firmware (Windows).bat`
3. **Follow the prompts** on screen
2. **Extract the ZIP file** to a convenient location
3. **Open the `tools` folder** in the release package
4. **Double-click** `Compile Firmware (Windows).bat`
5. **Follow the prompts** on screen

### Mac - Compile from Source

Expand Down Expand Up @@ -112,7 +104,7 @@ This method compiles the Arduino code fresh each time, taking 30-60 seconds long

---

## What the Compile-from-Source Script Does
### How Compile-from-Source Works

1. **Checks for Arduino CLI** - The build tool. Installs it if needed.
2. **Sets up ESP32 support** - Downloads ESP32 tools (first time only, ~500MB)
Expand Down
21 changes: 10 additions & 11 deletions build_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,17 @@ mkdir -p "$OUTPUT_DIR/firmware/tools"
mkdir -p "$OUTPUT_DIR/tools"
mkdir -p "$OUTPUT_DIR/source"

# Copy flash tools
# Copy flash tools (main method for users)
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..."
# Copy compile/upload tools (advanced method for developers)
echo "Copying advanced compile tools..."
cp "$SCRIPT_DIR/upload_firmware.sh" "$OUTPUT_DIR/tools/"
cp "$SCRIPT_DIR/upload_firmware.ps1" "$OUTPUT_DIR/tools/"
cp "$SCRIPT_DIR/Upload Firmware (Windows).bat" "$OUTPUT_DIR/"
cp "$SCRIPT_DIR/Upload Firmware (Windows).bat" "$OUTPUT_DIR/tools/Compile Firmware (Windows).bat"
chmod +x "$OUTPUT_DIR/tools/upload_firmware.sh"

# Copy source code
Expand Down Expand Up @@ -154,17 +154,16 @@ CONTENTS
JudgeController/ - Judge controller binaries
tools/ - esptool.exe for Windows

Flash Firmware.bat - EASIEST METHOD: Double-click to flash firmware
Flash Firmware.bat - Main method: Double-click to flash firmware instantly

source/ - Arduino source code (for advanced users)
source/ - Arduino source code (for advanced users and developers)
arduino/SledController/ - Sled controller source
arduino/JudgeController/ - Judge controller source

tools/ - Upload utilities (for compiling from source)
upload_firmware.sh - Mac/Linux upload script (compile-on-upload)
upload_firmware.ps1 - Windows PowerShell upload script (compile-on-upload)

Upload Firmware (Windows).bat - Legacy: Compile and upload (slow, ~60 seconds)
tools/ - Advanced tools (for developers)
Compile Firmware (Windows).bat - Compile and upload from source code
upload_firmware.sh - Mac/Linux compile and upload script
upload_firmware.ps1 - Windows PowerShell compile and upload script


QUICK START - FLASH FIRMWARE (RECOMMENDED)
Expand Down