keil使用记录

官方资料

https://developer.arm.com/documentation/101407/0539/?lang=en
在这里插入图片描述

armcc.exe

DUI0472M_armcc_user_guide.pdf

Product: MDK Plus 5.36
Component: ARM Compiler 5.06 update 7 (build 960)
Tool: armcc [4d365d]
For support see http://www.arm.com/support
Software supplied by: ARM Limited

Usage:         armcc [options] file1 file2 ... filen
Main options:

--arm          Generate ARM code
--thumb        Generate Thumb code
--c90          Switch to C mode (default for .c files)
--cpp          Switch to C++ mode (default for .cpp files)
-O0            Minimum optimization
-O1            Restricted optimization for debugging
-O2            High optimization
-O3            Maximum optimization
-Ospace        Optimize for codesize
-Otime         Optimize for maximum performance
--cpu <cpu>    Select CPU to generate code for
--cpu list     Output a list of all the selectable CPUs
-o <file>      Name the final output file of the compilation
-c             Compile only, do not link
--asm          Output assembly code as well as object code
-S             Output assembly code instead of object code
--interleave   Interleave source with disassembly (use with --asm or -S)
-E             Preprocess the C source code only
-D<symbol>     Define <symbol> on entry to the compiler
-g             Generate tables for high-level debugging
-I<directory>  Include <directory> on the #include search path

armlink.exe

armlink_user_guide_DUI0803_l_en

Product: MDK Plus 5.36
Component: ARM Compiler 5.06 update 7 (build 960)
Tool: armlink [4d3601]
For support see http://www.arm.com/support
Software supplied by: ARM Limited

Usage: armlink option-list input-file-list
where
    option-list      is a list of case-insensitive options.
    input-file-list  is a list of input object and library files.

General options (abbreviations shown capitalised):
   --help          Print this summary.
   --output file   Specify the name of the output file.
   --via file      Read further arguments from file.

Options for specifying memory map information:
   --partial       Generate a partially linked object.
   --scatter file  Create the memory map as described in file.
   --ro-base n     Set exec addr of region containing RO sections.
   --rw-base n     Set exec addr of region containing RW/ZI sections.

Options for controlling image contents:
   --bestdebug     Add debug information giving best debug view to image.
   --datacompressor off
                   Do not compress RW data sections.
   --no_debug      Do not add debug information to image.
   --entry         Specify entry sections and entry point.
   --libpath       Specify path to find system libraries from.
   --userlibpath   Specify path to find user libraries from.
   --no_locals     Do not add local symbols to image symbol table.
   --no_remove     Do not remove unused sections from image.

Options for controlling image related information:
   --callgraph     Create a static callgraph of functions.
   --feedback file Generate feedback that can be used by the compiler in file.
   --info topic    List misc. information about image.
                    Available topics: (separate multiple topics with comma)
                     common   List common sections eliminated from the image.
                     debug    List eliminated input debug sections.
                     sizes    List code and data sizes for objects in image.
                     totals   List total sizes of all objects in image.
                     veneers  List veneers that have been generated.
                     unused   List sections eliminated from the image.
   --map           Display memory map of image.
   --symbols       List symbols in image.
   --xref          List all cross-references between input sections.

fromelf.exe

DUI0477M_fromelf_user_guide.pdf

D:\Program Files\Keil_v5\ARM\ARMCC\bin>"D:\Program Files\Keil_v5\ARM\ARMCC\bin\fromelf.exe"
Product: MDK Plus 5.36
Component: ARM Compiler 5.06 update 7 (build 960)
Tool: fromelf [4d35f4]
For support see http://www.arm.com/support
Software supplied by: ARM Limited

ARM image conversion utility
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
       --m32          Motorola 32 bit Hex
       --i32          Intel 32 bit Hex
       --vhx          Byte Oriented Hex format

       --base addr    Optionally set base address for 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

生成bin

fromelf --bin -o "$L@L.bin" "#L"

在这里插入图片描述

生成asm

fromelf --text -c -o "./$L@L.asm" "#L"

在这里插入图片描述

说明

https://developer.arm.com/documentation/101407/0539/Utilities/Key-Sequence-for-Tool-Parameters?lang=en

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

字符问题

如果°这样的符号显示不出来,用vscode看看编码,改成其他文件相同的即可显示.

printf

/* retarget the C library printf function to the USART */
int fputc(int ch, FILE *f)
{
    usart_data_transmit(USART0, (uint8_t)ch);
    while(RESET == usart_flag_get(USART0, USART_FLAG_TBE));
    return ch;
}

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

亦哟啊哈

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值