f256/examples/pgztest/build.sh
2023-12-31 19:56:36 -06:00

28 lines
512 B
Bash
Executable file

#!/bin/bash -ex
F256=$(pwd)/../..
LLVM=${F256}/llvm-mos
SETTINGS=${LLVM}/mos-platform/f256k/lib/settings.ld
PATH=${LLVM}/bin:${PATH}
START=0x2000
echo "__f256_start = ${START};" > ${SETTINGS}
mos-f256k-clang \
-I${F256}/include \
-I${F256}/f256lib \
-o pgztest \
-Os \
pgztest.c \
${F256}/f256lib/f256.c
mv -f pgztest pgztest.bin
${F256}/header/header \
pgz 24 \
pgztest.pgz \
${START} \
pgztest.bin ${START}
#llvm-nm pgztest.elf
llvm-objdump -d --print-imm-hex pgztest.elf
hexdump -C pgztest.pgz