ARM Technical Support Knowledge Articles

DEBUG PROGRAMS IN ON-CHIP RAM OF PHILIPS LPC2000

Applies to: ARM Development Tools

Answer


Information in this article applies to:


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 KeilARMBoardsKeil MCB2100Blinky 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:  .RAMBlinky (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

SEE ALSO

Article last edited on: 2005-04-06 11:41:40

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential