Skip to main content
Visitor II
August 17, 2020
Solved

MotionMC and MotionEC librabries initialization fail

  • August 17, 2020
  • 4 replies
  • 2468 views

Good afternoon everyone,

I currently trying to implement an application with the ECompass feature using MotionEC library (and MotionMC library to improve precision and reliability of the data).

My initialization failed (it looks like an infinit loop) inside the MotionMC_Initialize or MotionEC_Initialize functions.

I don't understand why, especially because it worked well last week.

The only thing that change between the two version is the CubeMx project, I checked and there is no difference (same pin, same name, same peripherals and same configuration).

I firstly thought that the CRC module were not well initialized, but it is not the case, everything goes well during HAL drivers and peripherals initialization.

Can someone help me understanding what is happening here ?

Thanks,

Have a nice day,

Best regards,

Julien Mongin.

    This topic has been closed for replies.
    Best answer by Miroslav BATEK

    In your Makefile I see FLOAT-ABI = -mfloat-abi=soft (line 104).

    Would you please try the compilation option -mfloat-abi=softfp because the MotionEC and MotionMC libraries are compiled with this option for mfloat-abi.

    4 replies

    ST Employee
    August 17, 2020

    Hello,

    which MCU do you use? Can you share the whole project?

    Jmong.1Author
    Visitor II
    August 17, 2020

    Hello,

    thank you for your answer,

    I am using a NUCLEO-L476RG with a X-NUCLEO-IKS01A2 (LSM303AGR magnetometer).

    I cannot attach my whole project to this message, so I give you a link to a google drive:

    Have a nice day,

    Best regards,

    Julien.

    ST Employee
    August 17, 2020

    In your Makefile I see FLOAT-ABI = -mfloat-abi=soft (line 104).

    Would you please try the compilation option -mfloat-abi=softfp because the MotionEC and MotionMC libraries are compiled with this option for mfloat-abi.

    Jmong.1Author
    Visitor II
    August 19, 2020

    Good morning,

    Thank you for your answer, everything works well now.

    Have a nice day,

    Best regards,

    Julien.

    ST Employee
    August 25, 2020

    Hi @Jmong.1​ , if the issue is solved and everything is now ok, please select Miroslav's answer as "Best", allowing future community users to easily find a solution to similar problems. Thank you and regards