Added BSEC to BME680

This commit is contained in:
Kevin Le committed 2026-09-08 16:40:17 +07:00
1 parent 54a79f4a5f
commit 5965010f6b
2 files changed
+20

No files matched your search

+15
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])
+5
View File
@@ -3,6 +3,8 @@ extends = nrf52_base
board = rak3401
board_check = true
board_build.ldscript = boards/nrf52840_s140_v6.ld
extra_scripts = ${nrf52_base.extra_scripts}
post:variants/rak3401/fix_bsec_lib.py
build_flags = ${nrf52_base.build_flags}
${sensor_base.build_flags}
-I variants/rak3401
@@ -18,6 +20,8 @@ build_flags = ${nrf52_base.build_flags}
-D FORCE_GPS_ALIVE ; on RAK3401, gpsResetPin ends up = WB_IO2 (kills 3V3_S rail) or
; pin 4 (= SX126X_RESET, holds radio in reset). stop_gps() must not run.
-D PIN_GPS_EN=-1 ; -1 = no dedicated GPS enable pin (power is the shared 3V3_S rail), same as rak4631
-UENV_INCLUDE_BME680
-D ENV_INCLUDE_BME680_BSEC=1
build_src_filter = ${nrf52_base.build_src_filter}
+<../variants/rak3401>
+<helpers/sensors>
@@ -28,6 +32,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_3401_repeater]
extends = rak3401