Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
74
Добавлен:
14.04.2015
Размер:
2.03 Mб
Скачать

Keil Software — A51/AX51/A251 Macro Assembler and Utilities

321

 

 

Output File Controls

The linker/locator either generates absolute object files or banked object files.

9

Absolute object files contain no relocatable information or external references.

Absolute object files can be loaded into debugging tools or may be converted

 

 

into Intel HEX files for PROM programming by OHx51 Object-Hex Converter.

 

 

Banked object files generated by the BL51 linker/locater must be converted by

 

 

the OC51 Banked Object File Converter into absolute object files (one for each

 

 

bank) to convert them into Intel HEX files by the OH51 Object-Hex Converter.

 

 

The generated object module may contain debugging information if the

 

 

linker/locator is so directed. This information facilitates symbolic debugging

 

 

and testing. You may use the linker controls to suppress debugging information

 

 

in the object file. The following table provides an overview of the controls that

 

 

control information in the output file. For a detailed description of each control

 

 

refer to the page specified in the table.

 

 

 

 

 

 

 

 

 

 

BL51

LX51, L251

Page

Description

 

 

ASSIGN

322

Defines public symbols on the command

 

 

 

 

 

line.

 

 

IBANKING

323

Generate bank switch code for Infineon

 

 

 

 

 

TV TEXT devices SDA555x and

 

 

 

 

 

SDA30C16x.

 

 

NAME

NAME

323

Specifies a module name for the object

 

 

 

 

 

file.

 

 

NOAJMP

NOAJMP

325

Generate bank switch code without

 

 

 

 

 

AJMP instructions.

 

 

NOINDIRECTCALL

NOINDIRECTCALL

327

Do not generate by default bank switch

 

 

 

 

 

code for indirectly called functions.

 

 

NOJMPTAB

328

Do not generate bank switch code.

 

 

NOTYPE

327

Specifies a module name for the object

 

 

 

 

 

file.

 

 

NODEBUGLINES

OBJECTCONTROLS

325

Excludes debug information from the

 

 

NODEBUGPUBLICS

 

330

object file.

 

 

NODEBUGSYMBOLS

 

 

 

 

 

 

322

Chapter 9. Linker/Locator

 

 

 

 

ASSIGN

 

9

Restriction:

This control is available in LX51 and L251 only.

 

Abbreviation:

AS

 

Arguments:

ASSIGN (symname (value) , ... )

 

Default:

None

 

µVision2 Control: Options – Lx51 Misc – Assign.

 

Description:

ASSIGN defines a PUBLIC symbol whit a numeric value at

 

 

Lx51 linker/locater level. The PUBLIC symbol is handled

as a number without a specific memory class and matches with an unresolved external symbol with the same name.

Example:

L251 MYFILE.OBJ ASSIGN (FUNC (0x2000), BITVAR (20H.2))

 

 

In this example the public symbols FUNC and BITVAR are

 

defined. The value 0x2000 is given as value for FUNC.

 

The value 20H.2 is used as bit-address for BITVAR.

Keil Software — A51/AX51/A251 Macro Assembler and Utilities

323

 

 

IBANKING

Restriction:

This control is available in BL51 only.

9

Abbreviation:

IB

 

 

 

 

 

Arguments:

IBANKING (bank_sfr_address)

 

Default:

The default bank_sfr_address is 0x94. This is also the SFR

 

 

address for the support Infineon devices.

 

µVision2 Control: Options – Lx51 Misc – Misc Controls – enter the control.

 

Description:

With the BL51 linker/locater control IBANKING the linker

 

 

uses the on-chip code banking hardware of the Infineon

 

 

SDA30C16x/26x and SDA555x TV TEXT devices. The

 

 

BL51 linker/locater places automatically all code segments

 

 

in the bank area, which do not have the ?CO? prefix or ?CO

 

 

postfix. Segments with a ?CO prefix or postfix are placed

 

 

into the common area.

 

 

The module L51_BANK.A51 is not used when the control

 

 

IBANKING is used. The BL51 linker/locater generates in

 

 

this operation mode a jump table with the following format:

 

 

 

 

 

 

MOV

bank_sfr,#BANK_NUMBER

 

 

 

LJMP

