Keil Logo

MON51: DEBUGGING WITH START ADDRESS OTHER THAN 0


Information in this article applies to:

  • C51 Version 6 or higher

QUESTION

I have the following configuration on my target system:

  • Monitor is installed at address 0
  • Interrupt vectors are redirected in INSTALL.A51 to address 0x8000
  • The application is linked with code start 0x8000. Interrupt vectors and the STARTUP.A51 file are modified as explained in the Getting Started User's Guide

The application code downloads properly, but it starts executing at address 0 and my program hangs.

Is there a way to configure execution to start at 0x8000?

ANSWER

Yes, you can configure the program start address by using a debugger initialization file. The following steps explain how to do this.

  1. Generate a file, for example with the name MON51.INI and the following content:
    PC = 0x8000   // Set start address to 0x8000
    g, main       // run till entry of 'main'
    
  2. Set the following configuration in the µVision dialog page Project - Options for Target - Debug:
    • Enable Load Application at Startup
    • Disable Run to main ()
    • Enter the Initialization File MON51.INI that you have just created.

When you now start the debugger, it will load the application, set the Program Counter (PC) to 0x8000 and run your application until the main entry.

MORE INFORMATION

  • Getting Started User's Guide, Using Monitor-51, Tool Configuration when Using Monitor-51
  • Refer to Using Monitor-51 in the Cx51 User's Guide.

SEE ALSO

FORUM THREADS

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

Last Reviewed: Friday, July 15, 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.