-
Notifications
You must be signed in to change notification settings - Fork 2
/
make_ep1.bat
42 lines (32 loc) · 1.11 KB
/
make_ep1.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
:: This make_ep1.bat script was created by EXL, 07-Sep-2023.
:: Default platform is Motorola P2K, ElfPack v1.x, ADS1.2 [Build 848] on Windows.
:: Warning: `-nodebug` flag option for `armlink` is buggy.
:: Uncomment it for disable verbose output.
:: @echo off
if /I "%1"=="clean" (
if exist *.o del *.o
if exist *.obj del *.obj
if exist *.elfp del *.elfp
if exist *.elf del *.elf
exit /b 0
)
:: Compiler path.
set ARM_PATH=C:\ARM
:: SDK path.
set SDK_PATH=%ARM_PATH%\SDK
:: Libraries path.
set LIB_PATH=%ARM_PATH%\lib
:: Main link library.
set LIB_MAIN=Lib.o
:: Defines.
set DEFINES=-D__P2K__ -DEP1
:: set DEFINES=-D__P2K__ -DEP1 -DFTR_V600
:: set DEFINES=-D__P2K__ -DEP1 -DFTR_L7E
:: set DEFINES=-D__P2K__ -DEP1 -DDISABLE_ALL_INT
:: Project/ELF name.
set ELF_NAME=Overclock
:: Compiling step.
%ARM_PATH%\tcc -I%SDK_PATH% %DEFINES% -bigend -apcs /interwork -O2 -c Clock.c -o Clock.o
%ARM_PATH%\tcc -I%SDK_PATH% %DEFINES% -bigend -apcs /interwork -O2 -c %ELF_NAME%.c -o %ELF_NAME%.o
:: Linking step.
%ARM_PATH%\armlink -nolocals -reloc -first %LIB_MAIN%(Lib) Clock.o %ELF_NAME%.o %LIB_PATH%\%LIB_MAIN% -o %ELF_NAME%.elf