Keil Logo

µVISION DEBUGGER: ERROR 57: ILLEGAL ADDRESS IN DEBUGGER OUTPUT WINDOW


Information in this article applies to:

  • MDK-ARM All Versions
  • ULINK2/ULINKpro USB-JTAG Adapter
  • All debug adapters that use the AGDI interface. This might also apply to third-party debug adapters.

SYMPTOMS

After starting a debug session on a Cortex-M device, the following message is printed in the debugger output window:

*** error 57: illegal address (...)

Why is there an illegal address access?

CAUSE

This can be caused by the debugger when, for example, a memory window's Address field points to a location that cannot be accessed during debugging. Furthermore, this can be caused when the option Download to Flash in Options for Target — Debug — Settings — Debug — Download Options is enabled.

Download to Flash writes code to all memory areas, including those areas defined as Flash. This behavior is not allowed. Instead of writing code directly to Flash memory, you need to program Flash with a Flash programming algorithm. Check the Target Driver Setup — Flash Download dialog.

The Download to Flash option is useful, for example, within systems that have indirect access to the boot memory, like NAND Flash, but execute from SDRAM. In such cases, the SDRAM area is defined as Flash. The code will be processed by a Flash programming algorithm and written to NAND Flash. When booting, the code is copied from NAND to SDRAM and executed there. But when debugging, the code needs to be downloaded to SDRAM by the debugger. Using this technique, one target can be used for debugging from SDRAM as well as for flashing the application from NAND.

RESOLUTION

Please disable Download to Flash in Options for Target — Debug — Settings — Debug. Now, the illegal address error disappears. If you want to update the target before debugging, please enable Options for Target — Utilities — Update Target before Debugging.

MORE INFORMATION

  • Refer to Debug in the ULINK2 User's Guide.
  • Refer to Debug in the ULINK2 User's Guide.
  • Refer to Debug in the ULINKpro User's Guide.
  • Refer to Debug in the ULINKpro User's Guide.

FORUM THREADS

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

Last Reviewed: Thursday, September 22, 2016


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.