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.

Build error while building runtime library.

Other Parts Discussed in Thread: PGA900
I am using CCS6 and using runtime library(rtsv6M0_T_le_eabi.lib) built for 16bit. I need library with complete 32bit arithmetic support. I tried to built the library as mentioned on wiki at page (http://processors.wiki.ti.com/index.php/Mklib), but it failed. It is throwing error mention object files are not present.
 
Could you please let me know the complete procedure of setting the environment for this build  and building the library.
  • The Cortex-M0 device only supports Thumb2 instructions.  It does not support 32-bit ARM instructions.  I'm sure that is the root cause as to why your library build failed.

    It is likely the tools could have failed more gracefully than they did.  Please capture the invocation of mklib and all of its output in a text file, and attach that file to your next post.

    Thanks and regards,

    -George

  • The fact that the library you are using is Thumb does not affect whether it can handle 32-bit arithmetic. Could you explain a little bit more about what "32bit arithmetic support" this library does not support? Exactly which library are you trying to build?
  • I want to perform arithmetic operation on variables of 'double' data type specially the multiplication and division operation. Currently if double variable is used in multiplication result is coming zero or infinite. If i do the same operation with float variable it is working fine. But as in my software very large/very small values are involved so i have to use variable of double data type. I thought that the as library is build with 16bit version of multiplication code so my calculation results are zero. So i wanted to try with 32 bit version.

    I have also attached the error which is received while building the runtime library.

    Regards,

    Abhimanyu

    3482.log.txt
    
    D:\Abhi\build_library\ti-cgt-arm_5.2.4\lib>mklib --all > d:\log.txt
    process_begin: CreateProcess(NULL, armcl eh_util.cpp -O --embed_icode --keep_asm
     --diag_warning=225 --quiet -mv7M4 --fp_mode=strict --no_visible_enums -mt -c --
    ti_lib --keep_unneeded_types=false -me --embedded_constants=off --stellaris_cach
    e_si_workaround --float_support=fpalib --abi=ti_arm9_abi -fg --rtti --exceptions
     --building_runtime -Id:/abhi/build_library/ti-cgt-arm_5.2.4/lib/src -fr c:/user
    s/x0230048/appdata/local/temp/ti_mkliba9rtri/obj -fs c:/users/x0230048/appdata/l
    ocal/temp/ti_mkliba9rtri/obj -ft c:/users/x0230048/appdata/local/temp/ti_mkliba9
    rtri/obj, ...) failed.
    process_begin: CreateProcess(NULL, armcl throw_edg.cpp -O --embed_icode --keep_a
    sm --diag_warning=225 --quiet -mv7M4 --fp_mode=strict --no_visible_enums -mt -c
    --ti_lib --keep_unneeded_types=false -me --embedded_constants=off --stellaris_ca
    che_si_workaround --float_support=fpalib --abi=ti_arm9_abi -fg --rtti --exceptio
    ns --building_runtime -Id:/abhi/build_library/ti-cgt-arm_5.2.4/lib/src -fr c:/us
    ers/x0230048/appdata/local/temp/ti_mkliba9rtri/obj -fs c:/users/x0230048/appdata
    /local/temp/ti_mkliba9rtri/obj -ft c:/users/x0230048/appdata/local/temp/ti_mklib
    a9rtri/obj, ...) failed.
    make (e=2): The system cannot find the file specified.
    gmake.exe: *** [c:/users/x0230048/appdata/local/temp/ti_mkliba9rtri/obj/eh_util.
    obj] Error 2
    gmake.exe: *** Waiting for unfinished jobs....
    make (e=2): The system cannot find the file specified.
    gmake.exe: *** [c:/users/x0230048/appdata/local/temp/ti_mkliba9rtri/obj/throw_ed
    g.obj] Error 2
    >> ERROR: mklib: gmake error during rtsv7M4_T_le_xo_tiarm9_csw_eh.lib build
    
    
    
    D:\Abhi\build_library\ti-cgt-arm_5.2.4\lib>mklib --pattern=rtsv6M0_T_le_eabi.lib
    
    armcl array_del.cpp -O --embed_icode --keep_asm --diag_warning=225 --quiet  -mv6
    m0 --asm_define __small_divide__ --abi=eabi --fp_mode=strict --no_visible_enums
    -mt -c --ti_lib --keep_unneeded_types=false -me  -fg --rtti --building_runtime -
    Id:/abhi/build_library/ti-cgt-arm_5.2.4/lib/src -fr c:/users/x0230048/appdata/lo
    cal/temp/ti_mklibcfoqbb/obj -fs c:/users/x0230048/appdata/local/temp/ti_mklibcfo
    qbb/obj -ft c:/users/x0230048/appdata/local/temp/ti_mklibcfoqbb/obj
    process_begin: CreateProcess(NULL, armcl array_del.cpp -O --embed_icode --keep_a
    sm --diag_warning=225 --quiet -mv6m0 --asm_define __small_divide__ --abi=eabi --
    fp_mode=strict --no_visible_enums -mt -c --ti_lib --keep_unneeded_types=false -m
    e -fg --rtti --building_runtime -Id:/abhi/build_library/ti-cgt-arm_5.2.4/lib/src
     -fr c:/users/x0230048/appdata/local/temp/ti_mklibcfoqbb/obj -fs c:/users/x02300
    48/appdata/local/temp/ti_mklibcfoqbb/obj -ft c:/users/x0230048/appdata/local/tem
    p/ti_mklibcfoqbb/obj, ...) failed.
    armcl array_new.cpp -O --embed_icode --keep_asm --diag_warning=225 --quiet  -mv6
    m0 --asm_define __small_divide__ --abi=eabi --fp_mode=strict --no_visible_enums
    -mt -c --ti_lib --keep_unneeded_types=false -me  -fg --rtti --building_runtime -
    Id:/abhi/build_library/ti-cgt-arm_5.2.4/lib/src -fr c:/users/x0230048/appdata/lo
    cal/temp/ti_mklibcfoqbb/obj -fs c:/users/x0230048/appdata/local/temp/ti_mklibcfo
    qbb/obj -ft c:/users/x0230048/appdata/local/temp/ti_mklibcfoqbb/obj
    process_begin: CreateProcess(NULL, armcl array_new.cpp -O --embed_icode --keep_a
    sm --diag_warning=225 --quiet -mv6m0 --asm_define __small_divide__ --abi=eabi --
    fp_mode=strict --no_visible_enums -mt -c --ti_lib --keep_unneeded_types=false -m
    e -fg --rtti --building_runtime -Id:/abhi/build_library/ti-cgt-arm_5.2.4/lib/src
     -fr c:/users/x0230048/appdata/local/temp/ti_mklibcfoqbb/obj -fs c:/users/x02300
    48/appdata/local/temp/ti_mklibcfoqbb/obj -ft c:/users/x0230048/appdata/local/tem
    p/ti_mklibcfoqbb/obj, ...) failed.
    make (e=2): The system cannot find the file specified.
    gmake.exe: *** [c:/users/x0230048/appdata/local/temp/ti_mklibcfoqbb/obj/array_de
    l.obj] Error 2
    gmake.exe: *** Waiting for unfinished jobs....
    make (e=2): The system cannot find the file specified.
    gmake.exe: *** [c:/users/x0230048/appdata/local/temp/ti_mklibcfoqbb/obj/array_ne
    w.obj] Error 2
    >> ERROR: mklib: gmake error during rtsv6M0_T_le_eabi.lib build
    
    
     

  • The library you are using, rtsv6M0_T_le_eabi.lib, can perform double float operations just fine. If you are getting an incorrect value from multiplication, that would be a bug, and it probably cannot be fixed by using a different version of the library. Let's look at the bug you are facing. Can you provide an example of two double values which when multiplied come out as zero or infinite, but should not? (Note: from the log file, you're apparently using TI ARM compiler version 5.2.4.)

    If you're still trying to build libraries, please have a look at the following wiki page which describes several problems you can encounter when building libraries. This error message seems similar to some of the problems described there.

    processors.wiki.ti.com/.../Mklib
  • Please find attachment of snapshot of CCS6 for multiplication of long value and storing it in double value.

    'HoldCJTValue' is of type long and 'CJT' is array of type double. 

    value of 'HoldCJTValue'  is 53 for this , CJT[0] value shall be 2809, which is there,

    CJT[1] shall be 7890481 but is infinity, CJT[2] shall be 62259690411361 but it is again infinity.

  • Please open a memory browser to address &CJT and post the contents of the array here.
  • Below is the snapshot of memory browser and content of array is 


    00000000 40A5F200 00000000 7FF00000 00000000 7FF00000

  • We thought it was an error in how CCS displayed the double values.  That is not the case.

    I cannot reproduce your results.  If you can, please package up your project and attach it to your next post.  If that is not possible, then preprocess pga900_app.c and attach that.  We also need to know the version of the compiler (not CCS) and the exact build options used.

    Thanks and regards,

    -George

  • Please find attachment of project. It contains pga900_main.c, where the calculation is performed.

    snapshot of arrays is also attached, from the snapshot it is very clear that only with float values calculation is yielding correct result.

    Compiler version used is TI_v_5.2.4.code.7z

  • I don't know precisely what is going on, but it seems to have to do with little-endian.  I get a bogus "+Inf" result for the following test case:

    /* armcl -Ooff -mv6m0 -me test.c */
    #include <stdio.h>
    
    double a = 4;
    double b = 5;
    
    int main()
    {
        printf("%f\n", a * b);
    }
    

    By the way, you seem to be linking against the 5.1.1 compiler RTS; you should always link against the exact version of the RTS that matches the linker. I don't think this is the source of today's problem, but it could become a problem in the future.

    [ This is now SDSCM00052216 -- Archaeologist ]

  • I tried to build the RTS as per the procedure mentioned on the link 

    but I am getting the error as mentioned earlier.

    Could you please build the rtsv6M0_T_le_eabi.lib for this version of compiler and share it.

  • Abhimanyu Kumar said:
    but I am getting the error as mentioned earlier.

    I presume you mean the error where object files are missing.  Do you have write permission in the directory where the compiler libraries reside?  If that is not the error you see, please post exactly how you invoke mklib and the full system response.

    Abhimanyu Kumar said:
    Could you please build the rtsv6M0_T_le_eabi.lib for this version of compiler and share it.

    I resist this request because this solution does not scale.  While it may come to that, I prefer to first spend more effort on finding the root cause of this build failure.

    Thanks and regards,

    -George

  • I tried to follow the same steps of building the library but it failed. So I copied all the executable in one lib/src folder and built, what i observed that object files are generated but it fails to combine the object files to make library.

    Requesting  you to please share the video for building the library on windows machine with CCS6., compiler version 5.2.5

    It will be really helpful for me to correct mistake if any.

    Thanks,

    Abhi

  • Our best information on building custom libraries is in the mklib wiki article you already know about.  I don't know what could be wrong.  This thread has been going on for quite a while.  While I still want to know the root cause of this problem, it is past time to get you a working library.  It is attached below, in .zip form.

    Thanks and regards,

    -George

    rtsv6M0_T_le_eabi.zip

  • Thanks for sharing the runtime library.

    Now I am able to build the runtime library. Earlier compiler_bin_dir path was not getting set so the build was failing.

    Now to build the library i am using command

    mklib --pattern=rtsv6M0_T_le_eabi.lib --compiler_bin_dir=D:\ti\ccsv6\tools\compiler\ti-cgt-arm_5.2.5\bin

    earlier i was just using command

    mklib --pattern=rtsv6M0_T_le_eabi.lib.

    But, still the operation on 'double' variable is not working properly.

    I have to use function 'double atan(double x)' , it takes double value and return double. but when i am using it i am getting infinity as output.

    if i use 'flaot atanf(float x) i am getting proper value. This is happening with the new library shared by you as well as built by me.

     

    Below is the code:

    for float

    float a;

    a=atanf(1.0) * (float)(180/3.14159265);

    the value of a will be 45.0 which is desired value.

    but when i use double variant

    double a;

    a=atan(1.0) * (double)(180/3.14159265);

    i am getting infinitty as output.

    Thanks,

    Abhimanyu

  • This problem was recorded earlier in this thread.  The SDOWP tracking ID is SDSCM00052216 .  Feel free to look it up with the SDOWP link below in my signature.  Note the recommended workaround.  Please see if that works for you.

    Thanks and regards,

    -George