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.

TMS320F280049: IQmath LIBRARY to be used

Part Number: TMS320F280049
Other Parts Discussed in Thread: LAUNCHXL-F280049C, LAUNCHXL-F280025C, , TMS320F280025, C2000WARE

I am using LAUNCHXL-F280049C and let me know which IQmath library file and associated .h file I need to use if I want to keep my IQmath functions. Also let me know the modification in .cmd file I need to make for this.

1. I have used IQmath_eabi.lib and IQmathLib.h with LAUNCHXL-F280025C board and it worked.

2. But I tried with all 5 types IQmath_coff.lib, IQmath_eabi.lib, IQmath_fpu32.lib, IQmath_fpu32_eabi.lib, however none worked.

  • Here is the result with IQmathLib.h and IQmath_eabi.lib being used, 

    ------------------------------------------------

    warning #10373-D: library "../IQmath_eabi.lib" contains ELF object files which are incompatible with the TI-COFF output file. Ensure you are using the proper library.
    warning #10373-D: library "../IQmath_eabi.lib" contains ELF object files which are incompatible with the TI-COFF output file. Ensure you are using the proper library.
    warning #10247-D: creating output section "ramfuncs" without a SECTIONS specification

    undefined first referenced
    symbol in file
    --------- ----------------
    __IQ24cosPU ./00_f28002x_CONVERTER.obj
    __IQ24div ./00_f28002x_MODULATION.obj
    __IQ24mpyI32int ./00_f28002x_CONVERTER.obj
    __IQ24sinPU ./00_f28002x_CONVERTER.obj

    --------------------------------------------------

    and .cmd file is as under:

    ----------------------------------------------------

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

    BEGIN : origin = 0x080000, length = 0x000002
    RAMM0 : origin = 0x0000F6, length = 0x00030A

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

    /* Flash sectors */
    /* BANK 0 */
    FLASH_BANK0_SEC0 : origin = 0x080002, length = 0x000FFE /* on-chip Flash */
    FLASH_BANK0_SEC1 : origin = 0x081000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC2 : origin = 0x082000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC3 : origin = 0x083000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC4 : origin = 0x084000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC5 : origin = 0x085000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC6 : origin = 0x086000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC7 : origin = 0x087000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC8 : origin = 0x088000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC9 : origin = 0x089000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC10 : origin = 0x08A000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC11 : origin = 0x08B000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC12 : origin = 0x08C000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC13 : origin = 0x08D000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC14 : origin = 0x08E000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC15 : origin = 0x08F000, length = 0x001000 /* on-chip Flash */

    /* BANK 1 */
    FLASH_BANK1_SEC0 : origin = 0x090000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK1_SEC1 : origin = 0x091000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK1_SEC2 : origin = 0x092000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK1_SEC3 : origin = 0x093000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK1_SEC4 : origin = 0x094000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK1_SEC5 : origin = 0x095000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK1_SEC6 : origin = 0x096000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK1_SEC7 : origin = 0x097000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK1_SEC8 : origin = 0x098000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK1_SEC9 : origin = 0x099000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK1_SEC10 : origin = 0x09A000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK1_SEC11 : origin = 0x09B000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK1_SEC12 : origin = 0x09C000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK1_SEC13 : origin = 0x09D000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK1_SEC14 : origin = 0x09E000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK1_SEC15 : origin = 0x09F000, length = 0x000FF0 /* on-chip Flash */

    // FLASH_BANK1_SEC15_RSVD : origin = 0x09FFF0, length = 0x000010 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */

    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" */

    RAMLS1 : origin = 0x008800, length = 0x000800
    RAMLS2 : origin = 0x009000, length = 0x000800
    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" */

    CLA1_MSGRAMLOW : origin = 0x001480, length = 0x000080
    CLA1_MSGRAMHIGH : origin = 0x001500, length = 0x000080
    }


    SECTIONS
    {
    .cinit : > FLASH_BANK0_SEC1, PAGE = 0, ALIGN(4)
    .text : >>FLASH_BANK0_SEC2 | FLASH_BANK0_SEC3| FLASH_BANK0_SEC4| FLASH_BANK0_SEC5, PAGE = 0, ALIGN(4)
    codestart : > BEGIN PAGE = 0, ALIGN(4)

    .stack : > RAMM1 PAGE = 1
    .switch : > FLASH_BANK0_SEC1, PAGE = 0, ALIGN(4)

    #if defined(__TI_EABI__)
    .init_array : > FLASH_BANK0_SEC1, PAGE = 0, ALIGN(4)
    .bss : > RAMLS5, PAGE = 1
    .bss:output : > RAMLS5, PAGE = 1
    .bss:cio : > RAMLS5, PAGE = 1
    .data : > RAMLS6, PAGE = 1
    .sysmem : > RAMLS6, PAGE = 1
    .const : > FLASH_BANK0_SEC4, PAGE = 0, ALIGN(4)
    #else
    .pinit : > FLASH_BANK0_SEC1, PAGE = 0, ALIGN(4)
    .ebss : >>RAMLS5 | RAMLS6, PAGE = 1
    .esysmem : > RAMLS6, PAGE = 1
    .cio : > RAMLS5, PAGE = 1
    .econst : > FLASH_BANK0_SEC4, PAGE = 0, ALIGN(4)
    #endif

    ramgs0 : > RAMGS0, PAGE = 1
    ramgs1 : > RAMGS1, PAGE = 1
    .reset : > RESET, PAGE = 0, TYPE = DSECT /* not used, */

    dclfuncs : > FLASH_BANK0_SEC1, PAGE = 0, ALIGN(4)

    IQmath : > FLASH_BANK0_SEC6 | FLASH_BANK0_SEC7 | FLASH_BANK0_SEC8


    #if defined(__TI_EABI__)
    /* CLA specific sections */
    Cla1Prog : LOAD = FLASH_BANK0_SEC4,
    RUN = RAMLS0,
    LOAD_START(Cla1ProgLoadStart),
    RUN_START(Cla1ProgRunStart),
    LOAD_SIZE(Cla1ProgLoadSize),
    PAGE = 0, ALIGN(4)
    #else
    /* CLA specific sections */
    Cla1Prog : LOAD = FLASH_BANK0_SEC4,
    RUN = RAMLS0,
    LOAD_START(_Cla1ProgLoadStart),
    RUN_START(_Cla1ProgRunStart),
    LOAD_SIZE(_Cla1ProgLoadSize),
    PAGE = 0, ALIGN(4)
    #endif


    Cla1ToCpuMsgRAM : > CLA1_MSGRAMLOW, PAGE = 1
    CpuToCla1MsgRAM : > CLA1_MSGRAMHIGH, PAGE = 1

    #if defined(__TI_EABI__)
    .TI.ramfunc : LOAD = FLASH_BANK0_SEC1,
    RUN = RAMLS4
    LOAD_START(RamfuncsLoadStart),
    LOAD_SIZE(RamfuncsLoadSize),
    LOAD_END(RamfuncsLoadEnd),
    RUN_START(RamfuncsRunStart),
    RUN_SIZE(RamfuncsRunSize),
    RUN_END(RamfuncsRunEnd),
    PAGE = 0, ALIGN(4)
    #else
    .TI.ramfunc : LOAD = FLASH_BANK0_SEC1,
    RUN = RAMLS4
    LOAD_START(_RamfuncsLoadStart),
    LOAD_SIZE(_RamfuncsLoadSize),
    LOAD_END(_RamfuncsLoadEnd),
    RUN_START(_RamfuncsRunStart),
    RUN_SIZE(_RamfuncsRunSize),
    RUN_END(_RamfuncsRunEnd),
    PAGE = 0, ALIGN(4)
    #endif

    .scratchpad : > RAMLS1, PAGE = 1
    .bss_cla : > RAMLS1, PAGE = 1

    Cla1DataRam : > RAMLS2, PAGE = 1
    cla_shared : > RAMLS1, PAGE = 1
    CLADataLS1 : > RAMLS1, PAGE = 1

    #if defined(__TI_EABI__)
    .const_cla : LOAD = FLASH_BANK0_SEC2,
    RUN = RAMLS3,
    RUN_START(Cla1ConstRunStart),
    LOAD_START(Cla1ConstLoadStart),
    LOAD_SIZE(Cla1ConstLoadSize),
    PAGE = 0, ALIGN(4)
    #else
    .const_cla : LOAD = FLASH_BANK0_SEC2,
    RUN = RAMLS3,
    RUN_START(_Cla1ConstRunStart),
    LOAD_START(_Cla1ConstLoadStart),
    LOAD_SIZE(_Cla1ConstLoadSize),
    PAGE = 0, ALIGN(4)
    #endif
    }

    ------------------------------------------------------

  • Hi,

    You need to ensure that your project object file format is set to COFF or EABI depending on the project, with the --fpu32 enabled option set. Can you confirm that?

    -Shantanu 

  • Thanks Shantanu,

    Yes, when I added IQmath_fpu32_eabi.lib and changed the setting from "automatic" to "rts2800_fpu32_eabi.lib", errors have been gone. However, I get an warning as below:

    Q1: "warning #10247-D: creating output section "IQmathTables" without a SECTIONS specification", I though that TMS320F280049 BOOT ROM does NOT contain _IQmathTable as opposed to TMS320F280025 BOOT ROM ? So, we do not need a section for this !! Please guide me. Let me know what functions are there in _IQmathTable ?

    Q2. Can you explain which one among: IQmath_eabi.lib, IQmath_fpu32_eabi.lib needs to be linked and why, any documentation ?

    Q3. Guide me what "XXX.h" or "XXX.lib" file to include while developing code so that I can use FPU and TMU in TMS320F280049 ?

    Q4. Can I directly write "a=b*c", "a=b/c", "a=cos(theta)" to get the math done by FPU/TMU ?

    Q5. How do I utilize "a=cos(theta*2pi)", "a=b/2pi" etc that I saw in one of TI document ? Is it a special instruction set like _IQmath ?

  • Q1: "warning #10247-D: creating output section "IQmathTables" without a SECTIONS specification", I though that TMS320F280049 BOOT ROM does NOT contain _IQmathTable as opposed to TMS320F280025 BOOT ROM ? So, we do not need a section for this !! Please guide me. Let me know what functions are there in _IQmathTable ?

    The IQMath library and tabes are in ROM. You can access them by adding the Boot ROM symbols library form <c2000ware>/libraries/boot_rom

    Q2. Can you explain which one among: IQmath_eabi.lib, IQmath_fpu32_eabi.lib needs to be linked and why, any documentation ?

    Depending on whether or not you are enabling fpu32 in your project settings, you can choose either. Please refer to the documentation in the iqmath library in c2000ware.

    Q3. Guide me what "XXX.h" or "XXX.lib" file to include while developing code so that I can use FPU and TMU in TMS320F280049 ?

    You only need to enable fpu32 and tmu0 in your project settings -> build -> processor options. 

    Q4. Can I directly write "a=b*c", "a=b/c", "a=cos(theta)" to get the math done by FPU/TMU ?

    Yes. Please refer to the FastRTS library.

    Q5. How do I utilize "a=cos(theta*2pi)", "a=b/2pi" etc that I saw in one of TI document ? Is it a special instruction set like _IQmath ?

    The trigonometric functions can be used using the FastRTS library.

    -Shantanu

  • Q1: "warning #10247-D: creating output section "IQmathTables" without a SECTIONS specification", I though that TMS320F280049 BOOT ROM does NOT contain _IQmathTable as opposed to TMS320F280025 BOOT ROM ? So, we do not need a section for this !! Please guide me. Let me know what functions are there in _IQmathTable ?
    The IQMath library and tabes are in ROM. You can access them by adding the Boot ROM symbols library form <c2000ware>/libraries/boot_rom:

    >> should I add " F28004xbootROM_Symbols_fpu32.lib" or "F28004xbootROM_Symbols.lib" to the project ? Or what ? Do I need to add a line in .CMD file ? You need to explain in details.

    Q2. Can you explain which one among: IQmath_eabi.lib, IQmath_fpu32_eabi.lib needs to be linked and why, any documentation ?

    Depending on whether or not you are enabling fpu32 in your project settings, you can choose either. Please refer to the documentation in the iqmath library in c2000ware.

    Q3. Guide me what "XXX.h" or "XXX.lib" file to include while developing code so that I can use FPU and TMU in TMS320F280049 ?

    You only need to enable fpu32 and tmu0 in your project settings -> build -> processor options. 

    Q4. Can I directly write "a=b*c", "a=b/c", "a=cos(theta)" to get the math done by FPU/TMU ?

    Yes. Please refer to the FastRTS library.

    >> should I add "rts2800_fpu32_fast_supplement.lib" or "rts2800_fpu32_fast_supplement_coff.lib" or "rts2800_fpu32_fast_supplement_eabi.lib" or or "rts2800_fpu64_fast_supplement.lib" to the project ? Or Something else ?
    Do I need to add a line in .CMD file ? You need to explain in details.

    Q5. How do I utilize "a=cos(theta*2pi)", "a=b/2pi" etc that I saw in one of TI document ? Is it a special instruction set like _IQmath ?

    The trigonometric functions can be used using the FastRTS library.

  • Q1: "warning #10247-D: creating output section "IQmathTables" without a SECTIONS specification", I though that TMS320F280049 BOOT ROM does NOT contain _IQmathTable as opposed to TMS320F280025 BOOT ROM ? So, we do not need a section for this !! Please guide me. Let me know what functions are there in _IQmathTable ?
    The IQMath library and tabes are in ROM. You can access them by adding the Boot ROM symbols library form <c2000ware>/libraries/boot_rom:

    >> should I add " F28004xbootROM_Symbols_fpu32.lib" or "F28004xbootROM_Symbols.lib" to the project ? Or what ? Do I need to add a line in .CMD file ? You need to explain in details. I do NOT see any section in BOOT ROM in TMS320F280049 that has _IQmath Tables as opposed to TMS320F280025 that has _IQmath Tables from "IQTABLES : origin = 0x003F1402, length = 0x0000166D" ?

    Q4. Can I directly write "a=b*c", "a=b/c", "a=cos(theta)" to get the math done by FPU/TMU ?

    Yes. Please refer to the FastRTS library.

    >> should I add "rts2800_fpu32_fast_supplement.lib" or "rts2800_fpu32_fast_supplement_coff.lib" or "rts2800_fpu32_fast_supplement_eabi.lib" or or "rts2800_fpu64_fast_supplement.lib" to the project ? Or Something else ?
    Do I need to add a line in .CMD file ? You need to explain in details.

  • Hi,

    Like I mentioned earlier, if your project is in eabi format, add rts2800_fpu32_fast_supplement_coff.lib. Else, add rts2800_fpu32_fast_supplement_eabi.lib. 
    F28004x has IQMath tables in ROM. To use the tables in ROM, you need to use the ROM symbols file. IF you don't want to use the tables in ROM, you can include the IQMath library and add "IQMathTables : RAMLSx" and "IQMath : RAMLSx" in your cmd file.

    Hope that answers your question

    -Shantanu