cancel
Showing results for 
Search instead for 
Did you mean: 

Use MotionFX with Keil

Mezzo
Associate II

Hi to all,

I'm doing a Keil project using the MotionFX library contained in the xCube-mems1 v6.0.1, the project run a STM32F407ZG.

I've enabled the CRC clock, I've added the library "MotionFX_CM4F_wc16_ot.a", I've enabled the FPU unit.

I can build the project, I can Initialize the library and it gets me a valid lib version, but the sensor fusion algorithm doesn't work, it return 0.0 for any euler angles, and for any gyro bias values

The code works with Atollic, but I need to use Keil, any suggestion?

5 REPLIES 5
Eleon BORLINI
ST Employee

Hi, is it only the MotionFX algorithm that doesn't seem to work with Keil or you also cannot read the sensors? Did you check if Keil options are set compatible with Atollic ones? I'll check with our SW experts and come back to you. Regards

Eleon BORLINI
ST Employee

in the meantime pls check if you have an error similar to the one at this link for libPDMFilter. Regards

Mezzo
Associate II

I can read sensors with Keil. I tried also MotionGC, it works both on Atollic and Keil (Iar v5), it seems an fpu error, I cannot enable mix HW/SW fpu implementation with Keil

Miroslav BATEK
ST Employee

Hello @Mezzo,

The libraries age compiled by GCC in EABI format so they are compatible with different IDEs. The compiler option for FPU is softfp.

Could you please check our DatalogFusion project which is available in X-CUBE-MEMS1. This project is available also for Keil and it works.

You can compare the project settings.

One another idea, do you have enough stack size?

Mezzo
Associate II

I tried to compare the two keil project options but I can't figure out the differences, I used DataLogFusion as example to write my code, as I said previously the same code works in Atollic. I'll try to port the example code to my board it's an Olimex stm32-p407