This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

InvenSense motion driver porting problem: Undefined symbol _MLPrintLog (referred from data_builder.o).

Hello everyone,

I am currently working on porting the InvenSense motion driver 6.12 to nrf52840pdk.

I followed porting guide provided by InvenSense. However, I met the error when I included eMPL_outputs.c, the error message shows as below:

.\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol _MLPrintLog (referred from data_builder.o).

I've checked that this symbol can be found in ...\eMD-6.0\core\driver\include\log.h, and I have added all the head files to the include paths.

There's no relative description about this on the porting guide. Has anyone got any idea?

My project can be found here.

Thanks in advance.

Parents
  • Hello,

    The reason this error appears when you add eMPL_outputs.c is that this file has #include "data_builder.h". data_builder.c has #include "log.h", which has a function, _MLPrintLog() which is not defined anywhere in your project. 

    I see that this function is defined two places in your project folder. "log_msp430.c" and "log_stm32.c". I can't find anything for Nordic's nRF.

    What you can do is to create a new file, e.g. log_nrf52.c, where you forward the _MLPrintLog() function to NRF_LOG_INFO() to see the output. Remember to enable logging in sdk_config.h.

    Best regards,

    Edvin

Reply
  • Hello,

    The reason this error appears when you add eMPL_outputs.c is that this file has #include "data_builder.h". data_builder.c has #include "log.h", which has a function, _MLPrintLog() which is not defined anywhere in your project. 

    I see that this function is defined two places in your project folder. "log_msp430.c" and "log_stm32.c". I can't find anything for Nordic's nRF.

    What you can do is to create a new file, e.g. log_nrf52.c, where you forward the _MLPrintLog() function to NRF_LOG_INFO() to see the output. Remember to enable logging in sdk_config.h.

    Best regards,

    Edvin

Children
  • Dear Edvin,

    Thank you for your reply! You are absolutely right, I did not notice the function was not defined since it is not mentioned in the porting guide. 

    I followed your advice and define the _MLPringLog() in my own c file by rewriting the function definition found in "log_stm32.c", using NRF_LOG_INFO(), and then my project can compile without errors.

    Thank you very much!

Related