Nordic nRF51/52系列蓝牙SoC安全固件升级
2018-10-22 本文已影响9人
飞哥物联
下载nrfutil
官方下载地址:https://github.com/NordicSemiconductor/pc-nrfutil/releases
本编文章使用的是V4.0.0。
生成秘钥
nrfutil keys generate <filename>

生成固件包
把应用程序的hex文件放到nrfutil目录,然后用下面命令生成固件zip包。更多用法查看帮助,“ nrfutil.exe pkg generate --help ”。
nrfutil pkg generate --hw-version 51 --sd-req 0x87 --application-version 1 --application nrf51422_xxac.hex --key-file key.pem app_dfu.zip

--hw-version 后面跟硬件类型,nRF51系列则为51,nRF52系列则为52;
--sd-req 后面跟SoftDevice版本,可以用nRFgo Studio查看,如下图所示;

--application-version 后面跟应用程序版本号;
--application 后面跟应用程序hex文件;
--key-file 后面跟上一步生成的秘钥文件;
最后指定将要生成的固件zip包名。