BMV080 HardFault on Floating-Point Instruction During Library Initialization

A HardFault exception occurs on an STM32F7 microcontroller when attempting to call bmv080_initialize from the pre-compiled library lib_postProcessor.a.

Environment:

MCU: STM32F7xx (Cortex-M7 core)

Toolchain: STM32CubeIDE (with GNU GCC) and IAR Embedded Workbench 8.4

Library: Bosch BMV080 SDK for M7 (files: lib_bmv080.a, lib_postProcessor.a) -bmv080-sdk-v11-1-0

Confirmed Technical Findings:

Faulting Instruction: The program halts at a specific instruction: VCVT.F64.F32. This is a hardware floating-point instruction.

Even after updating the IDE to its latest version (IAR 8.4) and applying all suggested settings, the HardFault persists at the same instruction. Due to this being a pre-compiled library, the exact source location is not visible, but we believe the fault occurs during the postProcessor initialization.

We would be very grateful for any potential solutions or guidance you could provide to resolve this issue. Thank you for your time and assistance.

Conclusion:

The evidence indicates a direct and confirmed incompatibility between the pre-compiled lib_postProcessor.a library and the current toolchain environment. The crash on a floating-point instruction, coupled with the compiler's rejection of a valid FPU flag and the presence of custom data sections, points to a build environment mismatch.

Action Required:

Please provide the exact IAR Embedded Workbench version and the complete set of compiler and linker flags used to build lib_postProcessor.a for Cortex-M7.

3 replies