@echo off
for /F %%a in ('echo prompt $E ^| cmd') do set "_esc=%%a"
set _greenon=%_esc%[92m
set _coloff=%_esc%[0m	
mode COM%1: BAUD=115200 PARITY=n DATA=8 STOP=1
echo DPL>\\.\COM%1
TIMEOUT /T 1 /NOBREAK >nul
echo DFU Mode Set..... resetting
echo +++>\\.\COM%1
TIMEOUT /T 8 /NOBREAK >nul
cd bin
STM32_Programmer_CLI.exe -c port=usb1 -vb 1 -e all -w Xybix_r310.bin 0x08000000 -v
echo If one of the last lines in the window looks like this:
echo .
echo    %_greenon%Download verified successfully%_coloff% 
echo .   
echo in Green Letters  ....    Then turn off power to Axys Unit.