fix_bsec_lib.py 567 B

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