-
Notifications
You must be signed in to change notification settings - Fork 2
/
make_em1.bat
58 lines (48 loc) · 2.17 KB
/
make_em1.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
:: This make_em1.bat script was created by EXL, 03-Sep-2023.
:: Default platform is Motorola P2K, EM1 ElfPack M*CORE, mcore-elf-gcc (GCC) 3.4.6 on Windows.
:: 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 MCORE_PATH=C:\MCORE_EM1
:: SDK path.
set SDK_PATH=%MCORE_PATH%\SDK
:: Defines.
set DEFINES=-D__P2K__ -DEM1 -DLINUX_BOGOMIPS
:: set DEFINES=-D__P2K__ -DEM1 -DLINUX_BOGOMIPS -DNO_ASM
:: set DEFINES=-D__P2K__ -DEM1 -DPALMOS_BOGOMIPS
:: Includes.
set INCLUDES=-I.
:: Optimization.
set OPTIM=-O2
:: Project/ELF name.
set ELF_NAME=Benchmark
:: Compiling step.
%MCORE_PATH%\GCC_MCore\bin\mcore-elf-gcc -fshort-wchar -mbig-endian -nostdinc -m340 ^
-fomit-frame-pointer -nostdlib -fno-builtin -I%SDK_PATH% %INCLUDES% %DEFINES% %OPTIM% ^
-c delay_mcore340_GCC.S -o delay_mcore340_GCC.o
%MCORE_PATH%\GCC_MCore\bin\mcore-elf-gcc -fshort-wchar -mbig-endian -nostdinc -m340 ^
-fomit-frame-pointer -nostdlib -fno-builtin -I%SDK_PATH% %INCLUDES% %DEFINES% %OPTIM% ^
-c dhry_1.c -o dhry_1.o
%MCORE_PATH%\GCC_MCore\bin\mcore-elf-gcc -fshort-wchar -mbig-endian -nostdinc -m340 ^
-fomit-frame-pointer -nostdlib -fno-builtin -I%SDK_PATH% %INCLUDES% %DEFINES% %OPTIM% ^
-c dhry_2.c -o dhry_2.o
%MCORE_PATH%\GCC_MCore\bin\mcore-elf-gcc -fshort-wchar -mbig-endian -nostdinc -m340 ^
-fomit-frame-pointer -nostdlib -fno-builtin -I%SDK_PATH% %INCLUDES% %DEFINES% %OPTIM% ^
-c Phases.c -o Phases.o
%MCORE_PATH%\GCC_MCore\bin\mcore-elf-gcc -fshort-wchar -mbig-endian -nostdinc -m340 ^
-fomit-frame-pointer -nostdlib -fno-builtin -I%SDK_PATH% %INCLUDES% %DEFINES% %OPTIM% ^
-c FireEffect.c -o FireEffect.o
%MCORE_PATH%\GCC_MCore\bin\mcore-elf-gcc -fshort-wchar -mbig-endian -nostdinc -m340 ^
-fomit-frame-pointer -nostdlib -fno-builtin -I%SDK_PATH% %INCLUDES% %DEFINES% %OPTIM% ^
-c %ELF_NAME%.c -o %ELF_NAME%.o
:: Linking step.
%MCORE_PATH%\GCC_MCore\bin\mcore-elf-ld -dn -r -no-bss-init -z muldefs ^
delay_mcore340_GCC.o dhry_1.o dhry_2.o Phases.o FireEffect.o %ELF_NAME%.o ^
-T%MCORE_PATH%\GCC_MCore\mcore-elf\lib\linker_elf.ld -o %ELF_NAME%.elf