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.

TMS28335如何把flash的程序如何搬移到RAM中运行

Other Parts Discussed in Thread: CONTROLSUITE

看了一些做法,都是把整个程序搬移到RAM中运行的。我的代码在flash中有0x6000那么大,无法实现全部搬移。我想把2个中断程序搬移到RAM中运行,这个怎么做呢?

一个是interrupt void EPWINT(void)

{}

一个是定时器中断interrupt void time0(void)

{}

要实现上述2个函数搬移到RAM,要做哪些修改?有没有部分搬移的例程呢,找了许久都没找到。

  • xiaoguang

    这个直接参考C:\ti\controlSUITE\device_support\f2833x\v133\DSP2833x_examples_ccsv4\flash_f28335

    例程中initflash函数的做法就行了

    Eric

  • 我按那个做了,我把2个中断都做成了

    #pragma CODE_SECTION(epwm1_timer_isr, "ramfuncs");
    #pragma CODE_SECTION(epwm2_timer_isr, "ramfuncs");

    然后在CMD中把RAML0       : origin = 0x008000, length = 0x002000   长度改为2000了

                                 RAML1       : origin = 0x00A000, length = 0x001000  

    在主程序中做搬移,结果运行到InitFlash的时候就进入了ILLEGAL_ISR(void)程序,出不来了。这个是为什么。

    另外把所有的数据都移到了RAM中。

     

  • xiaoguang

    main中有调用memcpy函数吗?

    Eric Ma