a script to build on fruitjam
Some configurations that actually work at the time I committed this:
./fruitjam-build.sh -v # vga resolution, no psram, 128KiB
./fruitjam-build.sh -v -m448 # vga resolution, no psram, 448KiB
./fruitjam-build.sh -m4096 # 512x342 resolution, psram, 4096KiB
This commit is contained in:
parent
ada575fe01
commit
1254111004
1 changed files with 58 additions and 0 deletions
58
fruitjam-build.sh
Executable file
58
fruitjam-build.sh
Executable file
|
|
@ -0,0 +1,58 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# Some configurations that actually work at the time I committed this:
|
||||
# ./fruitjam-build.sh -v # vga resolution, no psram, 128KiB
|
||||
# ./fruitjam-build.sh -v -m448 # vga resolution, no psram, 448KiB
|
||||
# ./fruitjam-build.sh -m4096 # 512x342 resolution, psram, 4096KiB
|
||||
|
||||
DISP_WIDTH=512
|
||||
DISP_HEIGHT=342
|
||||
MEMSIZE=128
|
||||
CMAKE_ARGS=
|
||||
|
||||
while getopts "hvm:" o; do
|
||||
case "$o" in
|
||||
(v)
|
||||
DISP_WIDTH=640
|
||||
DISP_HEIGHT=480
|
||||
CMAKE_ARGS="$CMAKE_ARGS -DUSE_VGA_RES=1 -DHSTX_CKP=12 -DHSTX_D0P=14 -DHSTX_D1P=16 -DHSTX_D2P=18"
|
||||
;;
|
||||
(m)
|
||||
MEMSIZE=$OPTARG
|
||||
;;
|
||||
(h|?)
|
||||
echo "Usage: $0 [-v] [-m KiB]"
|
||||
echo ""
|
||||
echo " -v: Use framebuffer resolution 640x480 instead of 512x342"
|
||||
echo " -m: Set memory size in KiB"
|
||||
echo ""
|
||||
echo "PSRAM is automatically set depending on memory & framebuffer details"
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
TAG=fruitjam_${DISP_WIDTH}x${DISP_HEIGHT}_${MEMSIZE}k
|
||||
PSRAM=$((MEMSIZE > 448 || DISP_WIDTH != 640))
|
||||
if [ $PSRAM -ne 0 ] ; then
|
||||
TAG=${TAG}_psram
|
||||
CMAKE_ARGS="$CMAKE_ARGS -DUSE_PSRAM=1"
|
||||
fi
|
||||
|
||||
set -x
|
||||
make -C external/umac clean
|
||||
make -C external/umac DISP_WIDTH=${DISP_WIDTH} DISP_HEIGHT=${DISP_HEIGHT} MEMSIZE=${MEMSIZE}
|
||||
rm -f rom.bin
|
||||
./external/umac/main -r '4D1F8172 - MacPlus v3.ROM' -W rom.bin || true
|
||||
[ -f rom.bin ]
|
||||
xxd -i < rom.bin > incbin/umac-rom.h
|
||||
rm -rf build_${TAG}
|
||||
cmake -S . -B build_${TAG} \
|
||||
-DPICO_SDK_PATH=../pico-sdk \
|
||||
-DBOARD=adafruit_fruit_jam -DPICO_BOARD=pico2 \
|
||||
-DMEMSIZE=${MEMSIZE} \
|
||||
-DUSE_HSTX=1 \
|
||||
-DSD_TX=35 -DSD_RX=36 -DSD_SCK=34 -DSD_CS=39 -DUSE_SD=1 \
|
||||
${CMAKE_ARGS}
|
||||
make -C build_${TAG} -j$(nproc)
|
||||
Loading…
Reference in a new issue