While setting up the RAK3401 target, two critical configuration and build issues were identified:
- Missing / Incomplete Board Pin Mappings:
- The RAK3401 variant definition lacks key standard pin assignments for onboard/WisBlock Slot I2C communication (
PIN_BOARD_SDA=13, PIN_BOARD_SCL=14) as well as dedicated GPS UART pins.
- Without these explicit definitions, attached I2C sensors (e.g., BME series) and GPS modules fail to initialize or require manual overrides in user code.
- nRF52840 BSEC Library Linker Error:
- When compiling MeshCore with
ENV_INCLUDE_BME680_BSEC=1 for nRF52840 targets, the build fails during the linking stage.
- Root Cause: Bosch provides the pre-compiled BSEC library with a soft-float ABI, whereas the nRF52840 toolchain compiles with hardware floating-point support (
-mfloat-abi=hard). This ABI mismatch causes GCC/ld to throw a fatal architecture/ABI conflict error.
Proposed Solution: Pull Request #2716
Pull Request #2716 addresses both issues cleanly:
-
Board Definition Update (rak3401):
- Corrects and completes the pin mapping for
PIN_BOARD_SDA, PIN_BOARD_SCL, and GPS TX/RX interfaces according to the RAK WisBlock schematic.
-
Automated BSEC Patch Script (fix_bsec_lib.py):
- Adds a extra script / patch helper in PlatformIO that patch-sets/handles the ABI flag for the BSEC static library specifically for nRF52840 build steps, allowing
-mfloat-abi=hard builds to link smoothly without throwing architecture mismatch errors.
Related Links / PR
While setting up the RAK3401 target, two critical configuration and build issues were identified:
PIN_BOARD_SDA=13,PIN_BOARD_SCL=14) as well as dedicated GPS UART pins.ENV_INCLUDE_BME680_BSEC=1for nRF52840 targets, the build fails during the linking stage.-mfloat-abi=hard). This ABI mismatch causes GCC/ld to throw a fatal architecture/ABI conflict error.Proposed Solution: Pull Request #2716
Pull Request #2716 addresses both issues cleanly:
Board Definition Update (
rak3401):PIN_BOARD_SDA,PIN_BOARD_SCL, and GPS TX/RX interfaces according to the RAK WisBlock schematic.Automated BSEC Patch Script (
fix_bsec_lib.py):-mfloat-abi=hardbuilds to link smoothly without throwing architecture mismatch errors.Related Links / PR