-
Notifications
You must be signed in to change notification settings - Fork 59
Expand file tree
/
Copy pathPi2.bat
More file actions
26 lines (24 loc) · 985 Bytes
/
Copy pathPi2.bat
File metadata and controls
26 lines (24 loc) · 985 Bytes
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
@REM COMPILER COMMAND LINE
@echo off
set "bindir=g:\pi\gcc_pi_6_3\bin\"
set "cpuflags=-Wall -O3 -mfpu=neon -mfloat-abi=hard -march=armv7ve -mtune=cortex-a7 -mno-unaligned-access -fno-tree-loop-vectorize -fno-tree-slp-vectorize"
set "asmflags=-nostdlib -nostartfiles -ffreestanding -fno-asynchronous-unwind-tables -fomit-frame-pointer -Wa,-a>list.txt"
set "linkerflags=-Wl,-gc-sections -Wl,--build-id=none -Wl,-Bdynamic -Wl,-Map,kernel.map"
set "outflags=-o kernel.elf"
set "libflags=-lc -lm -lg -lgcc"
@echo on
%bindir%arm-none-eabi-gcc %cpuflags% %asmflags% %linkerflags% -Wl,-T,rpi32.ld main.c SmartStart32.S rpi-SmartStart.c emb-stdio.c %outflags% %libflags%
@echo off
if %errorlevel% EQU 1 (goto build_fail)
@REM LINKER COMMAND LINE
@echo on
%bindir%arm-none-eabi-objcopy kernel.elf -O binary DiskImg/kernel7.img
@echo off
if %errorlevel% EQU 1 (goto build_fail)
echo BUILD COMPLETED NORMALLY
pause
exit /b 0
:build_fail
echo ********** BUILD FAILURE **********
Pause
exit /b 1