2.21 Pseudo-error debugging [Full-spec emulator][E1][E20]

Pseudo-error debugging is a feature for generating pseudo-errors which are difficult to reproduce on the real machine. You can use this feature to check the operation of a reset routine or handler called in response to an error, or functions to be called from within the handler, and debug the code.

The Error Control Module (ECM)Note is used to generate such pseudo-errors.

Note

See the chapter of the ECM in User's Manual: Hardware of each device for details. A device without the ECM does not have a chapter of the ECM in its manual. In such a case, pseudo-error debugging cannot be used.

 

[How to use]

(1)

Open the Pseudo-Error Debugging panel

Open the Solution List panel and click the [GO] button for Pseudo-Error Debugging to display the Pseudo-Error Debugging panel [Full-spec emulator][E1][E20].

Figure 2.151

Pseudo-Error Debugging Panel

Remark

For a device that does not support pseudo-error debugging, pseudo-error debugging is not displayed on the Solution List panel. Even for a device that supports pseudo-error debugging, the [GO] button is nullified when the simulator is being used or the debug tool has not been connected.

(2)

Open the Select Pseudo-Error dialog box

On the Pseudo-Error Debugging panel [Full-spec emulator][E1][E20], click . The Select Pseudo-Error dialog box [Full-spec emulator][E1][E20] will open.

Figure 2.152

Select Pseudo-Error Dialog Box

 

(3)

Select the error you wish to generate

A list of errors supported by the pseudo-error debugging feature is displayed in the Select Pseudo-Error dialog box [Full-spec emulator][E1][E20]. Select the check box of the error you wish to generate and click the [OK] button. The selected error is displayed in the Pseudo-Error Debugging panel [Full-spec emulator][E1][E20].

Figure 2.153

Pseudo-Error Debugging Panel

Remark

See User's Manual: Hardware for details on errors. [Bit Name] shows the names of individual bits in ECM pseudo error trigger registers (e.g. ECMPE0) listed in the chapter of the ECM.

(4)

Set the address where you wish to generate a break

Click on the Pseudo-Error Debugging panel [Full-spec emulator][E1][E20] to open the Breakpoint Setting dialog box [Full-spec emulator][E1][E20]. Entering the address expression of a handler or reset routine to be called in response to an error enables a break to occur at that address after the error is generated. A symbol, such as a handler name, can also be entered.

Figure 2.154

Breakpoint Setting Dialog Box

Remark 1.

Enter an address in the ROM area. A breakpoint cannot be set if an address in the RAM area is specified.

Remark 2.

A software breakpoint is set at the specified address.

Remark 3.

Clicking will not cause a break to occur at a breakpoint that was not set in this dialog box. The program can be forcibly stopped.

(5)

Generate a pseudo-error

Click on the Pseudo-Error Debugging panel [Full-spec emulator][E1][E20]. An error is generated using an ECM pseudo-error trigger register (e.g. ECMPE0). An interrupt or reset is generated based on the user setting. A break occurs when execution passes the address specified in the Breakpoint Setting dialog box [Full-spec emulator][E1][E20].

Remark

Pseudo-error debugging is not supported in Async debug mode. When Async debug mode has been selected, click after switching the value of the [Debug mode] property in the [Multi-core] category on the [Debug Tool Settings] tab of the Property panel to [Sync debug mode].
When there is an ECM pseudo error trigger register (e.g. ECMnPE0) for each PE, the ECM pseudo error trigger register (n in ECMnPE0 indicates the current core) of the current core is used.

(6)

Display "!" for the generated error

When a break occurs, the ECM master/checker error source status register (e.g. ECMmESSTR0) is referenced and "!" is displayed for the generated error.

Figure 2.155

Pseudo-Error Debugging Panel

Remark

If the setting of the ECM master/checker error source status register (e.g. ECMmESSTR0) has been cleared, [!] is not displayed even when an ECM error occurs.