Skip to content

Commit

Permalink
Merge pull request #344 from lora-aprs/remove_board_finder
Browse files Browse the repository at this point in the history
Remove board finder, add support for AXP2101 and T-Beam-S3-Core
  • Loading branch information
peterus authored Sep 13, 2024
2 parents e262eca + 1b27f7f commit e922af2
Show file tree
Hide file tree
Showing 40 changed files with 682 additions and 587 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/build_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
jobs:
build:
name: Compile Firmware
strategy:
matrix:
boards: [heltec-v1, tlora-v1, tbeam, t_internet_poe, heltec-v3, tlora-v2, heltec-v2_0, tbeam-s3-core, tbeam_axp2101]
runs-on: ubuntu-latest
steps:
- uses: actions/cache@v4
Expand All @@ -27,12 +30,12 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Build PlatformIO Project
run: pio run
run: pio run -e ${{ matrix.boards }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: firmware
path: .pio/build/lora_board/firmware.bin
name: firmware_${{ matrix.boards }}
path: .pio/build/**/firmware.bin

formatting-check:
name: Formatting Check
Expand Down Expand Up @@ -68,7 +71,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Run PlatformIO Check
run: pio check --fail-on-defect high --fail-on-defect medium --fail-on-defect low -e lora_board
run: pio check --fail-on-defect high --fail-on-defect medium --fail-on-defect low

cppcheck-docker:
name: Run cppcheck in Docker
Expand Down
20 changes: 0 additions & 20 deletions .github/workflows/dependabot.yml

This file was deleted.

6 changes: 4 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
"streambuf": "cpp",
"cinttypes": "cpp",
"utility": "cpp",
"typeinfo": "cpp"
"typeinfo": "cpp",
"string": "cpp",
"string_view": "cpp"
}
}
}
25 changes: 25 additions & 0 deletions arch/esp32/esp32.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
; Common settings for ESP targes, mixin with extends = esp32_base
[esp32_base]
extends = arduino_base
platform = platformio/espressif32 @ 6.8.1

build_src_filter =
${arduino_base.build_src_filter}

upload_speed = 921600
monitor_filters = esp32_exception_decoder

;board_build.filesystem = littlefs

build_flags =
${arduino_base.build_flags}
-Wall
; -Wextra
-Isrc/platform/esp32
-std=c++2a
-DLOG_LOCAL_LEVEL=ESP_LOG_DEBUG
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
-DAXP_DEBUG_PORT=Serial

lib_deps =
${arduino_base.lib_deps}
2 changes: 2 additions & 0 deletions arch/esp32/esp32s3.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[esp32s3_base]
extends = esp32_base
45 changes: 45 additions & 0 deletions boards/tbeam-s3-core.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"build": {
"arduino": {
"ldscript": "esp32s3_out.ld"
},
"core": "esp32",
"extra_flags": [
"-DBOARD_HAS_PSRAM",
"-DLILYGO_TBEAM_S3_CORE",
"-DARDUINO_USB_CDC_ON_BOOT=1",
"-DARDUINO_RUNNING_CORE=1",
"-DARDUINO_EVENT_RUNNING_CORE=1"
],
"f_cpu": "240000000L",
"f_flash": "80000000L",
"flash_mode": "qio",
"hwids": [
[
"0X303A",
"0x1001"
]
],
"mcu": "esp32s3",
"variant": "tbeam-s3-core"
},
"connectivity": [
"wifi"
],
"debug": {
"openocd_target": "esp32s3.cfg"
},
"frameworks": [
"arduino"
],
"name": "LilyGo TBeam-S3-Core",
"upload": {
"flash_size": "8MB",
"maximum_ram_size": 327680,
"maximum_size": 8388608,
"require_upload_port": true,
"speed": 921600
},
"url": "http://www.lilygo.cn/",
"vendor": "LilyGo"
}
75 changes: 52 additions & 23 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,50 @@
; 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.8.1
framework = arduino
lib_ldf_mode = deep+
;extra_scripts = bin/platformio-custom.py

build_flags =
-Wl,-Map,.pio/build/output.map
-DRADIOLIB_EXCLUDE_CC1101
-DRADIOLIB_EXCLUDE_NRF24
-DRADIOLIB_EXCLUDE_RF69
-DRADIOLIB_EXCLUDE_SX1231
-DRADIOLIB_EXCLUDE_SI443X
-DRADIOLIB_EXCLUDE_RFM2X
-DRADIOLIB_EXCLUDE_RFM9X
-DRADIOLIB_EXCLUDE_SX128X
-DRADIOLIB_EXCLUDE_AFSK
-DRADIOLIB_EXCLUDE_AX25
-DRADIOLIB_EXCLUDE_HELLSCHREIBER
-DRADIOLIB_EXCLUDE_MORSE
-DRADIOLIB_EXCLUDE_RTTY
-DRADIOLIB_EXCLUDE_SSTV
-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 @ 7.1.0
lewisxhe/AXP202X_Library @ 1.1.3
lewisxhe/XPowersLib @ 0.1.8
peterus/APRS-Decoder-Lib @ 0.0.6
peterus/esp-logger @ 1.0.0
peterus/ESP-FTP-Server-Lib @ 0.14.1
Expand All @@ -28,22 +61,18 @@ lib_deps =
shaggydog/OneButton @ 1.5.0
jgromes/RadioLib @ 6.6.0
check_tool = cppcheck
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
check_skip_packages = yes
check_flags =
--suppressions-list=suppressions.txt
--inline-suppr

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

[env:lora_board]
board = esp32doit-devkit-v1
build_flags = -Werror -Wall -DUNITY_INCLUDE_PRINT_FORMATTED -DCONFIG_ETH_ENABLED

[env:lora_v3_board]
board = heltec_wifi_lora_32_V3
build_flags = -Werror -Wall -DUNITY_INCLUDE_PRINT_FORMATTED -DCONFIG_ETH_ENABLED

[env:lora_board_debug]
board = esp32doit-devkit-v1
build_flags = -Werror -Wall -DCORE_DEBUG_LEVEL=5 -DUNITY_INCLUDE_PRINT_FORMATTED -DCONFIG_ETH_ENABLED
build_type = debug

[arduino_base]
framework = arduino
lib_deps =
${env.lib_deps}

build_flags = ${env.build_flags} -Os
build_src_filter = ${env.build_src_filter} -<platform/portduino/>
debug_init_break = tbreak setup
26 changes: 26 additions & 0 deletions src/Board.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#include "Board.h"

String getBoardName() {
#if defined(HELTEC_V1)
return "Heltec V1";
#elif defined(HELTEC_V2_0)
return "Heltec V2";
#elif defined(HELTEC_V3)
return "Heltec V3";
#elif defined(T_INTERNET_POE)
return "T-Internet PoE";
#elif defined(TBEAM_V10)
return "T-Beam V1.0 and V1.1";
#elif defined(TBEAM_V12_AXP2101)
return "T-Beam V1.2 AXP2101";
#elif defined(TBEAM_S3_CORE)
return "T-Beam S3 Core";
#elif defined(TLORA_V1)
return "T-LoRa32 V1";
#elif defined(TLORA_V2)
return "T-LoRa32 V2";
#else
#error "Board not defined!"
#endif
return "";
}
8 changes: 8 additions & 0 deletions src/Board.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#ifndef BOARD_H_
#define BOARD_H_

#include <Arduino.h>

String getBoardName();

#endif
Loading

0 comments on commit e922af2

Please sign in to comment.