CX51 用户手册----OMF2 伪指令

声明:

1、本翻译仅供个人学习使用,本人没有提供技术支持的义务,也不承担由此引发的任何后果。

2、请勿用于商业用途。

3、英文来自:http://www.keil.com/support/man/docs/c51/。

4、欢迎大家共同与我交流探讨(290207203@qq.com)。

OMF2 Compiler Directive

Abbreviation

O2

Arguments

None.

Default

The C51 Compiler, by default, generates Intel OMF51 object modules.
The CX51 Compiler, by default, generates OMF2 object modules.

µVision

Project — Select Device — Use LX51 instead of BL51.

Description

The OMF2 directive enables the OMF2 file format which provides detailed symbol type checking across modules and eliminates the historic limitations of the Intel OMF51 file format.

The OMF2 file format is required to use the following features of the Cx51 Compiler:

  • Variable Banking: The VARBANKING directive enables use of the far memory type.
  • XDATA ROM: Using the const xdata memory type specifies that XDATA variables are located in ROM.
  • RAM Strings: The STRING directive specifies that string constants are located in xdata or far space.
  • Dallas 390/400/5240/5250 Contiguous Mode: The ROM (D512K) and ROM (D16M)directives enable the contiguous mode of the Dallas Semiconductor 390 and variants.

The OMF2 file format requires the extended LX51 Linker/Locater and cannot be used with the BL51 Linker/Locater.

Example
C51 SAMPLE.C OMF2

#pragma O2

 Related Knowledgebase Articles



OMF2 编译器伪指令

缩写

O2

参数

无。

缺省

C51 编译器缺省生成Intel OMF51目标模块。
CX51 编译器缺省生成OMF2目标模块。

µVision

Project — Select Device — Use LX51 instead of BL51.

描述

OMF2 伪指令使能OMF2 文件格式,它提供模块间符号类型检查的细节,并消除  Intel OMF51 文件格式的限制。

OMF2 文件格式需要使用Cx51 编译器的下列特性:

  • 变量分组: VARBANKING 伪指令使能 far 存储器类型。
  • XDATA ROM: 使用 const xdata 存储器类型指示 XDATA 变量定位在 ROM。
  • RAM 串: STRING 伪指令指示串常量定位在xdata 或 far 空间。
  • Dallas 390/400/5240/5250 连续模式: ROM (D512K)ROM (D16M)使能Dallas  390 和变体的连续模式。

OMF2 文件格式需要扩展的LX51 链接器/定位器,不能使用 BL51 链接器/定位器。

示例
C51 SAMPLE.C OMF2

#pragma O2



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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值