CrossStudio's New Project Wizard simplifies the creation of projects for the OKI ML674000 evaluation board 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 OKI ML674000 Evaluator project

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

CrossStudio for ARM supports the OKI ML674000 Evaluator running applications from both RAM and FLASH.

##### To build and debug an application running from RAM

- Select the project to work on by using the Project | Set Active Project menu option.
- Select the RAM configuration you require by using the Build | Set Active Build Configuration menu option.
- Build the project by using the Build | Build Project menu option.
- Set SW1 MODE switch to ON (Standalone mode).
- Connect to the appropriate target in the target window.
- Download and start debugging the current project by using Debug | Start Debugging.

##### To build and debug an application running from FLASH

Warning: Downloading to FLASH on the OKI ML674000 evaluation board can erase and overwrite the firmware. See Restoring the OKI ML674000 Evaluator Firmware for details of how CrossStudio can be used to restore the firmware.

- Select the project to work on by using the Project | Set Active Project menu option.
- Select the FLASH configuration you require by using the Build | Set Active Build Configuration menu option.
- Build the project by using the Build | Build Project menu option.
- Set SW1 MODE switch to ON (Standalone mode).
- Set SW1 BANK switch to OFF in order to protect the board's firmware.
- 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 OKI ML674000 Evaluator support in more detail. See ARM Target Support for more information.

### Memory Map Files

The default memory map file $(StudioDir)/targets/OKI_ML674000_Evaluator7T/OKI_ML674000_Evaluator_MemoryMap.xml has been provided. This file is 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 memory segment layout for both configurations is the same and is described in the following table:

Type | Description | Start Address | End Address
FLASH | External FLASH | 0xC8000000 | 0xC81FFFFF
SDRAM | External SDRAM | 0xC0000000 | 0xC01FFFFF
SRAM | Internal SRAM | 0x10000000 | 0x10001FFF
SRAM | External SRAM | 0x00000000 | 0x000FFFFF

### Target Startup Code

The default startup code is in $(StudioDir)/targets/OKI_ML674000_Evaluator/OKI_ML674000_Evaluator_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.

### Restoring the OKI ML674000 Evaluation Board Firmware

The FLASH memory on the OKI ML674000 evaluation board is divided into two 1MByte banks which can be swapped using the BANK switch on SW1. The default bank (ON position) is shipped with a basic loader firmware. If CrossStudio downloads an application using the FLASH configuration with either the BANK switch set to ON or if the application is larger in size than 0x100000 bytes, the firmware will be overwritten. This is reversible as CrossStudio can be used to re-program the firmware image into FLASH.

##### To restore the OKI ML674000 Evaluation Board Firmware

- Set SW1 MODE switch to ON.
- Set SW1 BANK switch to ON.
- Select the FLASH Debug configuration by using the Project | Set Build Configuration menu option.
- Open the target window and then select and connect to the target interface to use for download.
- From the target window's context menu select Download File | Download Binary File. When prompted for the file to download, select the bootloader.bin on your ML67400 CD.
- When prompted for the start address, specify 0xC8000000.
- Reset the target.