add first board

remove_board_finder
Peter Buchegger 2023-09-23 14:08:44 +00:00
rodzic 8c2c217acc
commit 39dcbe16bc
5 zmienionych plików z 194 dodań i 20 usunięć

Wyświetl plik

@ -0,0 +1,55 @@
; Common settings for ESP targes, mixin with extends = esp32_base
[esp32_base]
extends = arduino_base
platform = platformio/espressif32 @ 6.3.2
build_src_filter =
${arduino_base.build_src_filter} -<platform/nrf52/> -<platform/stm32wl> -<platform/rp2040> -<mesh/eth/>
upload_speed = 921600
debug_init_break = tbreak setup
monitor_filters = esp32_exception_decoder
;board_build.filesystem = littlefs
# Remove -DMYNEWT_VAL_BLE_HS_LOG_LVL=LOG_LEVEL_CRITICAL for low level BLE logging.
# See library directory for BLE logging possible values: .pio/libdeps/tbeam/NimBLE-Arduino/src/log_common/log_common.h
# This overrides the BLE logging default of LOG_LEVEL_INFO (1) from: .pio/libdeps/tbeam/NimBLE-Arduino/src/esp_nimble_cfg.h
build_flags =
${arduino_base.build_flags}
-Wall
; -Wextra
-Isrc/platform/esp32
-std=c++2a
; -std=c++11
-DLOG_LOCAL_LEVEL=ESP_LOG_DEBUG
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
-DMYNEWT_VAL_BLE_HS_LOG_LVL=LOG_LEVEL_CRITICAL
-DAXP_DEBUG_PORT=Serial
-DCONFIG_BT_NIMBLE_ENABLED
-DCONFIG_NIMBLE_CPP_LOG_LEVEL=2
-DCONFIG_BT_NIMBLE_MAX_CCCDS=20
-DCONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE=5120
-DESP_OPENSSL_SUPPRESS_LEGACY_WARNING
-DSERIAL_BUFFER_SIZE=4096
;-DDEBUG_HEAP
;lib_deps =
; ${arduino_base.lib_deps}
; ${networking_base.lib_deps}
; ${environmental_base.lib_deps}
; h2zero/NimBLE-Arduino@^1.4.1
; jgromes/RadioLib@^6.1.0
; https://github.com/lewisxhe/XPowersLib.git#84b7373faea3118b6c37954d52f98b8a337148d6
;lib_ignore =
; segger_rtt
; ESP32 BLE Arduino
; leave this commented out to avoid breaking Windows
;upload_port = /dev/ttyUSB0
;monitor_port = /dev/ttyUSB0
; customize the partition table
; http://docs.platformio.org/en/latest/platforms/espressif32.html#partition-tables
;board_build.partitions = partition-table.csv

Wyświetl plik

