Skip to main content
Visitor II
May 16, 2019
Question

Use MotionFX with Keil

  • May 16, 2019
  • 5 replies
  • 1130 views

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?

    This topic has been closed for replies.

    5 replies

    ST Employee
    May 17, 2019

    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

    ST Employee
    May 17, 2019

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

    MezzoAuthor
    Visitor II
    May 17, 2019

    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

    ST Employee
    May 20, 2019

    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?

    MezzoAuthor
    Visitor II
    May 20, 2019

    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