echo on
date /T
time /T

REM Pfade
set sd=".\bin\sdcard"
set sdsys=".\bin\sdcard\mental"
set flash=".\bin\flash"
set libpath=".\lib"
set BSTC=bstc.exe

REM ----------------------------------------------------------------
REM Alte Versionen löschen

del %flash%\*.* /Q
del %sd%\*.* /Q
del %sdsys%\*.* /Q


REM ----------------------------------------------------------------
REM Blockfiles kopieren

copy .\mlib\*.* %sdsys%


REM ----------------------------------------------------------------
REM Flashdateien erzeugen
REM --> \bin\flash 
REM --> \bin\sdcard

%BSTC% -L %libpath% -b -O a .\rom\admflash.spin
%BSTC% -L %libpath% -b -O a .\rom\belflash.spin
%BSTC% -L %libpath% -b -O a .\rom\regflash.spin
copy *.binary %flash% 
rename admflash.binary madm.sys
rename belflash.binary mbel.sys
rename regflash.binary mreg.sys
move *.sys %sdsys% 

echo off
