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.

IQmath在F2812独立运行时,如何从flash搬移到ram,提高运算速度

iqmath说明文档中:

During stand-alone operation, if these functions are used, then the table should be loaded into non-volatile memory (for example flash). If you want to access them in SARAM then copy them from flash to SARAM during initialization.

即如何像搬移

memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, &RamfuncsLoadEnd - &RamfuncsLoadStart);

进行操作,希望给出指点,或相关参考

  • Will,

    在F2812的CMD文件中,一般有一个ramfuncs的段,

    ramfuncs            : LOAD = FLASHD,                        

        RUN = RAML0,                       

       LOAD_START(_RamfuncsLoadStart),                       

       LOAD_END(_RamfuncsLoadEnd),                        

      RUN_START(_RamfuncsRunStart),                         

       PAGE = 0

    你把IQMATH段

    IQmath              : > FLASHC      PAGE = 0                  /* Math Code */

    你可以也把IQmath改的跟ramfunc一样,在把

    IQmath : LOAD = FLASHC,                        

        RUN = RAML0,                       

       LOAD_START(_IQmath LoadStart),                       

       LOAD_END(_IQmath LoadEnd),                        

      RUN_START(_IQmath RunStart),                         

       PAGE = 0

    然后在main中添加一条memcpy函数,将相应的RamfuncsLoadStart等改成IQmath LoadStart等就可以。

    Eric

     

  • 谢谢,之前已经成功运行了,想法一致了;

    还有一个问题,在CCS 5.3下,编译IQmath,单步运行出现:

    Can't find a source file at "IQNdiv.asm"
    Locate the file or edit the source lookup path to include its location.

    在 disassembly 中可以看到         ASM$, _IQ24div: 

    但是单步调试包含有警告。

    库文件和路径都有设置,使用V15a

    编译警告:(TI V6.1.0)

    Description Resource Path Location Type
    #16002-D build attribute vendor section TI missing  in    ADC_SOC    C/C++ Problem

  • will,

    因为IQ24div是IQmath库里的函数,你没有源码,所以看不到。

    我认为没有关系。

    Eric

  • Eric, 

      您好,请问如果RAML0的空间不足了怎么办?修改什么能在不影响IQMATH计算速度的情况下应用如RAMM0.RAMH1之类的内存块?

    Max