Everything
2.5.2.5 Downloading files to external flash memory [E1] [E20]

The download files you've specified in the Download Files dialog box can be downloaded to the flash memory connected to an external bus of the microcontroller used (i.e., the external flash memory).

In this case, follow the procedure described below.

(1)

Setting up the Property panel

In the [External Flash] [E1] [E20] category on the Property panel's [Debug Tool Settings] tab, register an external flash definition file (USD file).

External flash memory is recognized by registering a USD file in the [External Flash] [E1] [E20] category. Up to four USD files can be registered.

By clicking the "+" mark of an external flash definition file, the definition file name, start and end addresses, and whether to erase the external flash ROM before downloading are displayed for each index ([1] to [4]).

Figure 2.68

[External Flash] Category

(a)

[External flash definition file]

Shows the maximum number of registrable USD files.

To register a USD file, specify a USD file name in the [File] property that is expanded on display as a sub-property.

Enter a file name directly (if specified by a relative path, it should be referenced to the project folder), or select a file in the External flash memory dialog box [E1] [E20] that is opened by clicking the [...] button, which is displayed at the right edge in the setup column of this property when it is selected.

After a USD file is registered, the [Start address], [End address], and [Erase external flash ROM before download] sub-properties are added to the displayed information.
For the [Start address] and [End address] properties, the external flash memory area defined in the registered USD file is displayed (this information cannot be modified).
For the [Erase external flash ROM before download] property, select [Yes] or [No] from the drop-down list.
To erase the external flash ROM before downloading, select [Yes]. ([No] is selected by default.)

To delete registration of a USD file, move the caret to the file name on the relevant [File] property and then click the [Delete] key.

For more information on USD files, visit Renesas website and see the user's manual for the External Flash Definition Editor.

Figure 2.69

Opening the External flash memory Dialog Box

Caution 1.

The endian information in USD files is not reflected on the [Memory mappings] property in the [Memory] category on the Property panel's [Debug Tool Settings] tab. Therefore, the endian in the external area to which they are downloaded should be changed to suit the endian information in USD files.

Caution 2.

When the address ranges of multiple registered USD files overlap each other, connection with the debug tool cannot be established.

Caution 3.

For downloading in external flash memory, internal RAM or CS-area RAM can be used as a work area. Note that SDRAM areas (SDCS) are not usable.

Caution 4.

To allocate a device to multiple CS areas, set [Erase external flash ROM before download] to [No] in the Property panel.

Caution 5.

The work RAM area can also be used by the user program because the emulator saves and restores data in this area. Note, however, that the work RAM area is not specifiable as:

-

The destination or origin of a DMA or DTC transfer

-

An address where a DTC vector table or transfer information is to be allocated

-

The interrupt vector for a DMAC or DTC activation source

Remark

If the manufacturer ID or device ID does not match, the read value and expected value are displayed in the Output panel.

Figure 2.70

Error Messages in the Output Panel

(2)

Setting the CPU operation mode

For files to be downloaded to external flash memory, it is necessary to set the microcontroller's operation mode when connecting with the debug tool. To do this, change the [Register setting] property in the [Operating Modes of CPU] [E1] [E20] category on the Property panel's [Debug Tool Settings] tab by selecting [On-chip ROM enabled extended mode] or [On-chip ROM disabled extended mode] from the pull down list, as shown below.

Figure 2.71

Specifying the CPU Operation Mode

(3)

Executing a download

Execute a download (see “(3) Executing a download").

 

Caution 1.

External flash memory cannot be rewritten on the Memory panel.

Caution 2.

When downloading to the external flash memory, if you are using external RAM as working RAM, set it to the same endian as the CPU.

Caution 3.

Only flash memory with 4096 or fewer sectors can be registered. If flash memory with more sectors is connected, programming cannot be guaranteed.

Caution 4.

To use a flash memory device that does not support the use of the Lock command, specify that the lock bit be cleared when you generate USD files. This specification helps you omit an unnecessary process to confirm the lock bit status.
Likewise set [Erase external flash ROM before download] to [No] in the Property panel.
* The lock command refers to a command to be executed in the following command sequence.

command sequence:

 

1st cycle

2nd cycle

3rd cycle

4th cycle

Address

555H

2AAH

555H

Block address

Data

AAH

55H

48H

X1H / X0H