CLS
@ECHO OFF

REM Vado alla directory dello script
cd %~dp0

REM Al rilascio modificare il FILENAME con il binario aggiornato.
SET FILENAME=FW079-0109.dfu

ECHO.
ECHO. ***************************
ECHO. Programming internal flash
ECHO. ***************************

CALL DfuSeCommand.exe -c --al 0 -d --fn %FILENAME%

SET RETVAL=%ERRORLEVEL%
IF %RETVAL%==1 GOTO ERROR

ECHO.
ECHO. ***************************
ECHO. Programming external flash
ECHO. ***************************

CALL DfuSeCommand.exe -c --al 1 -d --fn %FILENAME%

SET RETVAL=%ERRORLEVEL%
IF %RETVAL%==1 GOTO ERROR

GOTO END

:ERROR

ECHO.
ECHO. *********************************************
ECHO. There was an error programming your display.
ECHO. *********************************************
PAUSE
EXIT

:END

ECHO.
ECHO. **********
ECHO. All Done. 
ECHO. **********
TIMEOUT /T 5
CLS










