CrossStudio's New Project Wizard simplifies the creation of projects for the Philips LPC2000 family by creating a project with the appropriate project settings, memory map files and startup files. See Creating a New Project for more information on creating projects.

##### To create a new Philips LPC2000 project

- Select the File | New | New Project menu item.
- Select Philips LPC2000 Projects from the Project Type list.
- Select the required project template type from the Templates list.
- Set the required project name and location directory.
- Click OK.
- Set the Build | Target Processor project property to the member of the LPC2000 family you wish to target.

CrossStudio for ARM supports the Philips LPC2000 family running applications from both RAM and FLASH.

##### To build and debug an application

- Select the project to work on by using the Project | Set Active Project menu option.
- Select the configuration you require by using the Build | Set Active Build Configuration menu option.
- Build the project by using the Build | Build Project menu option.
- Connect to the appropriate target in the target window.
- Download and start debugging the current project by using Debug | Start Debugging.

The following sections describe the Philips LPC2000 support in more detail. See ARM Target Support for more information.

### Memory Map Files

Default memory map files have been provided in the $(StudioDir)/targets/Philips_LPC210X directory for each member of the LPC2000 family. These files are used to describe the memory layout of the target and is used for linking and debugging. The placement of program sections within the memory map for both RAM and FLASH configurations is described by the non-target-specific default memory maps $(StudioDir)/targets/flash_placement.xml and $(StudioDir)/targets/sram_placement.xml.

The Build | Target Processor project property specifies which of the LPC2000 family memory map files are used.

### Target Definitions

Target definitions have been provided for both RAM and FLASH configurations. The only difference between the two configurations is that the RAM configuration maps the interrupt vectors from SRAM and the FLASH configuration maps the interrupt vectors from the boot block (the default from reset). This therefore means that applications configured for FLASH will run from a reset however applications configured for RAM will need to be started from CrossStudio.

### Target Startup Code

The default startup code is in $(StudioDir)/targets/Philips_LPC210X/Philips_LPC210X_Startup.s. It contains the exception vectors and the default exception handlers.

By default the startup code for both RAM and FLASH configurations is the same, however if SRAM_EXCEPTIONS is defined the interrupt vectors will be copied from FLASH into the start of SRAM and the SRAM interrupt vectors will be remapped to 0x00000000. This is useful if you want to re-program the exception vectors whilst the program is running when using a FLASH configuration. For the SRAM_EXCEPTIONS option to work, the 36 bytes of memory occupied by the exception vectors must be reserved at the top of SRAM.

### FLASH Loader

In order for the FLASH loader program to work reliably, it needs to know the target's oscillator frequency. The default oscillator frequency value is 10Mhz, for targets with a different oscillator frequency the value (in Hertz) should be specified in the Target | Loader Parameter project property.