不想看怎么使用,就用以下两条命令就好。
1、这条直接复制到上面箭头框里,记得打钩,这条是直接在输出目录下生成bin文件
fromelf --bin -o "$L\@L.bin" "#L"
2、这条是在输出目录下的BIN文件夹下生成bin文件
fromelf --bin -o "$LBIN\@L.bin" "#L"
3、这条是在输出目录下的上一级目录的BIN文件夹下生成bin文件
fromelf --bin -o .\BIN\@L.bin "#L"
formelf.exe的语法,参考这位博主的 Keil如何用fromelf.exe工具生成目标(bin,hex等)文件-优快云博客
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 (打印代码和数据大小的信息)
fromelf 中 $L、@L、L的用法
$L、@L、L用来指定对应的路径或名称。
1、L是指axf文件路径,加文件名。
2、$L是指axf的文件路径,不含文件名。
3、@L是指axf的文件名,不含axf的后缀。
4、#L:表示生成的链接文件的完整路径名及文件名
比如我的输出路径是
那么我使用这条命令 fromelf --bin -o "$LBIN\@L.bin" "#L"
生成的bin文件路径如下
L的内容为:..\OUTPUT\test.axf
$L的内容为:..\OUTPUT\ (包含最后的“\”)
@L的内容为:test
因此命令中 "$LBIN\@L.bin"
就为 ..\OUTPUT\BIN\test.bin