CrossStudio's New Project Wizard simplifies the creation of projects for the STMicroelectronics STR71x processor 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 ST STR71x project

- Select the File | New | New Project menu item.
- Select STMicroelectronics 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.

CrossStudio for ARM supports the ST STR71x 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 ST STR71x 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/ST_STR71x directory for each member of the STR71x 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 STR71x family memory map files are used.

### Target Startup Code

The default startup code is in $(StudioDir)/targets/ST_STR71x/STR71x_Startup.s. It contains the exception vectors and the default exception handlers. The FLASH version of the code (specified by defining __FLASH_BUILD) is also responsible for configuring memory to match the above memory map and copying the exception vectors into RAM.

### FLASH Loader

In addition to programming the STR7x's internal FLASH, the default STR7x FLASH loader can also program the external FLASH on the MB393 STR710 evaluation board. In order for this to work, the loader must first be re-compiled with the preprocessor definition EXTERNAL_FLASH defined. To do this:

- Open the STR7x FLASH loader project $(StudioDir)/targets/ST_SR71x/Loader.hzp.
- In the project explorer, select the STR71x Loader project, right click, select Properties to open the project options dialog.
- Set the configuration to Common.
- Select the Preprocessor tab.
- Enter EXTERNAL_FLASH in the Preprocessor Definitions field.
- Click OK to close the dialog.
- Set the active build configuration to Release by selecting the Build | Set Active Build Configuration | Release menu option.
- Re-build the loader by selecting the Build | Build STR7x Loader menu option.