Keil Logo

MON51: ERROR 22 (NO CODE MEMORY AT ADDRESS ????H)


Information in this article applies to:

  • C51 Version 5 and Later

QUESTION

I'm using the Keil Debugger to download my program using the MON51 monitor in my target hardware. When the debugger starts downloading my program, I receive the following error message:

ERROR 22 (NO CODE MEMORY AT ADDRESS 0045H)

Why do I receive this error?

ANSWER

When the monitor downloads your program to the target hardware, it writes to XDATA and reads from CODE to confirm that each byte was written correctly.

This message indicates that the monitor wrote a value to address X:0045h, read the value back from C:0045h, and the two values were different. So, the code that was downloaded and written to XDATA memory could not be read from the corresponding CODE address. When your program gets to address 0045h, it will not execute the instruction that it should.

Usually, this error indicates that you do not have von Neumann memory at the specified address.

One solution is to use the debugger to connect to the monitor without loading a program. Then, change the XDATA memory contents and view the CODE memory to see if it changes. If it does not, then there is a problem in your hardware or you have an inaccurate memory map.

MORE INFORMATION

FORUM THREADS

The following Discussion Forum threads may provide information related to this topic.

Last Reviewed: Wednesday, June 1, 2005


Did this article provide the answer you needed?
 
Yes
No
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.