Keil Logo

ARM: DEBUG PROGRAMS IN ON-CHIP RAM OF PHILIPS LPC2000


Information in this article applies to:

  • Keil Development Suite for ARM Version 2.0 or higher
  • ULINK USB-JTAG Adapter

QUESTION

I want to setup a project for debugging in on-chip RAM (starting at address 0x40000000) on the Philips LPC2000 devices. Is this possible? What are the required steps?

ANSWER

Yes. It is possible to locate programs into on-chip RAM. You can then debug without the breakpoint limitations that are implied by the ARM Embedded ICE hardware for programs stored in Flash.

For the Keil MCB2100 board, you will find a sample project in the Keil\ARM\Boards\Keil MCB2100\Blinky folder. This project has three targets. The MCB2100 RAM target is configured for RAM Debugging.

When configuring your project, you must ensure that the complete program code resides in on-chip RAM. Use the following steps to configure the Keil CARM Compiler in this way:

  1. Open the dialog Project - Options for Target - LA Locate. Disable the option Use Memory Layout from Target Dialog. This disables the memory settings on the dialog page Project - Options for Target - Target.
  2. In the dialog Project - Options for Target - LA Locate enter under User Classes the address ranges for the memory classes DATA, CODE, and CONST. All these classes must fit into the on-chip RAM space. For example:
    DATA (0x40003000-0x40003FFF),
    CODE (0x40000000-0x40002FFF), CONST (0x40000000-0x40002FFF)
    
  3. The STARTUP.S file contains the interrupt vectors and must be configured for on-chip interrupt vectors. In the Project Workspace - Files tab right-click on the file STARTUP.S and open the dialog Options for File 'Startup.s' - ASM. Enter under Set: RAM_INTVEC. With this option MEMMAP is set to 2 (interrupt vectors fetched from 0x40000000) and the segment STARTUPCODE is located to 0x40000000.

You may verify the location of your program in the linker map file. The memory classes should appear as follows:

ACTIVE MEMORY CLASSES OF MODULE:  .\RAM\Blinky (STARTUP)

BASE       START      END        USED       MEMORY CLASS
========================================================
00000000H  40003000H  40003FFFH  00000490H  DATA
00000000H  40000000H  40002FFFH  0000030CH  CODE
00000000H  40000000H  40002FFFH  00000022H  CONST

Under MEMORY MAP OF MODULE no segments should be located outside the on-chip RAM space.

MORE INFORMATION

  • Getting Started User's Guide

SEE ALSO

FORUM THREADS

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

Last Reviewed: Wednesday, April 6, 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.