Keil Logo


Information in this knowledgebase article applies to:

  • C51 Version 7.00 or higher


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?


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.


mddfind my_proj

When erroneous instructions are detected a similar output is generated:

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

According to the Infineon Errata Sheets, not all SFRs are affected by this errata. The mddfind utility checks for MOV dir,dir instructions (code 0x85) where the source address is >= 0x80 (=SFR) and the destination SFR address is one of the following: 0x9A, 0x9B, 0x9C, 0x9D, 0x9E, 0x9F, 0xA0, 0xA4, 0xA5, 0xA6, 0xA7, 0xAB, 0xB0, 0xB4, 0xB5, 0xB6, 0xB7, 0xBB, 0xBC, 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC8, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD2, 0xD3, 0xE9, 0xF1, 0xF2, 0xF4, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE and 0xFF.

These SFRs are mentioned in the following Infineon errata sheets:

  • XC878LM Step AC Series Rel. 1.1 dated 17.01.2013
  • XC878CLM Step AC Series Rel. 1.2 dated 17.01.2013
  • XC864L Step AA Series Rel. 1.2 dated 28.02.2011
  • XC886/888LM Step AC Series Rel. 1.6 dated 28.02.2011

Note that the mddfind utility can not check the selected SFR page at the time when a MOV dir,dir instruction is executed. Therefore, mddfind may report instructions which are not critical because they refer to a different SFR page. Check all these reports carefully in your source code against the Infineon errata sheet.

The attached mddfind scanning tool was updated to version 3.84 on 14th of August 2015. The previous version 3.74c from 2009 did not report SFR accesses to the address 0xB4, 0xB5, 0xB6, 0xB7, 0xBB, 0xBC, 0xA0, 0xAB, 0xB0 and 0xC6 because prevous Infineon errata sheets did not specify them as critical.

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

  • Under Options for Target - User - Run User Programs After Build/Rebuild - Run #1 add the command:
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.


Request the files attached to this knowledgebase article.

Last Reviewed: Friday, August 14, 2015

Did this article provide the answer you needed?
Not Sure
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.