LUA代码实现如下:
每次读取的IKB,读取完成后存到eMMC的路径:0:/H7-TOOL/Lua/1.bin
[Lua] 纯文本查看 复制代码 local flashsize = 64 * 1024
local a
function printf(...)
print(string.format(...))
end
a = flashsize // 1024 -- 每次读取1KB
pg_init()
for i=0,a-1,1 do
ok,bytes = pg_read_mem(0x08000000 + i * 1024, 1024)
if(ok == 1) then
f_write("0:/H7-TOOL/Lua/1.bin", i * 1024, bytes)
printf("读取成功 = %d", i)
else
break
printf("读取失败 = %d", i)
end
end
printf("操作完成")
|