Skip to content

RAK3401: Missing I2C/GPS pin definitions & nRF52840 BSEC linker failure #3292

Description

@martenumberto

While setting up the RAK3401 target, two critical configuration and build issues were identified:

  1. 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.
  2. 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:

  1. 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.
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions