MDK Key Code符号说明

7 篇文章 0 订阅

MDK Key Code 符号说明

最近总有人问MDK里的文件转换问题,关于其中的符号,MDK的文档已经写的够详细了,我再搬一下原文档吧,也许这就是书非借不能读也的原因。
比较典型的应用就是:
armcc bin文件转换:
fromelf.exe使用相对路径:

$KARM\ARMCC\bin\fromelf.exe --bin -o "$L@L.bin" "#L"

$K表示MDK的安装目录
$L表示连接输出的文件目录
@L表示连接输出的文件名
#L表示连接输出的文件名本身引用
如果是用armgcc,则命令要改一改,使用objcopy命令:
转成hex文件

$KARM\ARMGCC\bin\arm-none-eabi-objcopy.exe -O ihex "$L@L.elf" "$L@L.hex"

转成bin文件

$KARM\ARMGCC\bin\arm-none-eabi-objcopy.exe -O binary "$L@L.elf" "$L@L.bin"

注:我的armgcc安装在 D:\Keil_v5\ARM\ARMGCC\ 这里。
在这里插入图片描述

以下是MDK原文档,关于其它的一些符号,可以查下面的表。

Key Sequence for Tool Parameters

Use Key Sequences to pass arguments from µVision to external user programs. Key Sequences are combinations of a Key Code and a File Code. Key sequences can be used, for example, in the dialogs Tools, SVCS, Options for Target — User, or from the command line. The following rules apply:

Certain Key Codes have to be duplicated when used from the command line.

To use the symbols $, #, %, @, ~, ^
escape them with $$, ##, %%, @@, ~~, ^^.

Enclose Key Sequences within quotes (" ") when using folder names that might contain special characters (space, ~, or #).

Key Codes and File Codes are listed in the tables below:
在这里插入图片描述

Environment Variables

You can use environment variables for passing paths to external programs. This is described explicitly in the respective dialog documentation. Environment variables must be enclosed by curly brackets ({ }). For example, you have defined an environment variable with
SET ProgramFiles(x86)=C:\Program Files (x86).

You can use the environment variable as
{ProgramFiles(x86)} in dialog fields.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值