keil工程生成bin文件方式

方法1

在魔法棒设置里面找到User选项栏

在红色区域内打勾并输入下面的指令

C:\Keil_v5\ARM\ARMCC\bin\fromelf.exe --bin -o "$L@L.bin" "#L"

就是利用了fromelf.exe命令   --bin  表示输出bin文件   -o 输出目录   源文件

After Build - User command #1: C:\Keil_v5\ARM\ARMCC\bin\fromelf.exe --bin -o "C:\Users\hua\Desktop\App\USER\Objects\app.bin" "C:\Users\hua\Desktop\App\USER\Objects\app.axf"
# keil 官方示例
$K\ARM\ARMCC\bin\fromelf.exe --i32combined --output=@L.hex !L
C:\Keil\ARM\ARMCC\bin\fromelf.exe --i32combined --output=myprog.hex myprog.axf

方法2

使用hex2bin.exe这个命令行工具

hex2bin.exe  xxxx.hex 

hex2bin.exe下载地址https://www.keil.com/download/docs/7.asp

posted @ 2024-03-01 08:52  huameixiao  阅读(43)  评论(0编辑  收藏  举报