target

 

 

See Also:

Example:

NOTE

When you are using this directive, you need also special C51 run-time libraries. Please contact Keil Software to obtain these C51 run-time libraries.

NOAJMP, NOINDIRECTCALL, NOJMPTAB, BANKAREA

BL51 BANK0 {MODULA.OBJ}, BANK1 {MODULB.OBJ} IBANKING

BL51 BANK0 {MODULA.OBJ}, BANK1 {MODULB.OBJ} IB (80H)

 

324

Chapter 9. Linker/Locator

 

 

 

 

NAME

 

9

Abbreviation:

NA

 

Arguments:

NAME (modulename)

 

Default:

Module name of the first object file in the input list is used.

 

µVision2 Control:

Options – Lx51 Misc – Misc Controls – enter the control.

 

Description:

Use the NAME control to specify a module name for the

 

 

absolute object module that the BL51 linker/locator

generates. The NAME control may be accompanied by the module name (in parentheses) that you want to assign. If no module name is specified with the NAME control, the name of the first input module is used for the module name.

NOTE

The module name specified with the NAME control is not the filename of the absolute object file. The module name is stored in the object module file and may be accessed only by a program that reads the contents of that file.

Example:

BL51 MYPROG.OBJ TO MYPROG.ABS NAME(BIGPROG)

 

 

In this example BIGPROG is the module name stored in the

 

object file.

Keil Software — A51/AX51/A251 Macro Assembler and Utilities

325

 

 

NOAJMP

Abbreviation:

NOAJ

9

Default:

The Lx51 linker/locater generates for code banking

 

 

applications an inter-bank jump table. This bank switch

 

 

table is used for jumps into a code bank from a different

 

 

code bank or the common area. Depending on the table size,

 

 

the linker uses AJMP or LJMP instructions within this bank

 

 

switch table.

 

µVision2 Control: Options – Lx51 Misc – Misc Controls – enter the control.

 

Description:

With the NOAJMP control you can disable the AJMP

 

 

instruction in the inter-bank jump table. This option is

 

 

required for 8051 derivatives that are not supporting the

 

 

AJMP instruction.

 

See Also:

IBANKING, NOINDIRECTCALL, NOJMPTAB,

 

 

BANKAREA

 

Example:

BL51 MYPROG.OBJ NOAJMP

 

 

326

Chapter 9. Linker/Locator

 

 

 

 

NODEBUGLINES, NODEBUGPUBLICS,

9

NODEBUGSYMBOLS

Restriction:

This control is available in BL51 only. For LX51 and L251

 

 

use the OBJECTCONTROLS control.

 

 

 

Abbreviation:

NODL, NODP, NODS

 

Default:

Include complete debug information in the output file.

 

µVision2 Control: Options – Lx51 Misc – Misc Controls – enter the control.

 

Description:

The NODEBUGLINES control directs the BL51

 

 

linker/locator to exclude line number information from the

 

 

output object file.

 

 

The NODEBUGPUBLICS control excludes public symbol

 

 

information from the output object file.

 

 

The NODEBUGSYMBOLS control excludes local symbol

 

 

information from the output object file.

 

 

 

 

 

 

NOTE

 

 

Line number and symbol information in the absolute object

 

 

file is used for symbolic debugging in the µVision2 debugger

 

 

or in-circuit emulator. If you exclude debug information,

 

 

source level debugging of your program is no longer

 

 

possible.

 

 

See Also:

NOLINES, NOPUBLICS, NOSYMBOLS,

 

 

OBJECTCONTROLS, PRINTCONTROLS

Example:

BL51 MYPROG.OBJ NODEBUGLINES NODEBUGSYMBOLS

 

Keil Software — A51/AX51/A251 Macro Assembler and Utilities

327

 

 

NOINDIRECTCALL

Abbreviation:

NOIC

9

 

Default:

In code banking applications, the Lx51 linker/locater inserts

 

 

an interbank CALL for each function that is indirectly called

 

 

via a function pointer. This is done (by the linker) to ensure

 

 

that functions which are invoked through a function pointer

 

 

are available to all code banks.

 

µVision2 Control: Options – Lx51 Misc – Misc Controls – enter the control.

