本次测试STM32F103RET6的离线功能。
一、业务场景
对于一些设备在户外,无法进行OTA升级,这个时候脱机烧录器就很贴心很好用了。
二、固件上传脱机烧录器
连接脱机烧录器到PC,选择MCU为STM32F103RET6, 把编译生成的hex文件,加载到APP,固件较大的时候,上位机APP会自动提示分段,点击确认即可。
点击上位机APP上的“一键烧录”,上位机软件会分析hex文件并将文件烧录至脱机烧录器。
[21:53:25.105]>>>当前MCU型号: STM32F101RE
[21:53:25.106]>>>正在解析文件: E:/fireFlasher/firmware/opt_pack_info/st/STM32/STM32F1xx/STM32F10xxx.yml
[21:53:28.654]>>>Running packFile......
[21:53:28.659]>>>Finish packFile......
[21:53:28.659]>>>Starting Create file......
[21:53:28.660]>>>Starting Write file......
[21:53:28.662]>>>Finish Create file E:/fireFlasher/tmp/新建固件_1.fire......
[21:53:28.662]>>>Running blhost flash-erase-region, wait for a minute......
[21:53:28.728]>>>Inject command 'flash-erase-region'
[21:53:29.506]>>>Successful generic response to command 'flash-erase-region'
[21:53:29.506]>>>Response status = 0 (0x0) Success.
[21:53:29.511]>>>Running blhost write-memory ......
[21:53:29.513]>>>Inject command 'write-memory'
[21:53:29.514]>>>Preparing to send 70576 (0x113b0) bytes to the target.
[21:53:29.515]>>>Successful generic response to command 'write-memory'
[21:53:29.517]>>>(1/1) 1%
[21:53:29.518]>>>(1/1) 2%
[21:53:29.521]>>>(1/1) 4%
[21:53:29.523]>>>(1/1) 5%
[21:53:29.525]>>>(1/1) 7%
[21:53:29.528]>>>(1/1) 8%
[21:53:29.530]>>>(1/1)10%
[21:53:29.534]>>>(1/1)11%
[21:53:29.535]>>>(1/1)12%
[21:53:29.538]>>>(1/1)14%
[21:53:29.541]>>>(1/1)15%
[21:53:29.544]>>>(1/1)17%
[21:53:29.545]>>>(1/1)18%
[21:53:29.548]>>>(1/1)20%
[21:53:29.551]>>>(1/1)21%
[21:53:29.553]>>>(1/1)22%
[21:53:29.555]>>>(1/1)24%
[21:53:29.558]>>>(1/1)25%
[21:53:29.561]>>>(1/1)27%
[21:53:29.563]>>>(1/1)28%
[21:53:29.566]>>>(1/1)30%
[21:53:29.568]>>>(1/1)31%
[21:53:29.570]>>>(1/1)32%
[21:53:29.572]>>>(1/1)34%
[21:53:29.575]>>>(1/1)35%
[21:53:29.577]>>>(1/1)37%
[21:53:29.580]>>>(1/1)38%
[21:53:29.583]>>>(1/1)40%
[21:53:29.585]>>>(1/1)41%
[21:53:29.588]>>>(1/1)43%
[21:53:29.590]>>>(1/1)44%
[21:53:29.593]>>>(1/1)45%
[21:53:29.595]>>>(1/1)47%
[21:53:29.598]>>>(1/1)48%
[21:53:29.600]>>>(1/1)50%
[21:53:29.603]>>>(1/1)51%
[21:53:29.605]>>>(1/1)53%
[21:53:29.608]>>>(1/1)54%
[21:53:29.610]>>>(1/1)55%
[21:53:29.613]>>>(1/1)57%
[21:53:29.615]>>>(1/1)58%
[21:53:29.618]>>>(1/1)60%
[21:53:29.620]>>>(1/1)61%
[21:53:29.622]>>>(1/1)63%
[21:53:29.625]>>>(1/1)64%
[21:53:29.628]>>>(1/1)65%
[21:53:29.629]>>>(1/1)67%
[21:53:29.632]>>>(1/1)68%
[21:53:29.635]>>>(1/1)70%
[21:53:29.637]>>>(1/1)71%
[21:53:29.640]>>>(1/1)73%
[21:53:29.642]>>>(1/1)74%
[21:53:29.645]>>>(1/1)75%
[21:53:29.647]>>>(1/1)77%
[21:53:29.649]>>>(1/1)78%
[21:53:29.652]>>>(1/1)80%
[21:53:29.655]>>>(1/1)81%
[21:53:29.657]>>>(1/1)83%
[21:53:29.661]>>>(1/1)84%
[21:53:29.662]>>>(1/1)86%
[21:53:29.664]>>>(1/1)87%
[21:53:29.667]>>>(1/1)88%
[21:53:29.670]>>>(1/1)90%
[21:53:29.672]>>>(1/1)91%
[21:53:29.675]>>>(1/1)93%
[21:53:29.677]>>>(1/1)94%
[21:53:29.679]>>>(1/1)96%
[21:53:29.681]>>>(1/1)97%
[21:53:29.684]>>>(1/1)98%
[21:53:29.687]>>>(1/1)100%
[21:53:29.687]>>> Completed!
[21:53:29.689]>>>Successful generic response to command 'write-memory'
[21:53:29.690]>>>Response status = 0 (0x0) Success.
[21:53:29.691]>>>Wrote 70576 of 70576 bytes.
[21:53:29.691]>>>当前固件:新建固件_1
[21:53:29.692]>>>固件注释:
[21:53:29.692]>>>最大烧录次数:无限制
[21:53:29.693]>>>固件地址:0x60081000
[21:53:29.693]>>>固件大小:70576
[21:53:29.693]>>>HASH:34C4314F1731EA3283AE14B4F9191DDD95A750E3831F9E6FB6929DF0B4DC90A8
[21:53:29.697]>>>Running blhost flash-erase-region, wait for a minute......
[21:53:29.700]>>>Inject command 'flash-erase-region'
[21:53:29.745]>>>Successful generic response to command 'flash-erase-region'
[21:53:29.746]>>>Response status = 0 (0x0) Success.
[21:53:29.748]>>>Running blhost write-memory ......
[21:53:29.759]>>>Inject command 'write-memory'
[21:53:29.761]>>>Preparing to send 4096 (0x1000) bytes to the target.
[21:53:29.765]>>>Successful generic response to command 'write-memory'
[21:53:29.766]>>>(1/1)24%
[21:53:29.767]>>>(1/1)49%
[21:53:29.768]>>>(1/1)74%
[21:53:29.771]>>>(1/1)98%
[21:53:29.773]>>>(1/1)100%
[21:53:29.774]>>> Completed!
[21:53:29.775]>>>Successful generic response to command 'write-memory'
[21:53:29.775]>>>Response status = 0 (0x0) Success.
[21:53:29.776]>>>Wrote 4096 of 4096 bytes.
之后点击“退出配置”。
[21:53:49.327]>>>已退出配置,长按连接到上位机,或者重新插拨烧录器usb
[21:53:49.412]>>>{ "command" : "reset", "response" : [], "status" : { "description" : "0 (0x0) Success.", "value" : 0 }}
[21:53:49.424]>>>fireFlasher_Mini 已断开连接
三、脱机烧录
fireFlasher Mini 脱机烧录器使用SWD协议对芯片进行下载,不支持JTAG协议的接口。
既然只能SWD,那就4根线了,TMS + TCK, VREF + GND随便接接,脱机烧录器随带的线很赞,每根线头都有标记。
点击脱机烧录器的红色按钮,一会儿固件就从脱机烧录器烧写至目标开发板。
下载固件
|