📄 make1003.bat
字号:
@echo off
mode CON: LINES=50
echo Testing for compiler sanity...
if not exist cc.bat goto nocc
if not exist board.rel goto noboardrel
del board.rel
:noboardrel
call cc.bat board.c
if not exist board.rel goto nocompiler
echo Trying to build project for VS1003 with pcb version above 2.0
for %%a in (*.c) do call cc.bat %%a -DPCB2 -DVS1003
echo Linking...
if not exist player.ihx goto link
del player.ihx
:link
sdcc --model-small player.rel board.rel lcd.rel filesys.rel vs10xx.rel storage.rel console.rel display.rel mmc.rel buffer.rel
if exist player.ihx goto ok
echo ************* LINKER FAILED **************
echo Loadable file was not generated by linker.
echo Please check:
echo - Is sdcc 2.4.0 installed?
echo - Is sdcc.exe in the PATH?
echo - Are all .c and .h files in current directory?
echo - do you have write access to disk and disk space ok?
goto exit
:ok
echo ---
echo Compilation finished.
echo If no errors occurred, loadable Intel hex file is player.ihx.
echo You can run CLEAN to delete intermediate files (asm listings etc) now.
echo ---
echo Linker map file is in player.map. From there we see e.g. the code size:
type player.map | find "CSEG "
echo ---
echo Done.
goto exit
:nocc
echo cc.bat is not in current directory. Copy bat files to source directory
echo and run %0 from that directory using the MS-DOS Command Prompt
goto exit
:nosource
echo Source file(s) not in current directory. Copy bat files to source directory
echo and run %0 from that directory using the MS-DOS Command Prompt
goto exit
:nocompiler
echo ---
echo No binary file was produced when trying to compile board.c. Please make sure
echo that SDCC 2.4.0 is installed and sdcc.exe can be found from the PATH.
echo ---
echo Install SDCC 2.4.0, copy bat files to source directory
echo and run %0 from that directory using the MS-DOS Command Prompt
goto exit
:exit
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -