使用keil生成bin文件

 

 
相关文件  下载 http://pan.baidu.com/share/link?shareid=478269&uk=1107426113

使用kei自带的工具的话是

打开Options for Target 对话框,选择User标签页;

勾选Run User Programs After Build/Rebuild框中的Run #1多选框。

UV3版本在文本框输入C:/Keil/ARM/BIN31/fromelf.exe --bin -o ./test.bin ./test.axf命令行; 

UV4版本 在文本框输入C:/Keil/ARM/BIN40/fromelf.exe --bin -o ./test.bin ./test.axf

注意:首先,UV4的路径是BIN40,UV3是BIN31。

 其次,根据自己电脑上安装KEIL的位置,来选择在什么盘(上面的例子默认在C盘)。

编译

 

然而当keil是破解版本的时候往往就出一些意料不到的问题,导致生成的bin文件经过IAP升级不能运行

 

如果keil是破解的,使用keil自带的工具生成的bin文件很可能是不能用的,使用IAP升级会失败

hex2bin.exe放到一个指定位置,我这里放到了c盘的根目录下

修改keil设置-user-#run内容

c:\hex2bin.exe .\flash\STM32F207RTOS.hex

C:\hex2bin.exe指向的是转换软件

.\flash\STM32F207RTOS.hex是要转换的hex文件

编译完成后会出现以下字符

 User command #1: c:\hex2bin.exe .\flash\STM32F207RTOS.hex

hex2bin v1.0.1, Copyright (C) 1999 Jacques Pelletier

Lowest address = 00010000

Highest address = 000493AF

 

hex文件存放的地方就能找到生成的bin文件,使用IAP下载即可

hex2bin.exe 可以再http://pan.baidu.com/share/link?shareid=478269&uk=1107426113下载 

转载于:https://www.cnblogs.com/lvjunjie/p/9008813.html

hex2bin v2.2, Copyrhex2bin v2.2, Copyright (C) 2015 Jacques Pelletier & contributorsight (C) 2015 Jacques Pelletier & contributors usage: hex2bin [OPTIONS] filename Options: -a Address Alignment Word (hex2bin only) -b Batch mode: exits if specified file doesn't exist -c Enable record checksum verification -C [Poly][Init][RefIn][RefOut][XorOut] CRC parameters -e [ext] Output filename extension (without the dot) -E [0|1] Endian for checksum/CRC, 0: little, 1: big -f [address] Address of check result to write -F [address] [value] Address and value to force -k [0-4] Select check method (checksum or CRC) and size -d display list of check methods/value size -l [length] Maximal Length (Starting address + Length -1 is Max Address) File will be filled with Pattern until Max Address is reached -m [size] Minimum Block Size File Size Dimension will be a multiple of Minimum block size File will be filled with Pattern Length must be a power of 2 in hexadecimal [see -l option] Attention this option is STRONGER than Maximal Length -p [value] Pad-byte value in hex (default: ff) -r [start] [end] Range to compute checksum over (default is min and max addresses) -s [address] Starting address in hex for binary file (default: 0) ex.: if the first record is :nn010000ddddd... the data supposed to be stored at 0100 will start at 0000 in the binary file. Specifying this starting address will put pad bytes in the binary file so that the data supposed to be stored at 0100 will start at the same address in the binary file. -v Verbose messages for debugging purposes -w Swap wordwise (low <-> high)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值