MDK生成bin格式固件文件和反汇编文件
MDK生成bin格式固件文件
- 1、BIN格式固件生成
- 2、反汇编文件生成
1、BIN格式固件生成
使用keil自带的fromelf进行转换,在keil的安装目录下的ARM\ARMCC\bin目录中。

fromelf语法格式使用说明:
Product: MDK Plus 5.21
Component: ARM Compiler 5.06 update 3 (build 300)
Tool: fromelf [4d35c3]
For support see http://www.arm.com/support
Software supplied by: ARM LimitedARM image conversion utility
fromelf [options] input_fileOptions:--help display this help screen--vsn display version information--output file the output file. (defaults to stdout for -text format)--nodebug do not put debug areas in the output image--nolinkview do not put sections in the output imageBinary Output Formats:--bin Plain Binary--m32 Motorola 32 bit Hex--i32 Intel 32 bit Hex--vhx Byte Oriented Hex format--base addr Optionally set base address for m32,i32Output Formats Requiring Debug Information--fieldoffsets Assembly Language Description of Structures/Classes--expandarrays Arrays inside and outside structures are expandedOther Output Formats:--elf ELF--text Text InformationFlags for Text Information-v verbose-a print data addresses (For images built with debug)-c disassemble code-d print contents of data section-e print exception tables-g print debug tables-r print relocation information-s print symbol table-t print string table-y print dynamic segment contents-z print code and data size information
打开Keil如下图,添加一行:
fromelf --bin -o "$L@L.bin" "#L"

fromelf工具中中$L、@L、#L的用法:
- #L表示axf文件路径(带文件名)
- $L表示axf文件路径(不带文件名)
- @L表示axf文件名,不包含.axf后缀
2、反汇编文件生成
fromelf --text -c -o "$L@L.asm" "#L"
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
