cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to get MotionAC and MotionFX to link to my .elf for NUCLEO-G474RE

WrenchInTheWorks
Associate

Hello,

First forum post so I apologise if I miss any key information. I'm trying to use NUCLEO-G474RE to test out the functionality of MotionAC using CubeMX to generate the program structure and Clion to edit it. All I am doing right now is trying to call:

MotionAC_Initialize(1);

 However I get back that:

undefined reference to `MotionAC_Initialize'

This lead me to add the following to the CMake file, which I feel like I should not have to, is the CMake file generated by Clion or CubeMX? (a very basic question I know but I'm new to this) It's also of note that I enabled hardware floating point in the make file as well.

target_link_libraries(${PROJECT_NAME}.elf ${CMAKE_SOURCE_DIR}/Middlewares/ST/STM32_MotionAC_Library/Lib/MotionAC_CM4F_wc32_ot_hard.a) 

 After adding that line it pulls in the .a file (I'm working on macOS) it seams to throw an error inside the library. 

in function `MotionAC_Initialize':
motion_ac.c:(.text.MotionAC_Initialize+0xbc): undefined reference to `MotionAC_SaveCalInNVM'

I feel like I should not have to put so much effort into this to make it work and that I'm just making simple mistakes, so please correct me where I have gone wrong! I will upload the IOC file and CMake bellow. 

Cheers,

Michael

0 REPLIES 0