@REM  Betty-TV-Fernbedienung
@ECHO OFF
SET ARMHOME=E:\KEIL41\ARM
SET PATH=%ARMHOME%\BIN40
SET ARMCONF=%ARMHOME%\BIN
SET ARMDLL=%ARMHOME%\BIN40
SET ARMINC=%ARMHOME%\RV31\INC
SET ARMLIB=%ARMHOME%\RV31\LIB

echo Assembliere Startup
armasm --cpu=arm7tdmi --arm --apcs=/interwork --list Startup_LPC2220arm.lst --width 100 Startup_LPC2220arm.asm
if Errorlevel==1 goto ende

echo Compile Interrupts
armcc  --via compile_arm.xcl  interrupts.c
if Errorlevel==1 goto ende

echo Compile Setup
armcc  --via compile_arm.xcl setup.c
if Errorlevel==1 goto ende

echo Compile Serial
armcc  --via compile_arm.xcl  serial.c
if Errorlevel==1 goto ende

echo Compile Systemtick
armcc  --via compile_arm.xcl  systemtick.c
if Errorlevel==1 goto ende

echo Compile Tasten
armcc  --via compile_arm.xcl tasten.c
if Errorlevel==1 goto ende

echo Compile Cmd
armcc  --via compile_arm.xcl cmd.c
if Errorlevel==1 goto ende

echo Compile Conv
armcc  --via compile_arm.xcl conv.c
if Errorlevel==1 goto ende

echo Compile GDI
armcc  --via compile_arm.xcl  gdi.c
if Errorlevel==1 goto ende

echo Compile Events
armcc  --via compile_arm.xcl  events.c
if Errorlevel==1 goto ende

echo Compile Menu
armcc  --via compile_arm.xcl  menu.c
if Errorlevel==1 goto ende

echo Compile BettyWorks
armcc  --via compile_arm.xcl  BettyWorkMenu.c
if Errorlevel==1 goto ende

echo Compile AppFinder
armcc  --via compile_arm.xcl  appfinder.c
if Errorlevel==1 goto ende

echo Compile Main
armcc  --via compile_arm.xcl  main.c
if Errorlevel==1 goto ende


echo Linke
armlink --via link_arm.xcl
if Errorlevel==1 goto ende

echo Mache Hex
fromelf --output BettyBASEarm.HEX --i32 linkedarm.elf
if Errorlevel==1 goto ende

echo Mache Bin
fromelf --output BettyBASEarm.bin --bin linkedarm.elf
if Errorlevel==1 goto ende

echo So, das war's.
..\Betty-Heaven
goto schluss

:ende
echo ...
echo Hei, da ist was schiefgelaufen!
pause

:schluss

