Application Note 191
Toolchain Extensions for R8051XC/R8051XC2 Core

Revision 4 - July 2009

This Application Note tells you how to configure the Keil 8051 development tools for Evatronix R8051XC/R8051XC2 based devices. The R8051XC/R8051XC2 is a highly configurable IP core that provides many extensions such as configurable DPTR registers, MDU, and a flexible set of peripherals.

Information in this file, the accompany manuals, and software is
Copyright � KEIL - An ARM Company.
All rights reserved.


  1. Overview
  2. Device Database Configuration
  3. Multiple DPTR Support
  4. Simulator Configuration
  5. Example Programs
  6. Technical Support
  7. Contact Details


This application note describes the configuration features for the Evatronix R8051XC/R8051XC2 CPU core that are available in the Keil PK51 Professional Developer's Kit.


Device Database Configuration

The �Vision Device Database allows you to create custom devices that simplifies the configuration tool configuration. The article UVISION: ADDING CUSTOM PARTS TO THE DEVICE DATABASE explains the various configuration options.

The string CPU= configures the memory sizes of the device and specific options such as MDU or multiple DPTR. The following options are relevant for the R8051XC/R8051XC2:

The string SIM= configures the CPU and Peripheral simulation DLLs. For the R8051XC/R8051XC2 device you need to use the DLL's S8051.DLL and DCore51.DLL with the parameter -pR8051XC or -pR8051XC2. Additional parameters are described in the next section Simulator Configuration.

Sample configuration options:

CPU=IRAM(0-0x7F)  CLOCK(12000000) MOD517DP MDU_R515
SIM=S8051.DLL("-PMW -DPC -BSE") DCore51.DLL("-pR8051XC")

Multiple DPTR Support

The R8051XC/R8051XC2 device provides auto-increment features and automatic saving of the multiple DPTR register banks. When using the C51 directive BSE, the compiler does no longer save the DPTR registers when switching register banks. When using this feature together with the MOD517 directive, the C51 Compiler uses the auto-increment features with the C51 library functions memcpy, memcmp, memmove, strcpy, and strcmp.

Simulator Configuration

The R8051XC/R8051XC2 device is simulated with the CPU DLL S8051.DLL and the Dialog DLL DCore51.DLL. These DLL provide several parameters that provide configuration features for the device. The parameters may be entered in the �Vision dialog page Options for Target - Debug. When you select a device from the device database, the DLL parameters are copied from the string SIM= as described in the previous section Device Database Configuration.

S8051.DLL Parameters for R8051XC

DCore51.DLL Parameters for R8051XC

Configuration parameter examples for the DCore51.DLL:


Evatronix R8051XC related Virtual Registers

The table below lists additional virtual registers (VTR), their size, range, default value and their meaning for the simulation.

VTR Size Range Default Value Description
RTC_CLK 32 Bit   32768 Hz External Clock for RTC
RTC_SUBSEC 8 Bit 0 - 255 0 RTC Subsecond counter
RTC_SEC 8 Bit 0 - 59 0 RTC Second counter
RTC_MIN 8 Bit 0 - 59 0 RTC Minute counter
RTC_HOUR 8 Bit 0 - 23 0 RTC Hour counter
RTC_DOW 8 Bit 0 - 7 0 RTC Day of Week counter (0: off; 1 - 7: Monday - Sunday)
RTC_DAY 16 Bit 0 - 65536 0 RTC Day counter
RTC_RESET 8 Bit 0 - 1 0 Writing 1 to RTC_RESET causes a RTC reset


Example Programs

Example programs in the folder ..\C51\EXAMPLES\R8051XC demonstrate some features of the Evatronix R8051XC core. All programs can be fully simulated with the uVision Debugger.

Technical Support

At Keil Software, we are dedicated to providing you with the best development tools and technical support. That's why we offer numerous ways you can get the technical support you need to complete your embedded projects.

Many of the features of our Technical Support Knowledgebase and Web Site are the results of your suggestions. If you have any ideas that will improve them, please give us your feedback!

Contact Details

If you experience any problems or have any questions about this Application Note, contact one of our distributors or offices for assistance.

In the USA...

KEIL - An ARM Company
1501 10th Street, Suite 110
Plano, TX  75074

800-348-8051 - Sales
972-312-1107 - Support
972-312-1159 - Fax
- Sales E-Mail
- Support E-mail 

In Europe...

KEIL - An ARM Company
Bretonischer Ring 16
D-85630 Grasbrunn

+49 89 456040-0 - Sales
+49 89 456040-24 - Support
+49 89 468162 - Fax
- Sales E-Mail
- Support E-Mail

Copyright KEIL - An ARM Company.
All rights reserved.
Visit our web site at