只是为了添加一些信息,以下是我通常在飞思卡尔的设置:我不太清楚我需要做什么在dSPIC30F上,但是基于我读到的,我不能在RAM中执行代码,但是希望我能在程序内存中定位MyDeRimram [],而不是用ASM做同样的操作(“Go”)。对“霉素”;我会继续挖掘,希望我在正确的轨道上?干杯。
以上来自于百度翻译
以下为原文
Just to add some info to this, the following is what I usually do on the Freescale setup:
static char myCodeInRAM[sizeOfCodeInRAM];
void startRAMCode()
{
doSomeStuffHere();
memmove((const void *)myCodeInRAM, (const void *)codeWhichRunsInRAM, sizeOfCodeInRAM);
turnOffInterruptsEtc();
__asm jmp myCodeInRAM;
}
void codeWhichRunsInRAM()
{
// do whatever we need to do here for RTSP!
}
Im not too sure what I need to do on the dsPIC30F but based on what I have read I cant execute code in RAM, but hopefully I can position myCodeInRAM[] in program memory instead on do just the same using asm("GOTO _myCodeInRAM"); ??
I will keep digging, hopefully I am on the right track?
Cheers.
只是为了添加一些信息,以下是我通常在飞思卡尔的设置:我不太清楚我需要做什么在dSPIC30F上,但是基于我读到的,我不能在RAM中执行代码,但是希望我能在程序内存中定位MyDeRimram [],而不是用ASM做同样的操作(“Go”)。对“霉素”;我会继续挖掘,希望我在正确的轨道上?干杯。
以上来自于百度翻译
以下为原文
Just to add some info to this, the following is what I usually do on the Freescale setup:
static char myCodeInRAM[sizeOfCodeInRAM];
void startRAMCode()
{
doSomeStuffHere();
memmove((const void *)myCodeInRAM, (const void *)codeWhichRunsInRAM, sizeOfCodeInRAM);
turnOffInterruptsEtc();
__asm jmp myCodeInRAM;
}
void codeWhichRunsInRAM()
{
// do whatever we need to do here for RTSP!
}
Im not too sure what I need to do on the dsPIC30F but based on what I have read I cant execute code in RAM, but hopefully I can position myCodeInRAM[] in program memory instead on do just the same using asm("GOTO _myCodeInRAM"); ??
I will keep digging, hopefully I am on the right track?
Cheers.
举报