177 lines
6.2 KiB
INI
177 lines
6.2 KiB
INI
[SenseCap_Solar]
|
|
extends = nrf52_base
|
|
board = seeed_sensecap_solar
|
|
board_build.ldscript = boards/nrf52840_s140_v7.ld
|
|
build_flags = ${nrf52_base.build_flags}
|
|
${sensor_base.build_flags}
|
|
-I lib/nrf52/s140_nrf52_7.3.0_API/include
|
|
-I lib/nrf52/s140_nrf52_7.3.0_API/include/nrf52
|
|
-I variants/sensecap_solar
|
|
-I src/helpers/nrf52
|
|
-D NRF52_PLATFORM=1
|
|
-D USE_SX1262
|
|
-D RADIO_CLASS=CustomSX1262
|
|
-D WRAPPER_CLASS=CustomSX1262Wrapper
|
|
-D P_LORA_TX_LED=12
|
|
-D P_LORA_DIO_1=1
|
|
-D P_LORA_RESET=2
|
|
-D P_LORA_BUSY=3
|
|
-D P_LORA_NSS=4
|
|
-D PIN_USER_BTN=PIN_BUTTON1
|
|
-D LORA_TX_POWER=22
|
|
-D SX126X_RXEN=5
|
|
-D SX126X_TXEN=RADIOLIB_NC
|
|
-D SX126X_DIO2_AS_RF_SWITCH=1
|
|
-D SX126X_DIO3_TCXO_VOLTAGE=1.8
|
|
-D SX126X_CURRENT_LIMIT=140
|
|
-D SX126X_RX_BOOSTED_GAIN=1
|
|
-D ENV_INCLUDE_GPS=1
|
|
build_src_filter = ${nrf52_base.build_src_filter}
|
|
+<helpers/*.cpp>
|
|
+<helpers/sensors>
|
|
+<../variants/sensecap_solar>
|
|
debug_tool = jlink
|
|
upload_protocol = nrfutil
|
|
lib_deps =
|
|
${nrf52_base.lib_deps}
|
|
${sensor_base.lib_deps}
|
|
|
|
[env:SenseCap_Solar_repeater]
|
|
extends = SenseCap_Solar
|
|
; CUSTOM (TeTeHacko): the exact dependency set (sensecap_pinned below) and the
|
|
; ldscript that keeps 16 B of RAM for the hardfault record (`get boot`).
|
|
platform = ${sensecap_pinned.platform}
|
|
lib_deps = ${sensecap_pinned.lib_deps}
|
|
board_build.ldscript = boards/nrf52840_s140_v7_extrafs.ld
|
|
board_upload.maximum_size = 708608
|
|
build_flags =
|
|
${SenseCap_Solar.build_flags}
|
|
-D ADVERT_NAME='"SenseCap_Solar Repeater"'
|
|
-D ADVERT_LAT=0.0
|
|
-D ADVERT_LON=0.0
|
|
-D ADMIN_PASSWORD='"password"'
|
|
-D MAX_NEIGHBOURS=50
|
|
; CUSTOM (TeTeHacko): INA226 defaults to 0x44 = collision with the SHT41
|
|
; (false detection, garbage telemetry); 0x40 is the INA226 hardware default.
|
|
-D TELEM_INA226_ADDRESS=0x40
|
|
; GPS detection is a 1 s NMEA race that randomly loses, and then the gps
|
|
; setting is not exposed at all (no clock sync). Skip it: the board powers
|
|
; its GPS like any other.
|
|
-D ENV_SKIP_GPS_DETECT=1
|
|
; `radiostat` / `radiokick` (admin CLI): the receiver state when it goes deaf.
|
|
-D RADIO_DIAG=1
|
|
; dimmed white-LED heartbeat + OTA steady-on (repeater builds only)
|
|
-D SENSECAP_SOLAR_WHITE_LED=1
|
|
; CUSTOM (TeTeHacko): ...and off again, with the blue TX LED: a solar node in
|
|
; an enclosure blinks for no one. SenseCapSolarBoard.h.
|
|
-D SENSECAP_SOLAR_NO_LEDS=1
|
|
; -D MESH_PACKET_LOGGING=1
|
|
; -D MESH_DEBUG=1
|
|
build_src_filter = ${SenseCap_Solar.build_src_filter}
|
|
+<../examples/simple_repeater/*.cpp>
|
|
|
|
[env:SenseCap_Solar_room_server]
|
|
extends = SenseCap_Solar
|
|
build_flags =
|
|
${SenseCap_Solar.build_flags}
|
|
-D ADVERT_NAME='"SenseCap_Solar Room"'
|
|
-D ADVERT_LAT=0.0
|
|
-D ADVERT_LON=0.0
|
|
-D ADMIN_PASSWORD='"password"'
|
|
; -D MESH_PACKET_LOGGING=1
|
|
; -D MESH_DEBUG=1
|
|
build_src_filter = ${SenseCap_Solar.build_src_filter}
|
|
+<../examples/simple_room_server/*.cpp>
|
|
|
|
[env:SenseCap_Solar_companion_radio_ble]
|
|
extends = SenseCap_Solar
|
|
board_build.ldscript = boards/nrf52840_s140_v7_extrafs.ld
|
|
board_upload.maximum_size = 708608
|
|
build_flags =
|
|
${SenseCap_Solar.build_flags}
|
|
-D MAX_CONTACTS=350
|
|
-D MAX_GROUP_CHANNELS=40
|
|
-D BLE_PIN_CODE=${secrets.ble_pin}
|
|
-D OFFLINE_QUEUE_SIZE=256
|
|
; -D BLE_DEBUG_LOGGING=1
|
|
; -D MESH_PACKET_LOGGING=1
|
|
; -D MESH_DEBUG=1
|
|
build_src_filter = ${SenseCap_Solar.build_src_filter}
|
|
+<helpers/nrf52/SerialBLEInterface.cpp>
|
|
+<../examples/companion_radio/*.cpp>
|
|
lib_deps =
|
|
${SenseCap_Solar.lib_deps}
|
|
densaugeo/base64 @ ~1.4.0
|
|
|
|
[env:SenseCap_Solar_companion_radio_usb]
|
|
extends = SenseCap_Solar
|
|
board_build.ldscript = boards/nrf52840_s140_v7_extrafs.ld
|
|
board_upload.maximum_size = 708608
|
|
build_flags =
|
|
${SenseCap_Solar.build_flags}
|
|
-D MAX_CONTACTS=350
|
|
-D MAX_GROUP_CHANNELS=40
|
|
-D ENABLE_USB_INTERFACE
|
|
; -D MESH_PACKET_LOGGING=1
|
|
; -D MESH_DEBUG=1
|
|
build_src_filter = ${SenseCap_Solar.build_src_filter}
|
|
+<helpers/nrf52/SerialBLEInterface.cpp>
|
|
+<../examples/companion_radio/*.cpp>
|
|
lib_deps =
|
|
${SenseCap_Solar.lib_deps}
|
|
densaugeo/base64 @ ~1.4.0
|
|
|
|
[env:SenseCap_Solar_kiss_modem]
|
|
extends = SenseCap_Solar
|
|
build_src_filter = ${SenseCap_Solar.build_src_filter}
|
|
+<../examples/kiss_modem/>
|
|
|
|
; CUSTOM (TeTeHacko): EXACT dependency set of the SenseCap Solar repeater --
|
|
; PlatformIO has no lockfile, and upstream inherits ranges (`^2.1.5`) and an
|
|
; unpinned `platform = nordicnrf52`, so every build resolves whatever is newest
|
|
; that day: on 23. 10. 2026 one commit built 271 kB differently from the image
|
|
; that had run in the field for a week (platform 11.0.0 instead of 10.12.0,
|
|
; Adafruit GFX / INA260 / MLX90614 a patch or minor newer). These are the
|
|
; versions proven in the field; the public release builds them too.
|
|
;
|
|
; RadioLib, CustomLFS and the framework are git pins upstream and copied as is.
|
|
; ORDER MATTERS: it is the link order -- same as upstream's inheritance
|
|
; (arduino_base, nrf52_base, sensor_base), or the layout of the image changes.
|
|
; Moving to a newer upstream: if its platformio.ini changed lib_deps or the
|
|
; platform, refresh this list from a clean `pio run` (`.pio/libdeps/<env>`) and
|
|
; check the result on the bench before releasing it.
|
|
[sensecap_pinned]
|
|
platform = nordicnrf52@10.12.0
|
|
lib_deps =
|
|
SPI
|
|
Wire
|
|
https://github.com/jgromes/RadioLib.git#6d8934836678d8894e3d556550475b37dce3e2b6
|
|
rweather/Crypto @ 0.4.0
|
|
adafruit/RTClib @ 2.1.4
|
|
melopero/Melopero RV3028 @ 1.2.0
|
|
electroniccats/CayenneLPP @ 1.6.1
|
|
https://github.com/oltaco/CustomLFS#0.2.3
|
|
adafruit/Adafruit INA3221 Library @ 1.0.1
|
|
adafruit/Adafruit INA219 @ 1.2.3
|
|
robtillaart/INA226 @ 0.6.6
|
|
adafruit/Adafruit INA260 Library @ 1.5.3
|
|
adafruit/Adafruit AHTX0 @ 2.0.6
|
|
adafruit/Adafruit BME280 Library @ 2.3.0
|
|
adafruit/Adafruit BMP280 Library @ 2.6.8
|
|
adafruit/Adafruit SHTC3 Library @ 1.0.2
|
|
sensirion/Sensirion I2C SHT4x @ 1.1.2
|
|
arduino-libraries/Arduino_LPS22HB @ 1.0.3
|
|
adafruit/Adafruit MLX90614 Library @ 2.1.6
|
|
adafruit/Adafruit_VL53L0X @ 1.2.5
|
|
stevemarple/MicroNMEA @ 2.0.6
|
|
adafruit/Adafruit BME680 Library @ 2.0.6
|
|
adafruit/Adafruit BMP085 Library @ 1.2.4
|
|
; transitive (pulled in by the sensor libraries), pinned so they cannot float
|
|
adafruit/Adafruit BusIO @ 1.17.4
|
|
adafruit/Adafruit Unified Sensor @ 1.1.15
|
|
adafruit/Adafruit GFX Library @ 1.12.6
|
|
adafruit/Adafruit SSD1306 @ 2.5.17
|
|
adafruit/Adafruit SH110X @ 2.1.15
|
|
adafruit/Adafruit NeoPixel @ 1.15.5
|
|
sensirion/Sensirion Core @ 0.7.3
|