|

楼主 |
发表于 2020-7-14 14:00:14
|
显示全部楼层
问题找到了,来反馈一下。
我把ExtFlashSection段放在地址0x09000000的地方,我的搬运函数这么写的
if ((uint32_t)src >= 0x09000000 && (uint32_t)src < 0x09D00000)
{
uint32_t dataOffset = (uint32_t)src - 0x09000000;
// In this example we assume graphics is placed in SD card, and that we have an appropriate function
// for copying data from there.
if (0 == f_open(&bin, (const TCHAR *)"ER_EROM1", FA_READ)) //打开文件
{
if (0 == f_lseek(&bin, dataOffset))
{
f_read(&bin, dest, numBytes, &read_num); //读取数据
}
f_close(&bin);
}
// sdcard_read(dest, dataOffset, numBytes);
return true;
}
else
{
// For all other addresses, just use the default implementation.
// This is important, as blockCopy is also used for other things in the core framework.
return HAL::blockCopy(dest, src, numBytes);
}
之前出错是因为上限地址(0x09D00000)错误导致的,我的图片有12M左右,之前这里值写的比较小,导致一超出范围,指针就乱指了。 |
|