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.

代码不能再norflash中运行



正在做norflash启动,但是代码烧写进 norflash后不能运行,于是用仿真器仿真程序做如下测试:

1、将norFlash代码拷贝到ram内运行,正常运行(LED灯闪烁)

uint32 pos;

//-----  将代码拷贝到ram
for(pos = 0; pos < 4*1024; pos++)
{
    *(uint8*)(0x402F0400+pos) = *(uint8 *)(0x13F80000+pos);
}

void (*appEntryNOR)();

appEntryNOR = (void (*)(void)) 0x402F0400;

//-----  运行代码
(*appEntryNOR)();

while(1);

2、直接跳转到norFlash运行,运行失败。

void (*appEntryNOR)();

appEntryNOR = (void (*)(void)) 0x13F80000;
(*appEntryNOR)();

while(1);

因为自己做的bootloader norflash启动失败,所以做如上测试,想问下,1、2有何区别?谢谢。