|
引用 9 楼 ljdtj 的回复:
LZ的bsp中没有STEPLDR?
并且这里面的main.c 文件中的main函数是
void main(void)
{
register nBlock;
register nPage;
register nBadBlocks;
volatile unsigned char *pBuf;
// Set up copy section (initialized globals).
//
// NOTE: after this call, globals become valid.
//
SetupCopySection(pTOC);
// Enable the ICache.
//System_EnableICache(); // I-Cache was already enabled in startup.s
// Set up all GPIO ports for LED.
// Port_Init();
// Led_Display(0xf);
// UART Initialize
Uart_Init();
Uart_SendString("\r\nWinCE 6.0 Steploader for SMDK6410\r\n");
// Initialize the NAND flash interface.
//Uart_SendString("NAND Initialize\n\r");
g_bLargeBlock = NAND_Init();
// Copy image from NAND flash to RAM.
pBuf = (unsigned char *)LOAD_ADDRESS_PHYSICAL;
nBadBlocks = 0;
// Led_Display(0x4);
for (nPage = LOAD_IMAGE_PAGE_OFFSET; nPage < (LOAD_IMAGE_PAGE_OFFSET + LOAD_IMAGE_PAGE_COUNT) ; nPage++)
{
// Led_Display(0x1);
nBlock = ((nPage / NAND_PAGES_PER_BLOCK) + nBadBlocks);
if (!NAND_ReadPage(nBlock, (nPage % NAND_PAGES_PER_BLOCK), pBuf))
{
if ((nPage % NAND_PAGES_PER_BLOCK) != 0)
{
// Led_Display(0x9); // real ECC Error.
Uart_SendString("ECC Error.\r\n");
while(1)
{
// Spin forever...
}
}
// ECC error on a block boundary is (likely) a bad block - retry the page 0 read on the next block.
nBadBlocks++;
nPage--;
continue;
}
pBuf += NAND_BYTES_PER_PAGE;
}
Uart_SendString("Launch Eboot...\n\r");
((PFN_IMAGE_LAUNCH)(LOAD_ADDRESS_PHYSICAL))();
}
跟we-hjb大侠博客上说的nboot内容差不多,请问这stepldr就是传说中的nboot吗?
但为什么编译成功后只有一个eboot.bin和eboot.nb0呢?
要是是放在nandflash中,存放地址是多少呢?
只有eboot.nb0的情况下,还有没有nboot加载eboot这一步呢?
恳请大侠们指点指点! |
|