Keil如何用fromelf.exe工具生成目标(bin,hex等)文件

比如要生成.bin文件: fromelf.exe --bin -o “XX.bin” "#L"

工程配置如下:

最终生成了XX.bin格式文件 :

下面列出fromelf.exe语法:

fromelf [options] input_file  (命令的格式)

Options:
       --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 image (在生成的映象中不包含段的信息)

Binary Output Formats:
       --bin          Plain Binary (生成Plain Binary格式的文件)
       --m32          Motorola 32 bit Hex (生成Motorola 32位十六进制格式的文件)
       --i32          Intel 32 bit Hex (生成Intel 32位十六进制格式的文件)
       --vhx          Byte Oriented Hex format (面向字节的位十六进制格式的文件t)

       --base addr    Optionally set base address for m32,i32 (设置m32,i32格式文件的基地址)

Output Formats Requiring Debug Information (需要调试信息的格式)
       --fieldoffsets Assembly Language Description of Structures/Classes (结构/类的汇编语言描述)
       --expandarrays Arrays inside and outside structures are expanded (扩展数组内部和外部结构被扩展)

Other Output Formats:
       --elf         ELF
       --text        Text Information (显示文本信息)

                Flags 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 (打印代码和数据大小的信息)
发布了66 篇原创文章 · 获赞 144 · 访问量 41万+

猜你喜欢

转载自blog.csdn.net/hpf247/article/details/102920943