mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-25 17:42:48 +00:00
clean up configuration.h and add support for ttgo-lora-v1 boards
This commit is contained in:
parent
d1387be015
commit
cf2aa37635
@ -15,6 +15,7 @@ ARCHIVEDIR=release/archive
|
|||||||
|
|
||||||
rm -f $OUTDIR/firmware*
|
rm -f $OUTDIR/firmware*
|
||||||
|
|
||||||
|
# build the named environment and copy the bins to the release directory
|
||||||
function do_build {
|
function do_build {
|
||||||
ENV_NAME=$1
|
ENV_NAME=$1
|
||||||
echo "Building for $ENV_NAME with $PLATFORMIO_BUILD_FLAGS"
|
echo "Building for $ENV_NAME with $PLATFORMIO_BUILD_FLAGS"
|
||||||
@ -33,6 +34,7 @@ for COUNTRY in $COUNTRIES; do
|
|||||||
|
|
||||||
export PLATFORMIO_BUILD_FLAGS="$COMMONOPTS"
|
export PLATFORMIO_BUILD_FLAGS="$COMMONOPTS"
|
||||||
|
|
||||||
|
do_build "ttgo-lora32-v1"
|
||||||
do_build "tbeam"
|
do_build "tbeam"
|
||||||
do_build "heltec"
|
do_build "heltec"
|
||||||
done
|
done
|
||||||
|
@ -17,8 +17,6 @@ hw_version = US
|
|||||||
|
|
||||||
[env]
|
[env]
|
||||||
platform = espressif32
|
platform = espressif32
|
||||||
; board = ttgo-t-beam
|
|
||||||
; board = heltec_wifi_lora_32_V2
|
|
||||||
framework = arduino
|
framework = arduino
|
||||||
|
|
||||||
; customize the partition table
|
; customize the partition table
|
||||||
@ -79,3 +77,10 @@ lib_deps =
|
|||||||
[env:heltec]
|
[env:heltec]
|
||||||
;build_type = debug ; to make it possible to step through our jtag debugger
|
;build_type = debug ; to make it possible to step through our jtag debugger
|
||||||
board = heltec_wifi_lora_32_V2
|
board = heltec_wifi_lora_32_V2
|
||||||
|
|
||||||
|
[env:ttgo-lora32-v1]
|
||||||
|
board = ttgo-lora32-v1
|
||||||
|
|
||||||
|
; note: the platformio definition for lora32-v2 seems stale, it is missing a pins_arduino.h file, therefore I don't think it works
|
||||||
|
; [env:ttgo-lora32-v2]
|
||||||
|
; board = ttgo-lora32-v2
|
@ -39,16 +39,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
// Configuration
|
// Configuration
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
// Select which board is being used. If the outside build environment has sent a choice, just use that
|
|
||||||
#if !defined(ARDUINO_T_Beam) && !defined(ARDUINO_HELTEC_WIFI_LORA_32_V2)
|
|
||||||
// The platformio build environment should set this now
|
|
||||||
// #define ARDUINO_T_Beam // AKA Rev1 (second board released)
|
|
||||||
// #define ARDUINO_HELTEC_WIFI_LORA_32_V2
|
|
||||||
|
|
||||||
#define HW_VERSION_US // We encode the hardware freq range in the hw version string, so sw update can eventually install the
|
|
||||||
// correct build
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// If we are using the JTAG port for debugging, some pins must be left free for that (and things like GPS have to be disabled)
|
// If we are using the JTAG port for debugging, some pins must be left free for that (and things like GPS have to be disabled)
|
||||||
// we don't support jtag on the ttgo - access to gpio 12 is a PITA
|
// we don't support jtag on the ttgo - access to gpio 12 is a PITA
|
||||||
#ifdef ARDUINO_HELTEC_WIFI_LORA_32_V2
|
#ifdef ARDUINO_HELTEC_WIFI_LORA_32_V2
|
||||||
@ -108,7 +98,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#if defined(ARDUINO_T_Beam)
|
#if defined(ARDUINO_T_Beam)
|
||||||
// This string must exactly match the case used in release file names or the android updater won't work
|
// This string must exactly match the case used in release file names or the android updater won't work
|
||||||
#define HW_VENDOR "TBEAM"
|
#define HW_VENDOR "tbeam"
|
||||||
|
|
||||||
// #define BUTTON_NEED_PULLUP // if set we need to turn on the internal CPU pullup during sleep
|
// #define BUTTON_NEED_PULLUP // if set we need to turn on the internal CPU pullup during sleep
|
||||||
|
|
||||||
@ -129,25 +119,59 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#elif defined(ARDUINO_HELTEC_WIFI_LORA_32_V2)
|
#elif defined(ARDUINO_HELTEC_WIFI_LORA_32_V2)
|
||||||
// This string must exactly match the case used in release file names or the android updater won't work
|
// This string must exactly match the case used in release file names or the android updater won't work
|
||||||
#define HW_VENDOR "HELTEC"
|
#define HW_VENDOR "heltec"
|
||||||
|
|
||||||
#ifndef USE_JTAG // gpio15 is TDO for JTAG, so no I2C on this board while doing jtag
|
#ifndef USE_JTAG // gpio15 is TDO for JTAG, so no I2C on this board while doing jtag
|
||||||
#define I2C_SDA 4
|
#define I2C_SDA 4 // I2C pins for this board
|
||||||
#define I2C_SCL 15
|
#define I2C_SCL 15
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define RESET_OLED 16
|
#define RESET_OLED 16 // If defined, this pin will be used to reset the display controller
|
||||||
|
|
||||||
#define VEXT_ENABLE 21 // active low, powers the oled display and the lora antenna boost
|
#define VEXT_ENABLE 21 // active low, powers the oled display and the lora antenna boost
|
||||||
#define LED_PIN 25
|
#define LED_PIN 25 // If defined we will blink this LED
|
||||||
#define BUTTON_PIN 0
|
#define BUTTON_PIN 0 // If defined, this will be used for user button presses
|
||||||
|
|
||||||
#ifndef USE_JTAG
|
#ifndef USE_JTAG
|
||||||
#define RESET_GPIO 14
|
#define RESET_GPIO 14 // If defined, this pin will be used to reset the LORA radio
|
||||||
#endif
|
#endif
|
||||||
#define DIO0_GPIO 26
|
#define DIO0_GPIO 26
|
||||||
#define DIO1_GPIO 35
|
#define DIO1_GPIO 35 // DIO1 & DIO2 are not currently used, but they must be assigned to a pin number
|
||||||
#define DIO2_GPIO 34
|
#define DIO2_GPIO 34 // DIO1 & DIO2 are not currently used, but they must be assigned to a pin number
|
||||||
|
#elif defined(ARDUINO_TTGO_LoRa32_V1)
|
||||||
|
// This string must exactly match the case used in release file names or the android updater won't work
|
||||||
|
#define HW_VENDOR "ttgo-lora32-v1"
|
||||||
|
|
||||||
|
#define I2C_SDA 4 // I2C pins for this board
|
||||||
|
#define I2C_SCL 15
|
||||||
|
|
||||||
|
#define RESET_OLED 16 // If defined, this pin will be used to reset the display controller
|
||||||
|
|
||||||
|
// #define VEXT_ENABLE 21 // active low, powers the oled display and the lora antenna boost
|
||||||
|
#define LED_PIN 2 // If defined we will blink this LED
|
||||||
|
#define BUTTON_PIN 0 // If defined, this will be used for user button presses
|
||||||
|
|
||||||
|
#define RESET_GPIO 23 // If defined, this pin will be used to reset the LORA radio
|
||||||
|
#define DIO0_GPIO 26 // IRQ line for the LORA radio
|
||||||
|
#define DIO1_GPIO 35 // DIO1 & DIO2 are not currently used, but they must be assigned to a pin number
|
||||||
|
#define DIO2_GPIO 34 // DIO1 & DIO2 are not currently used, but they must be assigned to a pin number
|
||||||
|
#elif defined(ARDUINO_TTGO_LoRa32_V2)
|
||||||
|
// This string must exactly match the case used in release file names or the android updater won't work
|
||||||
|
#define HW_VENDOR "ttgo-lora32-v2"
|
||||||
|
|
||||||
|
#define I2C_SDA 21 // I2C pins for this board
|
||||||
|
#define I2C_SCL 22
|
||||||
|
|
||||||
|
#define RESET_OLED 16 // If defined, this pin will be used to reset the display controller
|
||||||
|
|
||||||
|
#define VEXT_ENABLE 21 // active low, powers the oled display and the lora antenna boost
|
||||||
|
#define LED_PIN 2 // If defined we will blink this LED
|
||||||
|
#define BUTTON_PIN 0 // If defined, this will be used for user button presses
|
||||||
|
|
||||||
|
#define RESET_GPIO 23 // If defined, this pin will be used to reset the LORA radio
|
||||||
|
#define DIO0_GPIO 26 // IRQ line for the LORA radio
|
||||||
|
#define DIO1_GPIO 35 // DIO1 & DIO2 are not currently used, but they must be assigned to a pin number
|
||||||
|
#define DIO2_GPIO 34 // DIO1 & DIO2 are not currently used, but they must be assigned to a pin number
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user