ARM Technical Support Knowledge Articles

CHECKING TOOL FOR XC800 CHIP BUG

Applies to: C51 C Compiler

Answer


Information in this knowledgebase article applies to:


QUESTION

Is there a checking tool for the SYS XC8.001 problem that is present in the Infineon XC800 (in example XC888 or XC886) devices? Are these instructions generated by the C51 Compiler?

ANSWER

Yes, the instruction is generated by the C51 Compiler. It actually is very rare and depends on the way you assign results to an SFR register. To avoid the instruction you may change the source code and assign the value to a temporary variable before the final assignment to the SFR register.

For existing code you may check the image with the attached mddfind scanning tool for the erroneous instruction. The checking tool is invoked with the output file of the LX51 or BL51 Linker/Locoter.

Example:

mddfind my_proj

When erroneous instructions are detected the following output is generated:

Looking for 'MOV dir,dir' with 'dir >= 0x80':
                        ?C_STARTUP - 0x000001A1:  MOV 0x80,0xCC
                        ?C_STARTUP - 0x000001A5:  MOV 0xD8,0x90
                      ?C?LSTKXDATA - 0x00000102:  MOV 0xF0,0x83
3 'MOV dir,dir' found.

To automate the checking apply the following changes to your ┬ÁVision project:

mddfind #L

To locate the source code that causes the problem you can load the application into the ┬ÁVision Debugger. When you select Use Simulator under Project - Options for Target - Debug no target hardware is required. Then perform the following steps:

  1. Start the Debugger with Debug - Start/Stop Debug Session.
  2. Use View - Disassembly Window to view CPU instructions.
  3. Right click into the Disassembly Window and use Show Code at Address from the context menu and enter the address of an erroneous instruction. For example: C:0x1A1.
  4. Right click again in the Disassembly Window on the erroneous instruction and use Show Source Code for current Address to open the source file at the location that created this instruction.

ATTACHED FILES

Request the files attached to this knowledgebase article.

Article last edited on: 2009-01-17 03:54:25

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential