KEIL5 编译生成 hex、bin文件

--- title: file_name date: 2020-05-31 10:27:10 categories: tags: - stm32 - keil - config ---

KEIL 工程下 编译生成 hex和 bin文件

背景

为了发布生产的固件,需要用到bin文件。

生成hex

在Keil中:Option - Output

  • [x] Create HEX file

生成bin

在Keil中:Option - User - After Build/Rebuild

  • [x] Run #1,填入:fromelf.exe --bin -o "%L@L.bin" "#L"

这个命令的意思是使用fromelf.exe 脚本 去转换 #L(通配符)文件 并指定-o生成的文件为 %L@L.bin(通配符) 文件。

此后再次重新编译工程,即可通过工程 的.axf文件生成 .bin文件。

原文地址:https://www.cnblogs.com/schips/p/12996616.html