This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

cannot find -lIQMath while building diagnostics motor_test for AM437x

Other Parts Discussed in Thread: SYSBIOS

I am trying to run Diagnostic code for AM437x, here to build diagnostic code for motor support

I used following command

$export ARCH=arm
$export CROSS_COMPILE=~/Desktop/work/toolchain/gcc-arm-none-eabi-4_7-2014q2/bin/arm-none-eabi-
$PATH=$PATH:~/Desktop/work/toolchain/gcc-arm-none-eabi-4_7-2014q2/bin
$export LIB_PATH=~/Desktop/work/toolchain/gcc-arm-none-eabi-4_7-2014q2
$export STARTERWARE_ROOT=~/Desktop/work/am437x/diagnostic/diagnostic_sourcecode/starterware/

while building sourcecode/diagnostics/motor_test I got following error :

..am437x/diagnostic_sourcecode/diagnostics$ make

make -C motor_test
make[1]: Entering directory `..am437x/diagnostic/diagnostic_sourcecode/diagnostics/motor_test'
make TARGET_MODE=Debug bin -s 
make[2]: Entering directory `../Desktop/work/am437x/diagnostic/diagnostic_sourcecode/diagnostics/motor_test'

***Debug***
Compiling
Linking
arm-none-eabi-ld: cannot find -lIQMath
make[2]: *** [bin] Error 1

make[2]: Leaving directory `../Desktop/work/am437x/diagnostic/diagnostic_sourcecode/diagnostics/motor_test'
make[1]: *** [debug] Error

Here while debugging I got to know IQMatch library is not present in starterware code, If I am not wrong It should be present there or am I missing something else.

Here I have tried few Math lib from link http://www.ti.com/tool/SPRC542

http://processors.wiki.ti.com/index.php/IQmath_Library_for_C28x

But could not get success.

Can I get any help regarding this.

Thanks in advance.

Mehar

  • Hi Mehar,

    Starterware doesn't provide IQMath library, for AM437x motor control using SYSBIOS, IQMath library has been ported from C28x, see,

    downloads.ti.com/.../index_FDS.html

    Regards
    Afzal
  • Thanks Afzal,
    Here I downloaded .exe file and installed it I got a package
    containing following directory:
    am437x_sysbios_ind_sdk_02.00.00.02_sw_manifest.pdf control docs examples interfaces os_drivers protocols starterware tools

    Here now when I did grep for math I got it in directory named :
    control/math_blocks/IQmathLib.h
    but IQMath library is not present for which I can specify some path to starterware motor code
    Now what should be next step do I need to compile controls or any other steps.

    So Now how do I compile my starterware motor specific code using this package.

    Regards,
    Mehar
  • Hi Meher,

    Please contact the source from where you got the diagnostic code (which is not part of SYSBIOS Industrial SDK) to resolve your issue.

    Regards
    Afzal
  • Hi Afzal,

    I could find the library in the path mentioned by you,

    But while linking the library I got following errors :

    ../motor_test/foc.c:125: undefined reference to `_IQ24mpy'

    ../motor_test/foc.c:125: undefined reference to `_IQ24mpy'
    ../motor_test/foc.c:125: undefined reference to `_IQ24mpy'
    ../motor_test/foc.c:125: undefined reference to `_IQ24mpy'
    ../motor_test/foc.c:130: undefined reference to `_IQ24sinPU'
    ../motor_test/foc.c:130: undefined reference to `_IQ24sinPU'
    ../motor_test/foc.c:131: undefined reference to `_IQ24cosPU'
    ../motor_test/foc.c:131: undefined reference to `_IQ24cosPU'
    ../motor_test/foc.c:134: undefined reference to `_IQ24mpy'
    ../motor_test/foc.c:134: undefined reference to `_IQ24mpy'
    ../motor_test/foc.c:134: undefined reference to `_IQ24mpy'
    ../motor_test/foc.c:134: undefined reference to `_IQ24mpy'
    ../motor_test/foc.c:134: undefined reference to `_IQ24mpy'

    I tried defining above function manually, but motor test does not work after that.

    Please let me know 

    where can I get reference for the same ?

    Regards,

    Mehar