Description: The NOINDIRECTCALL control allows you to disable the generation of interbank CALLs (for indirect function calls). This directive is useful if your application uses tables that contain pointers to functions and if you ensure that these indirect function calls never cross a code bank.

See Also:

IBANKING, NOAJMP, NOJMPTAB, BANKAREA

Example:

 

BL51 MYPROG.OBJ NOINDIRECTCALL

 

 

328

 

Chapter 9. Linker/Locator

 

 

 

 

 

NOJMPTAB

 

 

9

Restriction:

This control is available in BL51 only.

 

Abbreviation:

NOJT

 

Default:

The Lx51 linker/locater generates for code banking

 

 

automatically an inter-bank jump table or bank switch table.

 

 

For each function that is located in a code bank and is called

 

 

from a different code bank or the common area the linker

 

 

inserts a bank switch code into the inter-bank jump table

 

 

redirects the function call to this table.

 

µVision2 Control: Options – Lx51 Misc – Misc Controls – enter the control.

 

Description:

When the NOJMPTAB control is stated, BL51 no longer

 

 

inserts inter-bank calls for program calls. This feature is

 

 

implemented to use the user-defined bank switch mechanism

 

 

for code banking. The NOJMPTAB directive modifies the

 

 

following features of BL51:

 

 

 

The linker no longer needs the bank switch configuration

 

 

 

file: L51_BANK.OBJ.

 

 

 

The linker does not modify any jump call instructions.

 

 

The linker does not generate any warnings if a jump/call is

 

 

made to another bank. The user must ensure that the proper

 

 

bank is selected before a call is made since the BL51

 

 

linker/locator no longer selects the bank automatically.

 

See Also:

IBANKING, NOAJMP, NOINDIRECTCALL,

 

 

BANKAREA

Example:

BL51 MYPROG.OBJ NOJMPTAB

 

Keil Software — A51/AX51/A251 Macro Assembler and Utilities

329

 

 

NOTYPE

Restriction:

 

This control is available in LX51 and L251 only.

9

Syntax:

 

NOTYPE

 

 

Abbreviation:

 

NOTY

 

Default:

 

Include complete type information in the output file.

 

µVision2 Control:

 

Options – Lx51 Misc – Misc Controls – enter the control.

 

Description:

 

The NOTYPE control removes symbol type information for

 

 

 

debug symbols from the output file. The symbol type

 

 

 

information is only required for program debugging and has

 

 

 

no influence on the executable code.

 

 

 

 

 

 

 

 

 

NOTE

 

 

 

Symbol type information in the absolute object file is used

 

 

 

for symbolic debugging in the µVision2 debugger or in-

 

 

 

circuit emulator. The Cx51 compiler generates complete

 

 

 

symbol information up to structure members and parameter

 

 

 

passing values. If you exclude symbol type information, you

 

 

 

might no be able to display variables during debugging.

 

 

See also:

 

OBJECTCONTROL, PURGE

 

Example:

 

 

 

 

 

 

LX51 file1.obj NOTYPE

 

 

 

 

 

 

 

330 Chapter 9. Linker/Locator

OBJECTCONTROLS

9

Restriction:

This control is available in LX51 and L251 only.

 

Abbreviation:

OC

 

 

Arguments:

OBJECTCONTROLS (subcontrol , … )

 

Default:

Include complete debug information in the output file.

 

µVision2 Control: Options – Lx51 Misc – Misc Controls – enter the control.

 

Description:

The OBJECTCONTROLS control allows you to remove

 

 

specific debug information from the object output file. The

 

 

subcontrol option can be one or more of the following

 

 

parameters:

 

 

 

 

 

 

 

subcontrol

Removes from the object output file ...

 

 

NOCOMMENTS

... comment records.

 

 

NOLINES

... line number information.

 

 

NOPUBLICS

... public symbol information.

 

 

NOSYMBOLS

... local symbol information.

 

 

PURGE

... complete debug information.

 

See Also:

NOCOMMENTS, NOLINES, NOPUBLICS,

 

 

NOSYMBOLS, OBJECTCONTROLS, PURGE

Example:

LX51 MYPROG.OBJ OBJECTCONTROLS (NOCOMMENTS)

 

Соседние файлы в папке HLP