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

54 Chapter 3. Development Tools

 

LIB51 Library Manager

 

The LIB51 library manager lets you create and maintain library files. A library

 

file is a formatted collection of object modules (created by the C compiler and

 

assembler). Library files provide a convenient method of combining and

 

referencing a large number of object modules that may be accessed by the

 

linker/locator.

 

To build a library with the µVision2 project manager enable Options for Target

 

– Output – Create Library. You may also call LIB51 from a DOS box. Refer

3

to “LIB51 / L251 Library Manager Commands” on page 218 for command list.

There are a number of benefits to using a library. Security, speed, and

minimized disk space are only a few of the reasons to use a library.

Additionally, libraries provide a good vehicle for distributing a large number of useful functions and routines without the need to distribute source code. For example, the ANSI C library is provided as a set of library files.

The µVision2 project C:\KEIL\C51\RTX_TINY\RTX_TINY.UV2 allows you to

modify and create the RTX51 Tiny real-time operating system library. It is easy to build your own library of useful routines like serial I/O, CAN, and FLASH memory utilities that you may use over and over again. Once these routines are written and debugged, you may merge them into a library. Since the library contains only the object modules, the build time is shortened since these modules do not require re-compilation for each project.

Libraries are used by the linker when linking and locating the final application. Modules in the library are extracted and added to the program only if they are required. Library routines that are not specifically invoked by your program are not included in the final output. The linker extracts the modules from the library and processes them exactly as it does other object modules.

Getting Started and Creating Applications

55

 

 

OC51 Banked Object File Converter

 

The OC51 banked object file converter creates absolute object modules for each

 

code bank in a banked object module. Banked object modules are created by the

 

BL51 code banking linker/locator when you create a bank switching application.

 

Symbolic debugging information is copied to the absolute object files and can be

 

used by the µVision2 Debugger or an in-circuit emulator.

 

You may use the OC51 banked object file converter to create absolute object

 

modules for the command area and for each code bank in your banked object

 

module. You may then generate Intel HEX files for each of the absolute object

 

3

modules using the OH51 object-hex converter.

OH51 Object-Hex Converter

 

 

The OH51 object-hex converter creates Intel HEX files from absolute object

 

modules. Absolute object modules can be created by the BL51 code banking

 

linker or by the OC51 banked object file converter. Intel HEX files are ASCII

 

files that contain a hexadecimal representation of your application. They can be

 

easily loaded into a device programmer for writing EPROMS.

 

56

Chapter 3. Development Tools

 

 

3

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