forked from RfidResearchGroup/ChameleonMini
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ChameleonFirmwareUpgrade.bat
48 lines (37 loc) · 1.37 KB
/
ChameleonFirmwareUpgrade.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
@ECHO OFF
if not exist "%~dp0dfu-programmer.exe" (
echo Cannot find dfu-programmer.exe. Please run this .bat script in the same directory where dfu-programmer.exe is saved.
pause > nul
exit
)
if not exist "%~dp0Chameleon-RevG.eep" (
echo Cannot find Chameleon-RevG.eep. Please run this .bat script in the same directory where Chameleon-RevG.eep and Chameleon-RevG.hex are saved.
pause > nul
exit
)
if not exist "%~dp0Chameleon-RevG.hex" (
echo Cannot find Chameleon-RevG.hex. Please run this .bat script in the same directory where Chameleon-RevG.eep and Chameleon-RevG.hex are saved.
pause > nul
exit
)
"%~dp0dfu-programmer.exe" atxmega128a4u erase
IF %ERRORLEVEL% NEQ 0 (
echo There was an error with executing this command. Maybe your ChameleonMini is not in bootloader mode?
pause > nul
exit
)
"%~dp0dfu-programmer.exe" atxmega128a4u flash-eeprom "%~dp0Chameleon-RevG.eep" --force
IF %ERRORLEVEL% NEQ 0 (
echo There was an error with executing this command. Maybe your ChameleonMini is not in bootloader mode?
pause > nul
exit
)
"%~dp0dfu-programmer.exe" atxmega128a4u flash "%~dp0Chameleon-RevG.hex"
IF %ERRORLEVEL% NEQ 0 (
echo There was an error with executing this command. Maybe your ChameleonMini is not in bootloader mode?
pause > nul
exit
)
"%~dp0dfu-programmer.exe" atxmega128a4u launch
echo Flashing the firmware to your ChameleonMini is finished now.
pause > nul