|
Eboot,InitPartitionMgr(),FMD_Init()专家快来。。。送分
[复制链接]
当调用FMD_Init()时,
- g_FlashAddress.MemBase.Num = 1;
- g_FlashAddress.MemLen.Num = 1;
- g_FlashAddress.MemBase.Reg[0] = FLASH_START; // Flash base address.
- g_FlashAddress.MemLen.Reg[0] = BOOT_FLASH_SIZE; // Total flash length.
- FMD_Init(NULL, &g_FlashAddress, NULL);
- if (!FMD_Init(NULL, &g_FlashAddress, NULL))
- {
- EdbgOutputDebugString("ERROR: Flash FMD initialization failed.\r\n");
- return(FALSE);
- }
复制代码
此时正常工作。
当在InitPartitionMgr()中时
- RegInfo.MemBase.Num = 1;
- RegInfo.MemLen.Num = 1;
- RegInfo.MemBase.Reg[0] = FLASH_BIN_START; // Flash base address.
- RegInfo.MemLen.Reg[0] = BOOT_FLASH_SIZE - (FLASH_BIN_START - FLASH_START); // Total flash length.
复制代码
此时调用会出错。
换句话说:初始化整个FLASH时,正常。初始化部分区域时,失败!
英雄们,WHY?大侠们,救命哪!
FLASH_START为FALSH的首地址,
BOOT_FLASH_SIZE 为32M FLASH大小
FLASH_BIN_START NK所在的FLASH地址
BOOT_FLASH_SIZE - (FLASH_BIN_START - FLASH_START); EBOOT外剩余flash的大小
|
|