다마고치 연구소 한국어판 소스 공개
This commit is contained in:
commit
db23855630
661 files changed
+503597
No files matched your search
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
# Build ArduboyEmu for the Paradise (clang/lld, Cortex-M3). Output: ../../ab.bin
|
||||
set -e
|
||||
cd "$(dirname "$0")"
|
||||
E=../../../emu/src/emu
|
||||
C=../core
|
||||
CF="--target=thumbv7m-none-eabi -mcpu=cortex-m3 -mthumb -ffreestanding -nostdlib -fno-common -Wall -Wno-unused-function -Wno-unused-variable -Wno-parentheses -Wno-dangling-else -Wno-unknown-attributes -fno-builtin-memset -ffunction-sections -DAVR_FAST= -DPERFORMANCE -DFAST_LCD -DEXIT_KEY -DLCD_FASTCLK -DTONE_FIX -DBL_SLEEP -DPARA_BACK -DPARA_MB_KEEP -DBL_PWM -DBL_MR3RST -DTONE_SAFE -DGPLAY -DSESS_FLAG $XCF"
|
||||
O=""
|
||||
for f in main.c $C/avr.c $E/hw.c $E/flash.c $E/libc.c; do
|
||||
n=$(basename $f .c); OPT=-Os
|
||||
case $n in avr) OPT=-O2;; esac
|
||||
if [ $n = avr ] && [ -z "$CLANG_CORE" ]; then
|
||||
# the core with GCC: each handler gets its own dispatch (clang shares one indirect jump for all)
|
||||
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -ffreestanding -nostdlib -fno-common -ffunction-sections -fno-tree-loop-distribute-patterns -Wall -Wno-unused-function -Wno-unused-variable -Wno-misleading-indentation -DAVR_FAST= $XCF -O2 -c $f -o $n.o
|
||||
else clang $CF $OPT -c $f -o $n.o; fi
|
||||
O="$O $n.o"; done
|
||||
ld.lld -T link.ld --gc-sections --no-rosegment $O -o ab.elf
|
||||
llvm-objcopy -O binary -j .text -j .data -j .init ab.elf ab.bin
|
||||
cp ab.bin ../../ab.bin; rm -f *.o ab.bin; [ -n "$KEEPELF" ] || rm -f ab.elf; ls -l ../../ab.bin
|
||||
Reference in new issue
Block a user