Everything
2.5.1 Execute downloading

Download the load module files to be debugged.

Following the procedure below, make the necessary settings for downloads on the Property panel's [Download File Settings] tab before you execute a download.

(1)

Setting the [Download] category

Figure 2.63

[Download] Category [E1(JTAG)] [E1(Serial)] [E20(JTAG)] [E20(Serial)]

Figure 2.64

[Download] Category [Simulator]

(a)

[Download files]

Displays the file names to be downloaded, as well as download conditions. (The numeric value in property value "[ ]" indicates the number of files currently specified to be downloaded).

The files to be downloaded here are those files that have been specified as the subject to build in the main project and sub-projects. This means that the same files that were specified in the project are automatically determinedNote to be the download files.

However, the files to be downloaded and the download conditions can be manually changed. In this case, see "2.5.2 An applied method of download".

Note

To download the load module files created by an external build tool (e.g., compilers and assemblers other than the build tools supplied with CS+), a debug-dedicated project needs to be created.
If you use a debug-dedicated project as the subject to debug, add your download files to the download file node on project tree. The files to be downloaded will be reflected in this property.
For details on how to use "external build tools" and details about "debug-dedicated projects," see the separate edition, "CS+ Project Operation".

(b)

[CPU Reset after download]

Specify from the drop-down list whether or not to reset the CPU after a download is completed.

To reset the CPU, select [Yes] (default).

(c)

[Erase flash ROM before download] [E1] [E20]

Specify from the drop-down list whether or not to erase the flash ROM (program ROM) before a download is executed.

To erase the flash ROM, select [Yes].

(d)

[Erase data flash ROM before download] [E1] [E20]

Specify from the drop-down list whether or not to erase the data flash ROM before a download is executed.
To erase the data flash ROM, select [Yes]. (By default, [No] is selected).

(e)

[Automatic change method of event setting position]

If, as debug work proceeds, a program which has had changes added is downloaded again, the position (address) at which a currently set event is set may happen to be in the middle of an instruction. In such a case, use this property to specify how the subject event should be handled.

Select one of choices from the drop-down list below.

Move to the head of instruction

Resets the subject event at the beginning address of the instruction.

Suspend event

Leaves the subject event pending (default).

 

However, specification on this property applies to only the event set positions for which debug information is nonexistent. For the event set positions that have debug information, the event is always moved to the beginning of the source text line.

(2)

Setting the [Debug Information] category

Figure 2.65

[Debug information] Category

(a)

[Execute to the specified symbol after CPU Reset]

Specify from the drop-down list whether or not to run the program up to a specified symbol position after the CPU is reset, or after a download is completed (only when you specified [Yes] on the [CPU Reset after download] property).

To run the program up to a specified symbol position, select [Yes] (default).

Remark

If, while you specified [Yes] on the [CPU Reset after download] property, you specify [Yes] on this property, the Editor panel opens automatically after a download is completed, with the source text at the position you specified on [Specified symbol] property displayed on it.
Also, if you specify [No] here, this panel opens, with the reset address displayed on it. (If the reset address has no source text mapped to it, the relevant place is displayed on the Disassemble panel.)

(b)

[Specified symbol]

This property is displayed only when you specified [Yes] on the [Execute to the specified symbol after CPU Reset] property.

Specify a position at which you want the program being run after the CPU is reset to be halted.

Enter an address expression directly in the range 0 to "end address of address space" to specify the position. (By default, [_main] is specified.)

However, if the specified address expression cannot be converted into an address, the program is not executed.

Remark

Normally, specify the following.
For assembler source: Beginning label equivalent to the main function
For C source: Symbol given at the beginning of the main function name

(c)

[Specify the debugged overlay section]

"Yes" is displayed when overlay sections (see "2.8 Setting Overlay Sections" for details) exist in the load module.

Otherwise "No" is displayed. This entry cannot be changed.

(d)

[Overlay sections]

Address groups where overlay sections exist are displayed.

This property only appears when "Yes" is displayed on the [Specify the debugged overlay section] property.

(e)

[The upper limit size of the memory usage[MBytes]]

Specify the maximum size [Mbytes] of memory to be used to read debug information.

Directly enter an integer between 100 and 1000 ([500] is specified by default).

When an insufficient memory error occurs, specifying a smaller value for this maximum size may reduce the occurrence of the error. However, a smaller maximum size may degrade the response speed of the debug tool.

Caution

By default, CPU reset automatically occurs after downloading the file, and then the program is executed to the specified symbol position. If this operation above is not needed, specify [No] with both of the [CPU Reset after download] and [Execute to the specified symbol after CPU Reset] property.

(3)

Executing a download

Click the button in the Debug toolbar.

If this operation is performed while CS+ is disconnected from the debug tool, it is automatically connected to the debug tool before a download is executed.

Remark

To download a file which has had changes added in the course of debug work again, choose [Build & Download to Debug Tool] from the [Debug] menu on the Main window, which will help you build and download easily.

(4)

Canceling a download

To cancel a download, click on the [Cancel] button on the Progress Status dialog box, which displays the progress of downloading, or press the [Esc] key.

 

When the load module files have been successfully download, the Editor panel opens automatically, with the source text of the downloaded files displayed on it.

Remark

A process can be set that automatically rewrites I/O register or CPU register values with specified values before or after a download (see Section "2.18 Setting Up the Hook Process").