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.

F280049把程序从Flash搬运到RAM里运行

请问如何实现把F280049把程序从Flash搬运到RAM里运行?

  • 看看工程中是否有如下,如果有可以通过宏定义设置实现
    void InitSysCtrl(void)
    {
    // Disable the watchdog
    DisableDog();

    #ifdef _FLASH
    // Copy time critical code and Flash setup code to RAM
    // This includes the following functions: InitFlash();
    // The RamfuncsLoadStart, RamfuncsLoadSize, and RamfuncsRunStart
    // symbols are created by the linker. Refer to the device .cmd file.
    memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);
  • 另外建议您参考下应用报告

    www.ti.com/.../spraau8a.pdf

    copy的基本原理是相同的
  • 有这段代码,但是我#define _FLASH后,执行了memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);并且之后也InitFlash();根据TI默认的CMD配置文件,这只能实现把一些变量放入到RAMLS0里,但是我的程序代码没有放入RAM,我执行了#pragma CODE_SECTION(函数名, ".TI.ramfunc");却依然没有任何效果。