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.
CrossStudio for ARM supports the Philips LPC2000 family running applications from both RAM and FLASH.
The following sections describe the Philips LPC2000 support in more detail. See ARM Target Support for more information.
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 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.
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.
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 should be specified in the Target | Loader Parameter project property.