mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-26 09:59:01 +00:00
Merge pull request #101 from geeksville/master
0.4.3 Fix #92: omg - for the last couple of weeks the official builds…
This commit is contained in:
commit
fab616a15e
@ -6,6 +6,10 @@ source bin/version.sh
|
|||||||
|
|
||||||
COUNTRIES="US EU433 EU865 CN JP"
|
COUNTRIES="US EU433 EU865 CN JP"
|
||||||
#COUNTRIES=US
|
#COUNTRIES=US
|
||||||
|
#COUNTRIES=CN
|
||||||
|
|
||||||
|
BOARDS="ttgo-lora32-v2 ttgo-lora32-v1 tbeam heltec"
|
||||||
|
#BOARDS=tbeam
|
||||||
|
|
||||||
OUTDIR=release/latest
|
OUTDIR=release/latest
|
||||||
|
|
||||||
@ -24,23 +28,21 @@ function do_build {
|
|||||||
SRCBIN=.pio/build/$ENV_NAME/firmware.bin
|
SRCBIN=.pio/build/$ENV_NAME/firmware.bin
|
||||||
SRCELF=.pio/build/$ENV_NAME/firmware.elf
|
SRCELF=.pio/build/$ENV_NAME/firmware.elf
|
||||||
rm -f $SRCBIN
|
rm -f $SRCBIN
|
||||||
pio run --environment $ENV_NAME # -v
|
|
||||||
|
# The shell vars the build tool expects to find
|
||||||
|
export HW_VERSION="1.0-$COUNTRY"
|
||||||
|
export APP_VERSION=$VERSION
|
||||||
|
export COUNTRY
|
||||||
|
|
||||||
|
pio run --jobs 4 --environment $ENV_NAME # -v
|
||||||
cp $SRCBIN $OUTDIR/bins/firmware-$ENV_NAME-$COUNTRY-$VERSION.bin
|
cp $SRCBIN $OUTDIR/bins/firmware-$ENV_NAME-$COUNTRY-$VERSION.bin
|
||||||
cp $SRCELF $OUTDIR/elfs/firmware-$ENV_NAME-$COUNTRY-$VERSION.elf
|
cp $SRCELF $OUTDIR/elfs/firmware-$ENV_NAME-$COUNTRY-$VERSION.elf
|
||||||
}
|
}
|
||||||
|
|
||||||
for COUNTRY in $COUNTRIES; do
|
for COUNTRY in $COUNTRIES; do
|
||||||
|
for BOARD in $BOARDS; do
|
||||||
HWVERSTR="1.0-$COUNTRY"
|
do_build $BOARD
|
||||||
COMMONOPTS="-DAPP_VERSION=$VERSION -DHW_VERSION_$COUNTRY -DHW_VERSION=$HWVERSTR -Wall -Wextra -Wno-missing-field-initializers -Isrc -Os -DAXP_DEBUG_PORT=Serial"
|
done
|
||||||
|
|
||||||
export PLATFORMIO_BUILD_FLAGS="$COMMONOPTS"
|
|
||||||
|
|
||||||
#do_build "tbeam0.7"
|
|
||||||
do_build "ttgo-lora32-v2"
|
|
||||||
do_build "ttgo-lora32-v1"
|
|
||||||
do_build "tbeam"
|
|
||||||
do_build "heltec"
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# keep the bins in archive also
|
# keep the bins in archive also
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
|
|
||||||
|
|
||||||
export VERSION=0.4.2
|
export VERSION=0.4.3
|
@ -12,9 +12,14 @@
|
|||||||
default_envs = tbeam
|
default_envs = tbeam
|
||||||
|
|
||||||
[common]
|
[common]
|
||||||
; default to a US frequency range, change it as needed for your region and hardware (CN, JP, EU433, EU865)
|
; common is not currently used
|
||||||
hw_version = US
|
|
||||||
|
|
||||||
|
; REQUIRED environment variables - if not set the specified default will be sued
|
||||||
|
; The following environment variables must be set in the shell if you'd like to override them.
|
||||||
|
; They are used in this ini file as systenv.VARNAME, so in your shell do export "VARNAME=fish"
|
||||||
|
; HW_VERSION (default US)
|
||||||
|
; APP_VERSION (default emptystring)
|
||||||
|
; HW_VERSION (default emptystring)
|
||||||
|
|
||||||
[env]
|
[env]
|
||||||
platform = espressif32
|
platform = espressif32
|
||||||
@ -26,7 +31,11 @@ board_build.partitions = partition-table.csv
|
|||||||
|
|
||||||
; note: we add src to our include search path so that lmic_project_config can override
|
; note: we add src to our include search path so that lmic_project_config can override
|
||||||
; FIXME: fix lib/BluetoothOTA dependency back on src/ so we can remove -Isrc
|
; FIXME: fix lib/BluetoothOTA dependency back on src/ so we can remove -Isrc
|
||||||
build_flags = -Wno-missing-field-initializers -Isrc -Isrc/rf95 -Os -Wl,-Map,.pio/build/output.map -DAXP_DEBUG_PORT=Serial -DHW_VERSION_${common.hw_version}
|
build_flags = -Wno-missing-field-initializers -Isrc -Isrc/rf95 -Os -Wl,-Map,.pio/build/output.map
|
||||||
|
-DAXP_DEBUG_PORT=Serial
|
||||||
|
-DHW_VERSION_${sysenv.COUNTRY}
|
||||||
|
-DAPP_VERSION=${sysenv.APP_VERSION}
|
||||||
|
-DHW_VERSION=${sysenv.HW_VERSION}
|
||||||
|
|
||||||
; not needed included in ttgo-t-beam board file
|
; not needed included in ttgo-t-beam board file
|
||||||
; also to use PSRAM https://docs.platformio.org/en/latest/platforms/espressif32.html#external-ram-psram
|
; also to use PSRAM https://docs.platformio.org/en/latest/platforms/espressif32.html#external-ram-psram
|
||||||
|
@ -55,7 +55,10 @@
|
|||||||
#define CH_SPACING CH_SPACING_JP
|
#define CH_SPACING CH_SPACING_JP
|
||||||
#define NUM_CHANNELS NUM_CHANNELS_JP
|
#define NUM_CHANNELS NUM_CHANNELS_JP
|
||||||
#else
|
#else
|
||||||
#error "HW_VERSION not set"
|
// HW version not set - assume US
|
||||||
|
#define CH0 CH0_US
|
||||||
|
#define CH_SPACING CH_SPACING_US
|
||||||
|
#define NUM_CHANNELS NUM_CHANNELS_US
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -31,8 +31,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
// If app version is not specified we assume we are not being invoked by the build script
|
// If app version is not specified we assume we are not being invoked by the build script
|
||||||
#ifndef APP_VERSION
|
#ifndef APP_VERSION
|
||||||
#define APP_VERSION 0.0.0 // this def normally comes from build-all.sh
|
#error APP_VERSION, HW_VERSION, and HW_VERSION_countryname must be set by the build environment
|
||||||
#define HW_VERSION 1.0 - US // normally comes from build-all.sh and contains the region code
|
//#define APP_VERSION 0.0.0 // this def normally comes from build-all.sh
|
||||||
|
//#define HW_VERSION 1.0 - US // normally comes from build-all.sh and contains the region code
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user