TMS320F28335下载程序到Flash相关问题

  最近经常使用TMS320F28335调试程序,DSP的下载方式比Stm32、dspic复杂。因此,记录几个关键的步骤。


步骤一:将CMD文件从28335_RAM_Ink.cmd切换到F28335.cmd。(这两个文件在ti提供的参考例程中可以找到)

步骤二:在main函数里面添加如下两行代码。并在main函数外extern需要用到的三个变量。

MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart);
InitFlash();

extern Uint16 RamfuncsLoadStart;
extern Uint16 RamfuncsLoadEnd;
extern Uint16 RamfuncsRunStart;

步骤三:添加DSP2833x.MemCopy.c文件到编译的工程里面。(这个文件也是官方文件)

步骤四:将程序编译,并下载到Flash中。切记:DSP的Boot模式设置为Flash启动,并重新上电或者复位。


            注意:官方的F28335.cmd的SECTIONS一定要有下面几行代码。没有的话,需要手动加上。这个是指定存在Flash中的地址和长度的,不可省略。

ramfuncs          : LOAD = FLASHD,
                         RUN = RAML0,
                         LOAD_START(_RamfuncsLoadStart),
                         LOAD_END(_RamfuncsLoadEnd),
                         RUN_START(_RamfuncsRunStart),
                         PAGE = 0
原文地址:https://www.cnblogs.com/cjyc/p/14705970.html