directly specify gcc flags
Mockband / build (push) Failing after 5s Details

This commit is contained in:
Neale Pickett 2024-01-04 22:42:11 -07:00
parent a8d4918e05
commit 25a917dc81
1 changed files with 12 additions and 7 deletions

View File

@ -11,7 +11,7 @@ cd $(dirname $0)/..
mkdir -p out/
while read vid pid variant; do
while read variant vid pid flags; do
log
log Building $vid $pid $product
log
@ -19,23 +19,28 @@ while read vid pid variant; do
rm -rf build/
mkdir -p build/cache/
# We can overload build.extra_flags from boards.txt,
# so just specify the -D flags to gcc
flags="$flags -DUSB_VID=$vid -DUSB_PID=$pid"
flags="$flags -DUSB_MANUFACTURER='woozle.org'"
flags="$flags -DUSB_PRODUCT='Mockband $variant'"
flags="$flags -DCDC_DISABLED"
arduino-builder \
-build-path $(pwd)/build/ \
-build-cache $(pwd)/build/cache/ \
-fqbn arduino:avr:leonardo \
-hardware /usr/share/arduino/hardware \
-tools /usr/share/arduino/tools \
-prefs="build.vid=$vid" \
-prefs="build.pid=$pid" \
-prefs="build.usb_product=\"Mockband $variant\"" \
-prefs="build.extra_flags=\"{build.usb_flags} -DCDC_DISABLED\"" \
-prefs="build.extra_flags=$flags" \
-compile MockBand.ino
mv build/MockBand.ino.hex out/MockBand.$variant.hex
find out build/cache
done << EOD
0x1bad 0x0004 guitar
0x1bad 0x3110 drums
guitar 0x1bad 0x0004
guitar-wammy 0x1bad 0x0004 -DWAMMY
drums 0x1bad 0x3110
EOD
ls -l out/