【野火 fireFlasher Mini 脱机烧录器】+ 测试烧录器设置 - RISC-V MCU技术社区 - 电子技术william hill官网 - 广受欢迎的专业电子william hill官网 - 威廉希尔官方网站
分享 收藏 返回

[文章]

【野火 fireFlasher Mini 脱机烧录器】+ 测试烧录器设置

本次测试一下烧录器的烧录设置情况。
下面选择读保护1级,烧录次数限制5次测试。
image.png

完成一键烧录固件到烧录器。
image.png

操作记录:

[11:22:04.208]>>>Reading Firmware Note......


[11:22:04.209]>>>Inject command 'read-memory'


[11:22:04.209]>>>Successful response to command 'read-memory'


[11:22:04.209]>>>(1/1)58%


[11:22:04.209]>>>(1/1)100%


[11:22:04.209]>>> Completed!


[11:22:04.209]>>>Successful generic response to command 'read-memory'


[11:22:04.209]>>>Response status = 0 (0x0) Success.


[11:22:04.210]>>>Response word 1 = 1744 (0x6d0)


[11:22:04.210]>>>Read 1744 of 1744 bytes.


[11:22:04.338]>>>Note: memoryId is not required for read-memory when accessing mapped external memory. Ignore this parameter.


[11:22:04.347]>>>Inject command 'read-memory'


[11:22:04.350]>>>Successful response to command 'read-memory'


[11:22:04.351]>>>(1/1)24%


[11:22:04.351]>>>(1/1)49%


[11:22:04.351]>>>(1/1)74%


[11:22:04.351]>>>(1/1)98%


[11:22:04.352]>>>(1/1)100%


[11:22:04.352]>>> Completed!


[11:22:04.352]>>>Successful generic response to command 'read-memory'


[11:22:04.355]>>>Response status = 0 (0x0) Success.


[11:22:04.356]>>>Response word 1 = 4096 (0x1000)


[11:22:04.356]>>>Read 4096 of 4096 bytes.


[11:22:04.356]>>>共有0个固件


[11:22:04.356]>>>加载目录完成


[11:24:04.670]>>>当前MCU型号: STM32G070KBTx


[11:24:04.671]>>>正在解析文件: F:/fireFlasher/firmware/opt_pack_info/st/STM32/STM32G0xx/STM32G0x0xx.yml


[11:24:09.360]>>>Running packFile......


[11:24:09.364]>>>Finish packFile......


[11:24:09.364]>>>Starting Create file......


[11:24:09.365]>>>Starting Write file......


[11:24:09.365]>>>Finish Create file F:/fireFlasher/tmp/STM32G0.fire......


[11:24:09.368]>>>Running blhost flash-erase-region, wait for a minute......


[11:24:09.373]>>>Inject command 'flash-erase-region'


[11:24:09.561]>>>Successful generic response to command 'flash-erase-region'


[11:24:09.561]>>>Response status = 0 (0x0) Success.


[11:24:09.562]>>>Running blhost write-memory ......


[11:24:09.570]>>>Inject command 'write-memory'


[11:24:09.571]>>>Preparing to send 13696 (0x3580) bytes to the target.


[11:24:09.574]>>>Successful generic response to command 'write-memory'


[11:24:09.575]>>>(1/1) 7%


[11:24:09.575]>>>(1/1)14%


[11:24:09.578]>>>(1/1)22%


[11:24:09.582]>>>(1/1)29%


[11:24:09.583]>>>(1/1)36%


[11:24:09.585]>>>(1/1)44%


[11:24:09.588]>>>(1/1)51%


[11:24:09.591]>>>(1/1)59%


[11:24:09.594]>>>(1/1)66%


[11:24:09.596]>>>(1/1)73%


[11:24:09.599]>>>(1/1)81%


[11:24:09.602]>>>(1/1)88%


[11:24:09.602]>>>(1/1)96%


[11:24:09.605]>>>(1/1)100%


[11:24:09.605]>>> Completed!


[11:24:09.608]>>>Successful generic response to command 'write-memory'


[11:24:09.609]>>>Response status = 0 (0x0) Success.


[11:24:09.609]>>>Wrote 13696 of 13696 bytes.


[11:24:09.609]>>>当前固件:STM32G0


[11:24:09.610]>>>固件注释:


[11:24:09.610]>>>最大烧录次数:5


[11:24:09.610]>>>固件地址:0x60081000


[11:24:09.611]>>>固件大小:13696


[11:24:09.611]>>>HASH:A7FC63572E9A59AEDF933E4C0898A6CCAF2B28221503FAB8E8FBE5C186045FDC


[11:24:09.611]>>>Running blhost flash-erase-region, wait for a minute......


[11:24:09.616]>>>Inject command 'flash-erase-region'


[11:24:09.666]>>>Successful generic response to command 'flash-erase-region'


[11:24:09.666]>>>Response status = 0 (0x0) Success.


[11:24:09.667]>>>Running blhost write-memory ......


[11:24:09.675]>>>Inject command 'write-memory'


[11:24:09.676]>>>Preparing to send 4096 (0x1000) bytes to the target.


[11:24:09.679]>>>Successful generic response to command 'write-memory'


[11:24:09.679]>>>(1/1)24%


[11:24:09.683]>>>(1/1)49%


[11:24:09.683]>>>(1/1)74%


[11:24:09.686]>>>(1/1)98%


[11:24:09.690]>>>(1/1)100%


[11:24:09.690]>>> Completed!


[11:24:09.690]>>>Successful generic response to command 'write-memory'


[11:24:09.690]>>>Response status = 0 (0x0) Success.


[11:24:09.691]>>>Wrote 4096 of 4096 bytes.


[11:25:05.498]>>>已退出配置,长按连接到上位机,或者重新插拨烧录器usb


[11:25:05.635]>>>{   "command" : "reset",   "response" : [],   "status" : {      "description" : "0 (0x0) Success.",      "value" : 0   }}


[11:25:06.685]>>>fireFlasher_Mini 已断开连接

下面退出配置,断开连接,进行脱机烧录。经测试连续按5次成功烧录后,烧录器就不可以下载烧录了。第6次会失败,指示灯变红并伴随蜂鸣器声音提示。
image.png

烧录次数限制测试OK。

下面试试读保护。使用STLINKV2连接板子测试一下,看看是否能读到固件。

image.png

打开stlink的软件。点击连接。
image.png

发现连接之后固件都被读出来了,怎么搞的啊。烧录器设置怎么无效啊??????
下面图就可以看到固件资料了。
image.png

读保护设置有问题,无法设置成功!!!
还有点不方便的地方就是剩余烧录次数无法读取。这个希望能优化一下。

下面试试随机数功能:
image.png

一键烧录到烧录器后,测试本次限制10次,测试10次OK。
下面读一读数据看看。
下面是读出来的固件和编译的固件对比。
image.png

下面是随机数位置。在0x10000地址写入256个随机数。读出与设置随机数要求一致。
image.png

下面是序列号设置。
image.png

读出的序列号地址数据。
image.png

本次就测试这些了。基本功能都可以。但是最重要的读保护设置一直不成功,多次设置测试都无效。这是个重大故障。希望能修复。

更多回帖

×
发帖