看了一些做法,都是把整个程序搬移到RAM中运行的。我的代码在flash中有0x6000那么大,无法实现全部搬移。我想把2个中断程序搬移到RAM中运行,这个怎么做呢?
一个是interrupt void EPWINT(void)
{}
一个是定时器中断interrupt void time0(void)
{}
要实现上述2个函数搬移到RAM,要做哪些修改?有没有部分搬移的例程呢,找了许久都没找到。
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.
看了一些做法,都是把整个程序搬移到RAM中运行的。我的代码在flash中有0x6000那么大,无法实现全部搬移。我想把2个中断程序搬移到RAM中运行,这个怎么做呢?
一个是interrupt void EPWINT(void)
{}
一个是定时器中断interrupt void time0(void)
{}
要实现上述2个函数搬移到RAM,要做哪些修改?有没有部分搬移的例程呢,找了许久都没找到。
我按那个做了,我把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中。