2022-01-06 06:08 AM
Hello,
It seems that the library MotionMC_CM7F_wc32_ot_hard.a is missing the called function, here the error :
c:\st\stm32cubeide_1.6.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.win32_2.0.0.202105311346\tools\arm-none-eabi\bin\ld.exe: ../Middlewares/ST/STM32_MotionMC_Library/Lib\MotionMC_CM7F_wc32_ot_hard.a(motion_mc.o): in function `MotionMC_Initialize':
motion_mc.c:(.text.MotionMC_Initialize+0xde): undefined reference to `MotionMC_SaveCalInNVM'
c:\st\stm32cubeide_1.6.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.win32_2.0.0.202105311346\tools\arm-none-eabi\bin\ld.exe: motion_mc.c:(.text.MotionMC_Initialize+0x1fc): undefined reference to `MotionMC_LoadCalFromNVM'
I'm just doing like the example, I erased and reinstalled MEMS and this library at the previous version but nothing changes, can you help me ?
Here the call :
#define VERSION_STR_LENGTH 35
#define SAMPLE_TIME 20
/* Magnetometer calibration API initialization function */
MotionMC_Initialize(SAMPLE_TIME, 1);
Solved! Go to Solution.
2022-01-06 06:28 AM
Please add following function in your code.
// NOTE: Must be implemented for each platform separately, because its implementation
// is platform dependent. No need to call this function, library call this
// function automatically.
/**
* @brief Load the calibration parameters from storage
* @param dataSize size of data
* @param data pointer to data
* @retval Will return 0 the if it is success and 1 if it is failure
*/
char MotionMC_LoadCalFromNVM(unsigned short int datasize, unsigned int *data)
{
return 1; /* FAILURE: Read from NVM not implemented. */
}
// NOTE: Must be implemented for each platform separately, because its implementation
// is platform dependent. No need to call this function, library call this
// function automatically.
/**
* @brief Save the calibration parameters in storage
* @param dataSize size of data
* @param data pointer to data
* @retval Will return 0 the if it is success and 1 if it is failure
*/
char MotionMC_SaveCalInNVM(unsigned short int datasize, unsigned int *data)
{
return 1; /* FAILURE: Write to NVM not implemented. */
}
2022-01-06 06:28 AM
Please add following function in your code.
// NOTE: Must be implemented for each platform separately, because its implementation
// is platform dependent. No need to call this function, library call this
// function automatically.
/**
* @brief Load the calibration parameters from storage
* @param dataSize size of data
* @param data pointer to data
* @retval Will return 0 the if it is success and 1 if it is failure
*/
char MotionMC_LoadCalFromNVM(unsigned short int datasize, unsigned int *data)
{
return 1; /* FAILURE: Read from NVM not implemented. */
}
// NOTE: Must be implemented for each platform separately, because its implementation
// is platform dependent. No need to call this function, library call this
// function automatically.
/**
* @brief Save the calibration parameters in storage
* @param dataSize size of data
* @param data pointer to data
* @retval Will return 0 the if it is success and 1 if it is failure
*/
char MotionMC_SaveCalInNVM(unsigned short int datasize, unsigned int *data)
{
return 1; /* FAILURE: Write to NVM not implemented. */
}
2022-01-06 07:49 AM
Thank you, it works.