Bin2Array工具对于在应用编程时很有用处。
Bin2Array工具可以将二进制文件.bin提取到一个数组,在嵌入式开发过程中,可以
将此数组写到Flash或者RAM,完成在应用编程IAP。
用法:
在dos命令行窗口,执行Bin2Array 参数1 参数2
--参数1为二进制文件名
--参数2为用来存储生成数组的txt文件名字,可以不存在
比如: Bin2Array test.bin test.txt
那么运行结束后,test.txt中内容为
unsigned char binArray[] = {
0x00,0x30,0x00,0x20,0x89,0x41,0x01,0x00,0x49,0x44,0x01,0x00,0x51,0x44,0x01,0x00,0x51,0x44,0x01,0x00,
0x51,0x44......
.....
};
可以将数组拷贝到自己的工程里使用
--BillyThe 2014-10-8