- •Preface
- •Document Conventions
- •Contents
- •Chapter 1. Introduction
- •Manual Topics
- •Changes to the Documentation
- •Evaluation Kits and Production Kits
- •Types of Users
- •Requesting Assistance
- •Software Development Cycle
- •Product Overview
- •Chapter 2. Installation
- •System Requirements
- •Installation Details
- •Folder Structure
- •Chapter 3. Development Tools
- •C51 Optimizing C Cross Compiler
- •A51 Macro Assembler
- •BL51 Code Banking Linker/Locator
- •LIB51 Library Manager
- •OC51 Banked Object File Converter
- •Chapter 4. Creating Applications
- •Creating Projects
- •Project Targets and File Groups
- •Overview of Configuration Dialogs
- •Code Banking
- •µVision2 Utilities
- •Writing Optimum Code
- •Tips and Tricks
- •Chapter 5. Testing Programs
- •µVision2 Debugger
- •Debug Commands
- •Expressions
- •Tips and Tricks
- •Chapter 6. µVision2 Debug Functions
- •Creating Functions
- •Invoking Functions
- •Function Classes
- •Chapter 7. Sample Programs
- •HELLO: Your First 8051 C Program
- •Introduction
- •RTX51 Technical Data
- •Overview of RTX51 Routines
- •TRAFFIC: RTX-51 Tiny Example Program
- •RTX Kernel Aware Debugging
- •Chapter 9. Using On-chip Peripherals
- •Special Function Registers
- •Register Banks
- •Interrupt Service Routines
- •Interrupt Enable Registers
- •Parallel Port I/O
- •Timers/Counters
- •Serial Interface
- •Watchdog Timer
- •D/A Converter
- •A/D Converter
- •Power Reduction Modes
- •Chapter 10. CPU and C Startup Code
- •Caveats
- •Hardware and Software Requirements
- •Serial Transmission Line
- •µVision2 Monitor Driver
- •µVision2 Restrictions when using Monitor-51
- •Monitor-51 Configuration
- •Troubleshooting
- •Debugging with Monitor-51
- •Chapter 12. Command Reference
- •µVision 2 Command Line Invocation
- •A51 / A251 Macro Assembler Directives
- •C51/C251 Compiler
- •LIB51 / L251 Library Manager Commands
- •OC51 Banked Object File Converter
- •Index
218 |
Chapter 12. Command Reference |
|
|
LIB51 / L251 Library Manager Commands
The LIB51 / LIB251 Library Manager lets you create and maintain library files of your 8051 / 251 object modules. Invoke the library manager using the following command:
LIB51 command
LIB251 @commandfile
|
|
command |
is one of the following commands. If no command is specified |
|
||
|
|
|
LIB51 / LIB251 enters an interactive command mode. |
|
||
|
|
commandfile is the name of a file which contains a complete command line |
|
|||
|
|
|
for the library manager. The command file includes a single |
|
||
|
|
|
command that is executed by LIB51. You may use a command |
|
||
12 |
|
|
file to generate a large library with at once. |
|
||
|
|
|
|
|
|
|
|
LIB51 Command |
|
Description |
|
||
|
|
|
|
|||
|
|
ADD |
|
|
Adds an object module to the library file. For example, |
|
|
|
|
|
|
LIB51 ADD GOODCODE.OBJ TO MYLIB.LIB |
|
|
|
|
|
|
adds the GOODCODE.OBJ object module to MYLIB.LIB. |
|
|
|
CREATE |
|
|
Creates a new library file. For example, |
|
|
|
|
|
|
LIB251 CREATE MYLIB.LIB |
|
|
|
|
|
|
creates a new library file named MYLIB.LIB. |
|
|
|
DELETE |
|
|
Removes an object module from the library file. For example, |
|
|
|
|
|
|
LIB51 DELETE MYLIB.LIB (GOODCODE) |
|
|
|
|
|
|
removes the GOODCODE module from MYLIB.LIB. |
|
|
|
EXTRACT |
|
|
Extracts an object module from the library file. For example, |
|
|
|
|
|
|
LIB251 EXTRACT MYLIB.LIB (GOODCODE) TO GOOD.OBJ |
|
|
|
|
|
|
copies the GOODCODE module to the object file GOOD.OBJ. |
|
|
|
EXIT |
|
|
Exits the library manager interactive mode. |
|
|
|
HELP |
|
|
Displays help information for the library manager. |
|
|
|
LIST |
|
|
Lists the module and public symbol information stored in the library file. |
|
|
|
|
|
|
For example, |
|
|
|
|
|
|
LIB251 LIST MYLIB.LIB TO MYLIB.LST PUBLICS |
|
|
|
|
|
|
generates a listing file (named MYLIB.LST) that contains the module |
|
|
|
|
|
|
names stored in the MYLIB.LIB library file. The PUBLICS directive |
|
|
|
|
|
|
specifies that public symbols are also included in the listing. |
|
|
|
REPLACE |
|
|
Replaces an existing object module to the library file. For example, |
|
|
|
|
|
|
LIB51 REPLACE GOODCODE.OBJ IN MYLIB.LIB |
|
|
|
|
|
|
replaces the GOODCODE.OBJ object module in MYLIB.LIB. Note that |
|
|
|
|
|
|
Replace will add GOODCODE.OBJ to the library if it does not exists. |
|
|
|
|
|
|
|
|
Getting Started and Creating Applications |
219 |
|||
|
|
|
|
|
|
|
|
|
|
|
LIB51 Command |
Description |
|
|
|
TRANSFER |
Generates a complete new library and adds object modules. For example, |
|
|
|
|
LIB251 TRANSFER FILE1.OBJ, FILE2.OBJ TO MYLIB.LIB |
|
|
|
|
deletes the existing library MYLIB.LIB, re-creates it and adds the object |
|
|
|
|
modules FILE1.OBJ and FILE2.OBJ to that library. |
|
|
|
|
|
|
|
OC51 Banked Object File Converter
Invocation: where
OC51 banked_file
banked_file is the name of a banked object file.
OH51 Object-Hex Converter
Invocation: |
|
|
|
12 |
|
OH51 absfile HEXFILE(hexfile) |
|
||
|
|
|
||
|
|
|
|
|
where
absfile is the name of an absolute object file. hexfile is the name of the Intel HEX file to create.
OH251 Object-Hex Converter
Invocation:
where
OH251 absfile HEXFILE(hexfile) {HEX|H386}
RANGE(start-end)
absfile |
is the name of an absolute object file. |
hexfile |
is the name of the HEX file to create. |
HEX |
specifies that a standard Intel HEX file is created. |
H386 |
specifies that an Intel HEX-386 file is created. |
RANGE |
specifies the address range of data in the absfile to convert and |
|
store in the HEX file. The default range is 0xFF0000 to |
|
0xFFFFFF. |
start |
specifies the starting address of the range. This address must be |
|
entered in C hexadecimal notation, for example: 0xFF0000. |
220 |
Chapter 12. Command Reference |
|
|
end specifies the ending address of the range. This address must be entered in C hexadecimal notation, for example: 0xFFFFFF.
12
Getting Started and Creating Applications |
221 |
|
|
12