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.

IQmathTablesRam

Other Parts Discussed in Thread: TMS320F2812

My application runs on a TMS320F2812, it runs from FLASH and uses IQmath. I'm using the linker command provided by TI (F2812). I'm using CCS 6.

The user manual for IQMath makes reference to a section IQmathTablesRam that is allocated to RAM and PAGE = 1 (data). F2812.cmd does not make any reference to this section. Only IQmath and IQmathTables.

The questions are: Do I need to add IQmathTablesRam to my linker command?

                                   If the answer to the previous question is affirmative... Can I allocate the section to flash? e.g.

                                  IQmathTablesRam  : >  FLASHD  PAGE = 1

                                   Why is it that in some examples this section uses PAGE = 1 and in some examples this section uses PAGE = 0 ... if it is a data section ...

                                  shouldn't it be PAGE = 1?

  • Carlos Yanzig said:
    The questions are: Do I need to add IQmathTablesRam to my linker command?

    Yes.  If you don't, the linker will try to place it without your guidance.  It is always better, in my opinion, to tell the linker where to place sections.

    Carlos Yanzig said:
    If the answer to the previous question is affirmative... Can I allocate the section to flash?

    Yes.  The table can be allocated to flash. 

    Carlos Yanzig said:
    Why is it that in some examples this section uses PAGE = 1 and in some examples this section uses PAGE = 0

    Some older programmers would only program flash for sections allocated to program space (SDflash was this way).  Most newer ones only use the address itself to make a decision if the information should be programmed.   Since the flash and RAM is unified in both program and data space, either will work.  CCS expects to find program symbols on page 0 and data symbols on page 1 but this is only a display artifact.

  • Lori:
    Thank you for your fast response. Based on what you say, I can add:

    IQmathTablesRam : > FLASHD PAGE = 1

    to my linker, and everything should be fine. In my code, I've copied some pieces of code (mainly interrupts) to RAM, rather than running them from flash. I used the PRAGMA directive to specify where I wanted my code to be copied e.g.


    #pragma CODE_SECTION(myInterrupt_isr, "ramfuncs");

    where myInterrupt_isr is the name of the interrupt function. Should I use the same procedure for this table e.g.:


    #pragma CODE_SECTION(IQmathTablesRam,"ramfuncs");

    Questions are:

    ramfuncs will allocate code, should I create another MEMORY sector with PAGE = 1 named ramfuncs2 that will hold data (independent from the code)
    should I put IQmathTablesRam as the first parameter in the pragma directive.

    Regards and thanks again.