echo %date% %time% Starting RDC troj >> C:\INSTALL.log 

set load_directory=released

set broadtype=rdc

set type=rdc_7125

IF EXIST sys.hex del sys.hex
IF EXIST sec1.bin del sec1.bin
IF EXIST sec1.enc del sec1.enc
IF EXIST fpga.bin del fpga.bin
IF EXIST fpga.bsd del fpga.bsd
IF EXIST rx_fpga.bin del rx_fpga.bin

copy xc2v500.bsd fpga.bsd

copy %load_directory%\%type%\sys\*.hex sys.hex

copy /B %load_directory%\%type%\fpga\*.bin fpga.bin 

copy /B %load_directory%\%type%\rx_fpga\*.bin rx_fpga.bin

boot_noFPGA boot.hex boot.bin

Flash_3sectors_rdc sys.hex fpga.bin rx_fpga.bin sec1.bin

flashenc_ldsect 0x26 0x10 1 512 400000 100 sec1.bin sec1.enc

cls

lmtest halt_all.enc

sleep 1

lmtest halt_all.enc

sleep 1

echo sending troj

lmtest sec1.enc

sleep 1

IF EXIST sys.hex del sys.hex
IF EXIST sec1.bin del sec1.bin
IF EXIST sec1.enc del sec1.enc
IF EXIST fpga.bin del fpga.bin
IF EXIST fpga.bsd del fpga.bsd
IF EXIST rx_fpga.bin del rx_fpga.bin

echo %date% %time% completed RDC troj >> C:\INSTALL.log 
echo troj sent, recycle power

sleep 1