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.

f28017FLASH编译

Other Parts Discussed in Thread: CONTROLSUITE

这是F28027编译FLASH内存分配函数,memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);

这个函数用CCS6.0定位不存在,但是编译无错,请问这个函数具体的存在地方,谢谢指导。

#ifdef _FLASH
memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);

#endif

  • 当您的程序要加载到flash运行的时候,需要使用该函数。因为程序运行在flash中,但是ramfuncs字段的内容还是需要运行在ram中。

    该函数是编译器自带的函数

    您可以参考 www.ti.com/.../spra958l.pdf

    The C-compiler runtime support library contains a memory copy function called memcpy() that can be used to perform the copy task as follows:

    memcpy((uint16_t *)&RamfuncsRunStart,(uint16_t *)&RamfuncsLoadStart, (unsigned long)&RamfuncsLoadSize);

    第一个参数是运行的地址,第二个参数是复制的起始地址。
  • 请问具体报错信息是怎么样的?
    这个函数是用来将flash中的程序在运行的时候复制到ram中,以提高运行速度的。可以参考例程:
    C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_examples_drivers\flash_f2802x
  • memcpy函数是在runtime support library里,具体定义可以在CCS的以下目录下的"memcpy.c"文件中找到:
    C:\ti\ccsv6\tools\compiler\c2000_15.12.3.LTS\lib\src