一、概述
在某些特殊的场合,我们可能需要将hex转bin、或者bin转hex、或者将hex进行合并,可以利用Python脚本
二、实现
Python 2.7.12下载链接点击这里
intelhex下载链接点击这里
hex转bin功能的Python指令如下:
C:\Python27\Scripts> python hex2bin.py cc2640r2lp_host_test.hex cc2640.bin
bin转hex功能的Python指令如下:
C:\Python27\Scripts> python bin2hex.py cc2640.bin cc2640r2lp_host_test.hex
hex合并功能的Python指令如下:
C:\Python27\Scripts> python hexmerge.py -o target.hex simple_peripheral_cc2640r2lp_app.hex -o oad.hex