Merge pull request #2634 from NickDunklee/bme680-fixes-consolidation

feat: Integrate BME680 Bosch BSEC support for RAK4631
This commit is contained in:
ripplebiz
2026-06-01 13:35:32 +10:00
committed by GitHub
4 changed files with 135 additions and 6 deletions

View File

@@ -0,0 +1,15 @@
Import('env')
import os
# Bosch has a goof in their PlatformIO packaging making linking fail.
# The BSEC library's extra_script.py selects cortex-m4/libalgobsec.a (soft-float ABI).
# nRF52840 compiles with -mfloat-abi=hard, requiring the fpv4-sp-d16-hard blob.
# Workaround to prepend the hard-float path so the linker finds it before the
# soft-float one.
bsec_hard = os.path.join(
env.subst('$PROJECT_DIR'),
'.pio', 'libdeps', env.subst('$PIOENV'),
'BSEC Software Library', 'src',
'cortex-m4', 'fpv4-sp-d16-hard'
)
env.Prepend(LIBPATH=[bsec_hard])

View File

@@ -2,6 +2,8 @@
extends = nrf52_base
board = rak4631
board_check = true
extra_scripts = ${nrf52_base.extra_scripts}
post:variants/rak4631/fix_bsec_lib.py
build_flags = ${nrf52_base.build_flags}
${sensor_base.build_flags}
-I variants/rak4631
@@ -21,6 +23,8 @@ build_flags = ${nrf52_base.build_flags}
-D SX126X_CURRENT_LIMIT=140
-D SX126X_RX_BOOSTED_GAIN=1
-D ENV_INCLUDE_RAK12035=1
-UENV_INCLUDE_BME680
-D ENV_INCLUDE_BME680_BSEC=1
build_src_filter = ${nrf52_base.build_src_filter}
+<../variants/rak4631>
+<helpers/sensors>
@@ -31,6 +35,7 @@ lib_deps =
${sensor_base.lib_deps}
adafruit/Adafruit SSD1306 @ ^2.5.13
sparkfun/SparkFun u-blox GNSS Arduino Library@^2.2.27
boschsensortec/BSEC Software Library @ ^1.8.1492
[env:RAK_4631_repeater]
extends = rak4631