[MCU]使用Keil生成bin,汇编,C和汇编混合文件,再也不需要调试!

1.谈论一首歌曲“五百英里”。

对于像虫子一样深的朋友们!今天,我将与您详细讨论如何在Keil中生成bin文件,程序集文件以及C和程序集混合文件,并详细介绍如何使用该工具生成fromelf.exe。

2.主体部分1主题介绍。

在Keil集成开发环境中,最常用的文件可能是.hex。

如果考虑内存布局,则将使用.map文件。

如果遇到困难的错误,您还将在仿真过程中进行查看。

看一下编译窗口栏。

但是,bin文件是最直接的嵌入式固件,它也是我们需要获取的文件,例如远程升级等,一方面,它可以被其他十六进制直接转换为bin工具。

另一方面,通过集成开发环境的功能。

只需进行转换即可。

同样,有时我们不想在调试状态下通过组装栏查看组装,而是希望直接分析由每个源文件的编译生成的组装文件,以查找问题并优化性能。

集成开发环境可以生成程序集文件。

它再方便不过了。

2生成bin文件1 formelf.exe引入了fromelf.exe,这是在keil下处理elf文件的工具。

elf文件的英文名称是Executive and Linking Format。

该文件包括符号表,调试信息,程序集等,因此通过使用fromelf .exe可以输出更多信息文件,例如hex,bin,asm等。

有关此工具的详细说明文件,请参阅:using_the_fromelf_utility .pdf该文档很容易在Internet上搜索,因此在这里我不会在黑板上写东西。

如果您想省些麻烦,可以直接使用cmd输出formelf.exe的帮助信息,过程如下。

2 formelf.exe的详细说明1.首先在Windows运行栏中找到cmd命令输入。

2.输入命令行.fromelf.exe --help该错误仅在上面的输出中进行了注释。

1 ARM& nbsp;图像& nbsp;实用程序2fromelf& nbsp; [选项]& nbsp; input_file 3 4选项:5 --help& nbsp;& nbsp;& nbsp;& nbsp;& nbsp ;& nbsp;& nbsp;& nbsp;显示此帮助& nbsp;屏幕// [显示帮助信息] 6 –vsn& nbsp;& nbsp;& nbsp;& nbsp; & nbsp;& nbsp;& nbsp;& nbsp;& nbsp; display& nbsp;版本& nbsp;信息// [显示版本信息] 7-输出& nbsp;文件& nbsp ;& nbsp;输出文件。

& nbsp;(对于-text& nbsp格式,默认为&stamp; stdout)// [输出文件。

(-text格式默认为stdout)] 8 --nodebug不要在输出图像中放置// [不要在输出图像中放置调试域] 9 --nolinkview不会输出和输出图像中的部分// [不要在输出图像中放置段信息] 10 11二进制输出和输出格式:12- -bin& nbsp;& nbsp;& nbsp;& nbsp;& nbsp;& nbsp;& nbsp;& nbsp;普通& nbsp;二进制// [Bin档案] 13 --m32& nbsp;& nbsp;& nbsp;& nbsp;& nbsp;& nbsp;& nbsp;& nbsp;& nbsp;摩托罗拉32位; Hex // [摩托车格式的十六进制文件] 14 --i32& nbsp;& nbsp; & nbsp;& nbsp;& nbsp;& nbsp;& nbsp;& nbsp;英特尔32位十六进制// [Intel格式十六进制文件] 15 --vhx& nbsp; & nbsp;& nbsp;& nbsp;& nbsp;& nbsp;& nbsp;& nbsp;& nbsp;字节& nbsp;面向字节的" Hex& nbsp; format / / [面向字节的十六进制格式] 16 17-可选地为m32,i32 18的base& nbsp;& nbsp;& nbsp; set& nbsp; base& nbsp; base& nbsp地址19输出要求的格式调试信息20-字段偏移量&汇编语言结构/类的描述21-扩展数组   & nbsp;& nbsp;  & nbsp;扩展了22 23其他输出格式:24 --elf& nbsp;& nbsp;& nbsp;& nbsp;& nbsp;       & nbsp;& nbsp; & nbsp;& nbsp;& nbsp;& nbsp;& nbsp;& nbsp;& nbsp;& nbsp;文本& nbsp;信息26 27个用于文本信息的标志28 -v& nbsp;& nbsp;& nbsp;& nbsp;& nbsp;& nbsp;& nbsp;& nbsp;& nbsp;详细29 -a& nbsp;& nbsp;& nbsp;& nbsp; & nbsp;& nbsp;& nbsp;& nbsp;打印& nbsp;数据& nbsp;地址 (对于使用调试功能构建的图像和图像)// [打印数据地址信息] 30 -c

产品知识/行业、品牌资讯