Problems With ARM libmpllib.a

By beli , 11 November 2014

I'm working to integrate libmpllib.a with my Cortex-M4 (TI TIVA) board and MPU-9250 EVB. I've made good progress but have hit an issue where a function implemented in the library is causing a fault.

I have integrated the Cortex-m4 version of the library with my code using arm-gcc as such:

-mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -gdwarf-2 -fmessage-length=0 -g3 -ffunction-sections -fdata-sections -std=c99 -Wall -Dgcc -DPART_TM4C123GH6PM -DTARGET_IS_BLIZZARD_RB1 -DEMPL -DEMPL_TARGET_TIVA -DMPU9250 -Os -Isrc -Wl,--gc-sections

I've had to use the softfp setting as I get the following errors if I set it hard:

error: build/sensor.axf uses VFP register arguments, src/motion/mpl/libmpllib.a(mag_disturb.o) does not

This differs from the documentation and I'm not sure why. I point it out here as I'm not sure this libmpllib.a is valid. When I compile with softfp I can compile without error and begin the startup process. This is where I run into problems.

I see good I2C traffic flowing and and can call without error the following:

mpu_init
inv_init_mpl
inv_enable_quaternion
inv_enable_9x_sensor_fusion
inv_enable_fast_nomot
inv_start_mpl

When I add the call to inv_enable_gyro_tc and before calling inv_start_mpl, I get a fault. Since the code is in the library, it's rather hard to debug.

Has anyone gotten the libmpllib working with arm-gcc and a Cortex-M4?

phpbb Topic ID
16725