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.

TMS320F280049C: Error while using _IQdiv i.e., unresolved symbol __IQ24div

Part Number: TMS320F280049C
Other Parts Discussed in Thread: CONTROLSUITE, C2000WARE

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
#include "IQmathLib.h"
#include <math.h>
#define PI 3.14159265358979
_iq test;
_iq wn;
_iq f;
__interrupt void adcISR(void) // main function
{
test = _IQdiv(_IQ(1),_IQ(2));
wn = _IQmpy(_IQ(PI),f);
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I am using _IQdiv in my program (a similar short example code is shown above).

While there is no error while using _IQmpy, for _IQdiv, the compiler is showing error as  "unresolved symbol __IQ24div, first referenced in ./adcIsr4.obj"

What I am missing here in using IQ math library??? I have included all header files required for the IQmath library and referring the IQmathquickstart guide.

  • After adding IQmath.lib as suggested in other similar queries, I am getting the following errors. Kindly provide suggestions??


    program will not fit into available memory, or the section contains a call site that requires a trampoline that can't be generated for this section. placement with alignment/blocking fails for section "IQmathTables"

    file "C:/ti/controlSUITE/libs/math/IQmath/v160/lib/IQmath.lib<IQ24div.obj>" specifies ISA revision "C2800", which is not compatible with ISA revision "C28FPU32" specified in a previous file or on the command line

    file "C:/ti/controlSUITE/libs/math/IQmath/v160/lib/IQmath.lib<IQmathTables.obj>" specifies ISA revision "C2800", which is not compatible with ISA revision "C2700" specified in a previous file or on the command line

  • On adding IQmath_fpu32.lib in place of IQmath.lib 

    I am getting the following errors: -

    #10010 errors encountered during linking; "PLL_ex4.out" not built

    #10099-D</a>  program will not fit into available memory, or the section contains a call site that requires a trampoline that can't be generated for this section. placement with alignment/blocking fails for section "IQmathTables" size 0xb50 page 0.  Available memory ranges:

  • HI,

    program will not fit into available memory, or the section contains a call site that requires a trampoline that can't be generated for this section. placement with alignment/blocking fails for section "IQmathTables"

    You need to allocate sufficient memory for the tables in the cmd file. Alternatively, you can use the IQMath tables in ROM. 

    file "C:/ti/controlSUITE/libs/math/IQmath/v160/lib/IQmath.lib<IQ24div.obj>" specifies ISA revision "C2800", which is not compatible with ISA revision "C28FPU32" specified in a previous file or on the command line

    You need to use the IQMath library that matches your project settings. FOr example, if you have fpu32 enabled, you should use the IQMath library IQmath_fpu32_eabi.lib or IQmath_fpu32_coff.lib depending on the object file format of your project.

    file "C:/ti/controlSUITE/libs/math/IQmath/v160/lib/IQmath.lib<IQmathTables.obj>" specifies ISA revision "C2800", which is not compatible with ISA revision "C2700" specified in a previous file or on the command line

    PLease make sure that project settings and all libraries support the C2800 ISA.

    #10099-D</a>  program will not fit into available memory, or the section contains a call site that requires a trampoline that can't be generated for this section. placement with alignment/blocking fails for section "IQmathTables" size 0xb50 page 0.  Available memory ranges:

    As mentioned above, it is possible that your program memory does not have space for the IQMath tables. Consider using the tables in ROM. 

    -Shantanu

  • Thank you for the response. 
    I understood that I need to use tables in ROM...Can you suggest, how to do that, I went through many answers and libraries..but unable to figure it out yet.

  • Add the bootROM symbols library from c2000ware to your project, remove IQMath tables from linker command file. Check the map file if it has been properly linked.

  • I checked in 280049C_RAM_lnk.cmd..there are no IQmathtables and on adding following bootROM symbols , again I am getting the following errors:

    <a href="file:/C:/ti/ccs1100/ccs/tools/compiler/dmed/HTML/16008.html">#16008-D</a>  file "C:/ti/controlSUITE/libs/math/IQmath/v15c/examples/bootROM_symbols/2802x_IQmath_BootROMSymbols.lib<__Release_TMS320x2802x_boot_rom_out___IQ24div_tmp.obj>" specifies ISA revision "C2800", which is not compatible with ISA revision "C28FPU32" specified in a previous file or on the command line

    #10010 errors encountered during linking; "PLL_ex4.out" not built.

    For memory BootROM symbols ...but I was able to find BootROMsymbols.lib related to 2802,3 and 6. which is again giving error as stated above.

  • Hi,

    Looks like you're adding the wrong symbols. Try adding the libs found in <c2000ware>\libraries\boot_rom\f28004x\revA\rom_symbol_libs\ROM_API\F28004xbootROM_Symbols_fpu32.lib. 

    Also, please show me the contents of your cmd file and project file settings.

    -Shantanu

  • Contents of 280049C_RAM_lnk.cmd file 

    MEMORY
    {
    PAGE 0 :
    /* BEGIN is used for the "boot to SARAM" bootloader mode */

    BEGIN : origin = 0x000000, length = 0x000002
    RAMM0 : origin = 0x0000F5, length = 0x00030B

    RAMLS0 : origin = 0x008000, length = 0x000800
    RAMLS1 : origin = 0x008800, length = 0x000800
    RAMLS2 : origin = 0x009000, length = 0x000800
    RAMLS3 : origin = 0x009800, length = 0x000800
    RAMLS4 : origin = 0x00A000, length = 0x000800
    RESET : origin = 0x3FFFC0, length = 0x000002

    PAGE 1 :

    BOOT_RSVD : origin = 0x000002, length = 0x0000F3 /* Part of M0, BOOT rom will use this for stack */
    RAMM1 : origin = 0x000400, length = 0x000400 /* on-chip RAM block M1 */

    RAMLS5 : origin = 0x00A800, length = 0x000800
    RAMLS6 : origin = 0x00B000, length = 0x000800
    RAMLS7 : origin = 0x00B800, length = 0x000800

    RAMGS0 : origin = 0x00C000, length = 0x002000
    RAMGS1 : origin = 0x00E000, length = 0x002000
    RAMGS2 : origin = 0x010000, length = 0x002000
    RAMGS3 : origin = 0x012000, length = 0x002000
    }


    SECTIONS
    {
    codestart : > BEGIN, PAGE = 0
    .TI.ramfunc : > RAMM0 PAGE = 0
    .text : >>RAMM0 | RAMLS0 | RAMLS1 | RAMLS2 | RAMLS3 | RAMLS4, PAGE = 0
    .cinit : > RAMM0, PAGE = 0
    .pinit : > RAMM0, PAGE = 0
    .switch : > RAMM0, PAGE = 0
    .reset : > RESET, PAGE = 0, TYPE = DSECT /* not used, */

    .stack : > RAMM1, PAGE = 1
    .ebss : > RAMLS5, PAGE = 1
    .econst : > RAMLS5, PAGE = 1
    .esysmem : > RAMLS5, PAGE = 1

    ramgs0 : > RAMGS0, PAGE = 1
    ramgs1 : > RAMGS1, PAGE = 1
    }

    /*
    //===========================================================================
    // End of file.
    //===========================================================================
    */

    Project information----
    #include "F28x_Project.h" // Device Header file and Examples Include File
    #include "IQmathLib.h"
    #include <math.h>
    #include <clarke.h>
    #include <park.h>
    I am using above header files and also included related files in include section of properties in the project. 
    I am using 2 _IQdiv  related operation in my code. 



  • Are you using COFF or EABI? Did you select the correct ISA in the project settings? 

    Can you confirm that the correct symbols library and IQMath library are used for the configuration of your project (fpu32, EABI, etc)?

    -Shantanu

  • Thank you for the suggestions.

    I am using "IQmath_fpu32.lib"  and  "F28004xbootROM_Symbols_fpu32.lib" , the problem was with the linker command "280049C_RAM_lnk.cmd" , I disabled this and used this "28004x_generic_flash_lnk.cmd" instead . 
    This solved the memory issue and the program is executed without any error. ..Now I need to specify some memory commands I guess for the following warnings:
    #10247-D creating output section "IQmath" without a SECTIONS specification

    #10247-D creating output section "IQmathTables" without a SECTIONS specification

  • Please consult section 3.5 in the IQMath documentation in c2000ware. You must allocate the IQmathTables and IQmath to the correct ROM location (refer the map file) and specify it as NOLOAD. 

  • Thanks for the response.

    I went through section 3.5 in IQMatch documentation, but F28004x is not mentioned...and I am not able to find the reference guide. 

  • I did find some info about IQmathtable in the Boot ROM section in C200ware shown as follows:

    Still, I have few doubts regarding IQmath like what I need to write in the "28004x_generic_flash_lnk.cmd" file. Is there an example that I can refer to have some clarity?

  • The devices have probably not been updated in that page but the method is the same. Like I mentioned, you need to allocate IQMath and IQMathTables to the correct ROM address like the one in your screenshot above. In the cmd file, you need allocate it in a way similar to this:

    MEMORY

    {

    IQTABLESROM : origin = 0x3F6C00, length = 0x502

    }

    SECTIONS

    {

    IQmathTables : IQTABLESROM , TYPE = NOLOAD

    }

    The NOLOAD option means that you are specifying where the section is without actually loading it. So that way, you won't see the warnings.

    -Shantanu

  • Thanks a lot, Shantanu.

    I updated the cmd file accordingly.  However, IQmathtables allocation has some issues. I am getting following error:


    C:/ti/c2000/C2000Ware_4_00_00_00/device_support/f28004x/common/cmd/28004x_generic_flash_lnk.cmd", line 79: error #10099-D: program will not fit into available memory, or the section contains a call site that requires a trampoline that can't be generated for this section. placement with alignment/blocking fails for section "IQmathTables" size 0xb50 page 1. Available memory ranges:
    IQTABLESROM size: 0x502 unused: 0x502 max hole: 0x502

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    PAGE 1 :
    BOOT_RSVD : origin = 0x000002, length = 0x0000F1 /* Part of M0, BOOT rom will use this for stack */
    RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
    // RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
    RAMLS5 : origin = 0x00A800, length = 0x000800
    RAMLS6 : origin = 0x00B000, length = 0x000800
    RAMLS7 : origin = 0x00B800, length = 0x000800
    RAMGS0 : origin = 0x00C000, length = 0x002000
    RAMGS1 : origin = 0x00E000, length = 0x002000
    RAMGS2 : origin = 0x010000, length = 0x002000
    RAMGS3 : origin = 0x012000, length = 0x001FF8
    // RAMGS3_RSVD : origin = 0x013FF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
    IQTABLESROM : origin = 0x3F6C00, length = 0x502
    }
    SECTIONS
    {
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Shivangi,

    I just gave an example. You need to allocate the correct amount of memory for the IQMath tables and IQMath library. In the tables case, you need to allocate 0xb50. Please make sure that the size you're allocating is correct in all cases.

    -Shantanu

  • Thanks Shantanu, 
    It worked by allocating memory in Flash. Since flash had space, linker didn't show any error.

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    RAMGS2 : origin = 0x010000, length = 0x002000
    RAMGS3 : origin = 0x012000, length = 0x001FF8
    // RAMGS3_RSVD : origin = 0x013FF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
    IQTABLESROM : origin = 0x3F6C00, length = 0x502
    }
    SECTIONS
    {
    codestart : > BEGIN, PAGE = 0, ALIGN(4)
    IQmath : > FLASH_BANK0_SEC1, PAGE = 0, ALIGN(4) /* Math Code */
    IQmathTables : > FLASH_BANK0_SEC2, PAGE = 0, TYPE = NOLOAD, ALIGN(4)
    .text : >> FLASH_BANK0_SEC2 | FLASH_BANK0_SEC3 | FLASH_BANK0_SEC5, PAGE = 0, ALIGN(4)
    .cinit : > FLASH_BANK0_SEC1, PAGE = 0, ALIGN(4)
    .switch : > FLASH_BANK0_SEC1, PAGE = 0, ALIGN(4)
    .reset : > RESET, PAGE = 0, TYPE = DSECT /* not used, */
    .stack : > RAMM1, PAGE = 1
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX