@REM  Betty-TV-Fernbedienung
@REM  eine Betty-App erzeugen mit GCC
@ECHO OFF

SET ARMHOME=E:\YAGARTO
SET PATH=%ARMHOME%\BIN

echo Assembliere Startup
ARM-NONE-EABI-AS -mcpu=arm7tdmi-s --gstabs -mthumb-interwork -mfpu=softfpa -a=AppstartupGcc.lst -o AppstartupGcc.o AppstartupGcc.asm
if Errorlevel==1 goto ende

echo Assembliere BettyApiGcc
ARM-NONE-EABI-AS -mcpu=arm7tdmi-s --gstabs -mthumb-interwork -mfpu=softfpa -a=BettyApiGcc.lst -o BettyApiGcc.o BettyApiGcc.asm
if Errorlevel==1 goto ende

echo Compile AppMain
ARM-NONE-EABI-GCC @appcompilegcc.xcl -o appmain.thumb.o appmain.c
if Errorlevel==1 goto ende

echo Linke
ARM-NONE-EABI-LD @applinkgcc.xcl
if Errorlevel==1 goto ende

echo Mache Hex
ARM-NONE-EABI-OBJCOPY -O ihex applinkedgcc.elf BettyAppGcc.hex
if Errorlevel==1 goto ende

echo Mache Bin
ARM-NONE-EABI-OBJCOPY -O binary applinkedgcc.elf BettyAppGcc.bin
if Errorlevel==1 goto ende

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

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

:schluss

