Cx51
8051/251 Development Tools
The Keil Cx51 ANSI C Complier supports all classic
and extended 8051 device variants. Compiler
extensions provide full access to all CPU resources
and support up to 16MB memory. The Keil Cx51
generates code with the efficiency and speed of
hand-optimized assembly. New compiler and linker
optimizations shrink programs into the smallest
single-chip devices.
Supports all 8051 Variants
Up to 16MB Memory
Easy-to-use IDE Supports
Complete Development Cycle
Complete Device Support
Including Peripheral Simulation
The Keil µVision4 IDE fully integrates Cx51 Version 9
and provides control of the Compiler, Assembler,
Real-Time OS, Project Manager, and Debugger in a
single, intelligent environment. With support for all
8051 devices and full compatibility with emulators
and third-party tools, Keil Cx51 is clearly the best
choice for your 8051 project.
Drivers for Flexible Debugging
in Target Hardware
Code Size Optimization
Large Model - Code Banking
100%
-22%
75%
50%
0%
6
To start your project, just select the device from the µVision Device Database.
7
8
9
10
Optimize Level
Keil Cx51 is the unsurpassed industry standard 8051
C Compiler. 10 optimization levels give you the ability to
put more features into less memory space and provide
the utmost code density for cost-sensitive single-chip
designs.
Using level 10 with the LX51 Extended Linker optimizes
a complete application. LX51 creates sub-routines for
common code blocks and replaces LJMP/LCALL
instructions with shorter AJMP/ACALL instructions
wherever possible.
For the selected device, µVision Debugger provides dialogs with detailed
peripheral information that are available with simulation and target debugging.
www.keil.com
Cx51
25%
Development Tools Overview
Cx51 Compiler
The Keil 8051 and 251 development kits contain different C
Compilers for optimum support of device variants. Cx51 is
used as a generic term for:
n
C51 Compiler
for classic 8051 devices, 8051 IP cores, Dallas
Contiguous Mode, and other extended devices
n
CX51
Compiler for Philips 8051 MX and SmartMX
n
C251
Compiler for 251 devices and 251 IP cores
The Cx51 Compiler gives complete access to all hardware
components within your C source code. For example, you can
control peripherals using SFR registers, write optimum interrupt
code with CPU register banks, accelerate variable access with
the data, idata, or pdata memory type, and use efficient bit
operations or atomic bit manipulation.
Cx51 Compiler Highlights
n
Support
for all 8051 derivatives and variants
n
Fast 32-bit IEEE floating-point math
n
Efficient interrupt code and direct register bank control
n
Bit-addressable objects
n
Sophisticated syntax checking and detailed warnings
n
Use of AJMP and ACALL instructions
n
Memory banking for code and variables beyond 64KB
n
Register parameters and dynamic register variables
n
Global program-wide register optimization
n
Common code block sub-routine optimization
8051 devices provide various physical memory spaces: fast
DATA space, up to 16MB large XDATA space, and CODE space
for constants. For flexible memory usage, Cx51 offers:
n
Use of multiple data pointers
n
Three
n
Generic and memory-specific pointers
well-defined memory models that provide the default
memory allocation for variables
n
Generic
pointers that access all memory spaces
n
Memory
types that control the space for variables or pointer
accesses. Memory-specific pointers reduce RAM
requirements, and optimize program execution
n
Use of on-chip arithmetic units
n
Re-entrant functions and register bank independent code
n
Extensive debug and source browse information
n
Simple assembly language interface
LX51 Extended Linker
RTX Tiny2 Real-Time Kernel
The standard Code Banking Linker lets you increase the
program space of a classic 8051 device beyond 64KB. The LX51
Extended Linker expands device support and adds further
functionality to the Keil Cx51 Compiler:
The RTX Tiny2 multi-tasking real-time kernel makes
implementing complex, time-critical software projects easy. RTX
Tiny2 is royalty-free and is fully integrated into the Keil Cx51
tool chain. It works on all classic 8051 device variants, and
supports multiple DPTR and arithmetic units.
n
Linker
Code Packing analyzes an entire application and
generates sub-routines for common code blocks even on
code banking applications. Short AJMP and ACALL
instructions replace longer LJMP and LCALL when possible
n
Incremental
Linkage allows you to split programs into
several functional parts as it is required for multi-application
programming or FLASH ROM updates
Support gives you access to 16MB of
variable space even on a classic 8051 device and the far
memory type may be used for special memory types
n
Far Memory
RTX Tiny2 is the successor of the popular RTX operating
system and provides:
n
Single
chip and code banking support
n
Round
robin and cooperative task switching
n
Task management
with create and delete
n
Timeout, Signal, and
n
Interrupt
Ready events for task switching
support for sending signals to tasks
n
Detailed
Data Type Checking is performed across all
public symbol definitions and improves software quality
The µVision debugger includes a kernel-aware dialog for RTX Tiny2 that displays
complete information about all the tasks in your program.
2
Keil 8051/251 Development Tools
Program Debugging
µVision Debugger
The µVision Debugger provides source-level debugging and
includes traditional features like simple and complex
breakpoints, watch windows, and execution control as well as
sophisticated features like performance analyzer, code coverage,
and logic analyzer.
The µVision Debugger may be configured as a Simulator where
programs run on your PC; or as Target Debugger where
programs run on your target hardware.
The cycle-accurate µVision Simulator is a software-only product
that simulates most features of your 8051/251 device without
actually having target hardware. µVision simulates a wide range
of peripherals including I/O Ports, CAN, I²C, SPI, UART, A/D
and D/A converter, E²PROM, and interrupt controller. The
simulated peripherals depend on the device selected from the
µVision Device Database.
Benefits of µVision Device Simulation
n
Simulation
allows software testing on your desktop with
no hardware environment
n
Early software
debugging on a functional basis improves
overall software reliability
n
Simulation
allows breakpoints that are not possible with
hardware debuggers
n
Simulation
allows for optimal input signals (hardware
debuggers add extra noise)
n
Signal
functions are easily programmed to reproduce
complex, real-world input signals
n
Single-stepping
through signal processing algorithms is
possible. External signals stop when the CPU halts
n
It is easy
to test failure scenarios that would destroy real
hardware peripherals
The disassembly window
shows CPU instructions
and trace history
Peripheral dialogs display
status information and aid
in driver development
The Logic Analyzer shows
changes to variables and
signals over time
The Project Window shows
all project files, and helps
you manage your project
The Performance Analyzer
displays execution times
for program blocks
Memory and watch
windows display program
variables
The µVision development platform is easy to use and it helps you to quickly create embedded programs that work.The µVision editor and debugger are integrated in a single
application that provides a seamless embedded project development environment for editing, simulating, Flash programming and testing in target hardware.
Keil 8051/251 Development Tools
3
Keil 8051/251 Development Tools
Keil µVision combines project management, source editing,
program debugging, and accurate device simulation in a single
powerful environment. Multiple drivers are included for
debugging applications running on target hardware.
PK51
Professional Developer’s Kit
n
Monitor-51
Keil Cx51 Compiler
µVision
Device Database & IDE
µVision
Debugger & Analysis Tools
Examples and Templates
RTX Tiny2 RTOS Kernel
n
MON390
for evaluation boards and target hardware
for devices running in Dallas contiguous mode
n
ISD51
in-system debugger runs on standard 8051 hardware
and is linked with the user application
n
EPM900
emulator/programmer for Philips LPC900 device
series
n
FlashMON
n
MONADI
for Atmel single-chip microcontrollers
for Analog Devices MicroConverter
n
ULINK2
driver for Infineon XC800, NXP 952/954, and
STMicroelectronics µPSD3000 devices
Other target hardware is supported by third-party drivers.
Device Peripheral Simulation
The Keil PK51 Professional Developer’s Kit is a complete
software development environment for classic and extended
8051 microcontrollers. It includes the tools you need to create,
translate, and debug C and Assembly source files. Keil PK51 is
easy to learn and use, yet powerful enough for the most
demanding 8051 applications.
The integrated Device Database® configures the tools options
for each specific microcontroller. For a complete list of
supported devices, refer to www.keil.com/dd.
The Keil ULINK2 Debug Adapter connects to a wide range of evaluation boards. For
more information refer to www.keil.com/ulink
Europe:
+49 89/45 60 40 - 20
sales.intl@keil.com
support.intl@keil.com
United States:
+1 800 348 8051
sales.us@keil.com
support.us@keil.com
All brand names or product names are the property of their respective holders. Neither the whole nor any part of the information contained in, or the product described in, this document may be adapted or reproduced in any material form except with the prior
written permission of the copyright holder. The product described in this document is subject to continuous developments and improvements. All particulars of the product and its use contained in this document are given in good faith. All warranties implied or
expressed, including but not limited to implied warranties of satisfactory quality or fitness for purpose are excluded. This document is intended only to provide information to the reader about the product. To the extent permitted by local laws ARM shall not be liable
for any loss or damage arising from the use of any information in this document or any error or omission in such information.
Program examples and detailed technical information are available from your distributor and our web site (www.keil.com).
www.keil.com
Keil 8051/251 | 01.11