@ -9,14 +9,49 @@
; https://docs.platformio.org/page/projectconf.html
[platformio]
default_envs = lora_board
;default_envs = tbeam
;default_envs = tbeam-s3-core
;default_envs = heltec-v1
;default_envs = heltec-v2_0
;default_envs = heltec-v2_1
;default_envs = tlora-v1
;default_envs = tlora_v1_3
default_envs = tlora-v2
;default_envs = tlora-v2-1-1_6
extra_configs =
arch/*/*.ini
variants/*/platformio.ini
[env]
platform = espressif32 @ 6.3.2
framework = arduino
lib_ldf_mode = deep+
;extra_scripts = bin/platformio-custom.py
build_flags = -Wno-missing-field-initializers
-Wno-format
; -Isrc -Isrc/mesh -Isrc/mesh/generated -Isrc/gps -Isrc/buzz -Wl,-Map,.pio/build/output.map
; -DUSE_THREAD_NAMES
; -DTINYGPS_OPTION_NO_CUSTOM_FIELDS
; -DPB_ENABLE_MALLOC=1
-DRADIOLIB_EXCLUDE_CC1101
-DRADIOLIB_EXCLUDE_NRF24
-DRADIOLIB_EXCLUDE_RF69
-DRADIOLIB_EXCLUDE_SX1231
-DRADIOLIB_EXCLUDE_SI443X
-DRADIOLIB_EXCLUDE_RFM2X
-DRADIOLIB_EXCLUDE_AFSK
-DRADIOLIB_EXCLUDE_HELLSCHREIBER
-DRADIOLIB_EXCLUDE_MORSE
-DRADIOLIB_EXCLUDE_RTTY
-DRADIOLIB_EXCLUDE_SSTV
-DRADIOLIB_EXCLUDE_AX25
-DRADIOLIB_EXCLUDE_DIRECT_RECEIVE
-DRADIOLIB_EXCLUDE_BELL
-DRADIOLIB_EXCLUDE_PAGER
-DRADIOLIB_EXCLUDE_FSK4
-DRADIOLIB_EXCLUDE_APRS
monitor_speed = 115200
monitor_raw = yes
lib_deps =
bblanchon/ArduinoJson @ 6.21.3
lewisxhe/AXP202X_Library @ 1.1.3
@ -27,23 +62,33 @@ lib_deps =
mikalhart/TinyGPSPlus @ 1.0.3
shaggydog/OneButton @ 1.5.0
jgromes/RadioLib @ 6.1.0
check_tool = cppcheck
check_flags = cppcheck: --std=c++20 --suppress=*:*.pio\* --inline-suppr --suppress=unusedFunction -DCPPCHECK --force lib -ilib/TimeLib
check_skip_packages = yes
test_build_src = yes
# activate for OTA Update, use the CALLSIGN from is-cfg.json as upload_port:
#upload_protocol = espota
#upload_port = <CALLSIGN>.local
check_flags =
--suppressions-list=suppressions.txt
--inline-suppr
[env:lora_board]
board = esp32doit-devkit-v1
build_flags = -Werror -Wall -DUNITY_INCLUDE_PRINT_FORMATTED
;check_flags = cppcheck: --std=c++20 --suppress=*:*.pio\* --inline-suppr --suppress=unusedFunction --suppress=shadowFunction:*TimeLib.cpp --suppress=unreadVariable:*TimeLib.cpp --suppress=badBitmaskCheck:*project_configuration.cpp
;test_build_src = yes
[env:lora_v3_board]
board = heltec_wifi_lora_32_V3
build_flags = -Werror -Wall -DUNITY_INCLUDE_PRINT_FORMATTED
[arduino_base]
framework = arduino
lib_deps =
${env.lib_deps}
[env:lora_board_debug]
board = esp32doit-devkit-v1
build_flags = -Werror -Wall -DCORE_DEBUG_LEVEL=5 -DUNITY_INCLUDE_PRINT_FORMATTED
build_type = debug
build_flags = ${env.build_flags} -Os -DRADIOLIB_SPI_PARANOID=0
build_src_filter = ${env.build_src_filter} -<platform/portduino/>
;[env:lora_board]
;board = esp32doit-devkit-v1
;build_flags = -Werror -Wall -DUNITY_INCLUDE_PRINT_FORMATTED
;
;[env:lora_v3_board]
;board = heltec_wifi_lora_32_V3
;build_flags = -Werror -Wall -DUNITY_INCLUDE_PRINT_FORMATTED
;
;[env:lora_board_debug]
;board = esp32doit-devkit-v1
;build_flags = -Werror -Wall -DCORE_DEBUG_LEVEL=5 -DUNITY_INCLUDE_PRINT_FORMATTED
;build_type = debug

49
suppressions.txt 100644
Wyświetl plik

@ -0,0 +1,49 @@
// cppcheck suppressions
assertWithSideEffect
// TODO: need to come back to these
//duplInheritedMember
// TODO:
// "Using memset() on struct which contains a floating point number."
// tried:
// if (std::is_floating_point<T>::value) {
// p = 0;
// in src/mesh/MemoryPool.h
//memsetClassFloat
//knownConditionTrueFalse
// no real downside/harm in these
//unusedFunction
//unusedPrivateFunction
// most likely due to a cppcheck configuration issue (like missing an include)
//syntaxError
// try to quiet a few
//useInitializationList:src/main.cpp
//useInitializationList
// I don't want to go back and cast function pointers just to appease a tools insatiable thirst for immutability
//constParameterCallback
//redundantInitialization
//cstyleCast:src/mesh/MemoryPool.h:71
//cstyleCast
// ignore stuff that is not ours
*:.pio/*
*:*/libdeps/*
*:*/generated/*
//noExplicitConstructor:*/mqtt/*
//postfixOperator:*/mqtt/*
// these two caused issues
//missingOverride
//virtualCallInConstructor
//passedByValue:*/RedirectablePrint.h
//internalAstError:*/CrossPlatformCryptoEngine.cpp

Wyświetl plik

@ -0,0 +1,7 @@
[env:tlora-v2]
extends = esp32_base
board = ttgo-lora32-v1
board_level = extra
build_flags =
${esp32_base.build_flags} -D TLORA_V2 -I variants/tlora_v2

Wyświetl plik

@ -0,0 +1,18 @@
#define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
#define ADC_CHANNEL ADC1_GPIO35_CHANNEL
#define I2C_SDA 21 // I2C pins for this board
#define I2C_SCL 22
#define VEXT_ENABLE 21 // active low, powers the oled display and the lora antenna boost
#define LED_PIN 25 // If defined we will blink this LED
#define BUTTON_PIN \
0 // If defined, this will be used for user button presses, if your board doesn't have a physical switch, you can wire one
// between this pin and ground
#define BUTTON_NEED_PULLUP
#define USE_RF95
#define LORA_DIO0 26 // a No connect on the SX1262 module
#define LORA_RESET 14
#define LORA_DIO1 33 // Must be manually wired: https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436
#define LORA_DIO2 32 // Not really used