mirror of
https://github.com/EdgeTX/edgetx.git
synced 2025-07-16 04:45:16 +03:00
* chores(flysky): separate AFHDS2A and AFHDS3 into 2 different module type This should allow to remove some of the hacks added earlier. * chore: Add some EL18 CI bits * fix(afhds): cmake defs * fix(ci): add el18 to commit-tests.sh * chore(cpn): separate AFHDS2A and AFHDS3 * chore(cpn): remove binary import of afhds and legacy fxFreq field for afhds3 * fix(cpn): limit available internal afhds protocols to those supported by hardware * chore(cpn): update Flysky int module test * fix(cpn): compile error * fix(cpn): afhds2a max channels * fix: TR_MODULE_PROTOCOLS * enh(cpn): more support for afhds2a and 3 * fix(cpn): rebase compile error * fix(cpn): bit indexes * fix(cpn): emi toString * fix(cpn): limit available internal afhds protocols to those supported by hardware * enh(cpn): add support for Flysky EL18 * fix(cpn): available protocols * fix(cpn): rebase moduledata * chore(cpn): add module fields to model print * Separate AFHDS2A and AFHDS3 UI settings. * Fix AFHDS3 conversion from old subtype value. Fix 'Channel Range' layout on portrait LCD. * Fix name. --------- Co-authored-by: Peter Feerick <peter.feerick@gmail.com> Co-authored-by: elecpower <neilh713@tpg.com.au> Co-authored-by: Phil Mitchell <phil.a.mitchell@gmail.com>
166 lines
3.8 KiB
Bash
Executable file
166 lines
3.8 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
# Stops on first error, echo on
|
|
set -e
|
|
set -x
|
|
|
|
# Allow variable core usage
|
|
# default uses all cpu cores
|
|
#
|
|
if [ -f /usr/bin/nproc ]; then
|
|
num_cpus=$(nproc)
|
|
elif [ -f /usr/sbin/sysctl ]; then
|
|
num_cpus=$(sysctl -n hw.logicalcpu)
|
|
else
|
|
num_cpus=2
|
|
fi
|
|
: "${CORES:=$num_cpus}"
|
|
|
|
# If no build target, exit
|
|
#: "${FLAVOR:=ALL}"
|
|
|
|
for i in "$@"
|
|
do
|
|
case $i in
|
|
--jobs=*)
|
|
CORES="${i#*=}"
|
|
shift
|
|
;;
|
|
-j*)
|
|
CORES="${i#*j}"
|
|
shift
|
|
;;
|
|
-Wno-error)
|
|
WERROR=0
|
|
shift
|
|
;;
|
|
-b*)
|
|
FLAVOR="${i#*b}"
|
|
shift
|
|
;;
|
|
esac
|
|
done
|
|
|
|
# Add GCC_ARM to PATH
|
|
if [[ -n ${GCC_ARM} ]] ; then
|
|
export PATH=${GCC_ARM}:$PATH
|
|
fi
|
|
|
|
: ${SRCDIR:=$(dirname "$(pwd)/$0")/..}
|
|
|
|
: ${BUILD_TYPE:=Debug}
|
|
: ${COMMON_OPTIONS:="-DCMAKE_BUILD_TYPE=$BUILD_TYPE -Wno-dev "}
|
|
if (( $WERROR )); then COMMON_OPTIONS+=" -DWARNINGS_AS_ERRORS=YES "; fi
|
|
|
|
: ${EXTRA_OPTIONS:="$EXTRA_OPTIONS"}
|
|
|
|
COMMON_OPTIONS+=${EXTRA_OPTIONS}
|
|
|
|
: ${FIRMARE_TARGET:="firmware-size"}
|
|
|
|
# wipe build directory clean
|
|
rm -rf build && mkdir -p build && cd build
|
|
|
|
target_names=$(echo "$FLAVOR" | tr '[:upper:]' '[:lower:]' | tr ';' '\n')
|
|
|
|
for target_name in $target_names
|
|
do
|
|
BUILD_OPTIONS=${COMMON_OPTIONS}
|
|
|
|
echo "Testing ${target_name}"
|
|
case $target_name in
|
|
|
|
x9lite)
|
|
BUILD_OPTIONS+="-DPCB=X9LITE"
|
|
;;
|
|
x9lites)
|
|
BUILD_OPTIONS+="-DPCB=X9LITES"
|
|
;;
|
|
x7)
|
|
BUILD_OPTIONS+="-DPCB=X7"
|
|
;;
|
|
x7-access)
|
|
BUILD_OPTIONS+="-DPCB=X7 -DPCBREV=ACCESS -DPXX1=YES"
|
|
;;
|
|
t12)
|
|
BUILD_OPTIONS+="-DPCB=X7 -DPCBREV=T12 -DINTERNAL_MODULE_MULTI=ON"
|
|
;;
|
|
tx12)
|
|
BUILD_OPTIONS+="-DPCB=X7 -DPCBREV=TX12"
|
|
;;
|
|
tx12mk2)
|
|
BUILD_OPTIONS+="-DPCB=X7 -DPCBREV=TX12MK2"
|
|
;;
|
|
t8)
|
|
BUILD_OPTIONS+="-DPCB=X7 -DPCBREV=T8"
|
|
;;
|
|
lr3pro)
|
|
BUILD_OPTIONS+="-DPCB=X7 -DPCBREV=LR3PRO"
|
|
;;
|
|
tlite)
|
|
BUILD_OPTIONS+="-DPCB=X7 -DPCBREV=TLITE"
|
|
;;
|
|
tlitef4)
|
|
BUILD_OPTIONS+="-DPCB=X7 -DPCBREV=TLITEF4"
|
|
;;
|
|
t20)
|
|
BUILD_OPTIONS+="-DPCB=X7 -DPCBREV=T20"
|
|
;;
|
|
xlite)
|
|
BUILD_OPTIONS+="-DPCB=XLITE"
|
|
;;
|
|
xlites)
|
|
BUILD_OPTIONS+="-DPCB=XLITES"
|
|
;;
|
|
x9d)
|
|
BUILD_OPTIONS+="-DPCB=X9D"
|
|
;;
|
|
x9dp)
|
|
BUILD_OPTIONS+="-DPCB=X9D+"
|
|
;;
|
|
x9dp2019)
|
|
BUILD_OPTIONS+="-DPCB=X9D+ -DPCBREV=2019"
|
|
;;
|
|
x9e)
|
|
BUILD_OPTIONS+="-DPCB=X9E"
|
|
;;
|
|
x10)
|
|
BUILD_OPTIONS+="-DPCB=X10"
|
|
;;
|
|
x10-access)
|
|
BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=ACCESS -DPXX1=YES"
|
|
;;
|
|
x12s)
|
|
BUILD_OPTIONS+="-DPCB=X12S"
|
|
;;
|
|
t16)
|
|
BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=T16 -DINTERNAL_MODULE_MULTI=ON"
|
|
;;
|
|
t18)
|
|
BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=T18"
|
|
;;
|
|
tx16s)
|
|
BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=TX16S"
|
|
;;
|
|
nv14)
|
|
BUILD_OPTIONS+="-DPCB=NV14"
|
|
;;
|
|
el18)
|
|
BUILD_OPTIONS+="-DPCB=NV14 -DPCBREV=EL18"
|
|
;;
|
|
commando8)
|
|
BUILD_OPTIONS+="-DPCB=X7 -DPCBREV=COMMANDO8"
|
|
;;
|
|
esac
|
|
|
|
cmake ${BUILD_OPTIONS} "${SRCDIR}"
|
|
|
|
cmake --build . --target arm-none-eabi-configure
|
|
cmake --build arm-none-eabi -j"${CORES}" --target ${FIRMARE_TARGET}
|
|
|
|
cmake --build . --target native-configure
|
|
cmake --build native -j"${CORES}" --target libsimulator
|
|
cmake --build native -j"${CORES}" --target tests-radio
|
|
|
|
rm -f CMakeCache.txt native/CMakeCache.txt arm-none-eabi/CMakeCache.txt
|
|
done
|