Skip to main content

IAR Embedded Workbench for RISC-V 3.40

‑‑drv_catch_exceptions

In this section:
Syntax
‑‑drv_catch_exceptions=value
Parameters

value

A 32-bit value. The lower 28 bits specify which exceptions and interrupts to catch:

Bit 0 = Reset

Bit 1 = Non-maskable interrupt (NMI)

Bit 2 = Instruction access misaligned (IAM)

Bit 3 = Instruction access fault (IAF)

Bit 4 = Illegal instruction (II)

Bit 5 = Load access maligned (LAM)

Bit 6 = Load access fault (LAF)

Bit 7 = Store/AMO access maligned (SAM)

Bit 8 = Store/AMO access fault (SAF)

Bit 9 = User Mode—Environment call (UEC)

Bit 10 = Supervisor Mode—Environment call (SEC)

Bit 11= Machine Mode—Environment call (MEC)

Bit 12 = Instruction page fault (IPF)

Bit 13 = Load page fault (LPF)

Bit 14 = Store/AMO page fault (SPF)

Bit 15-23 = Not used

Bit 24 = External interrupt

Bit 25 = Timer interrupt

Bit 26 = Software interrupt

Bit 27 = Not used

The upper 4 bits specify in which execution mode (or modes) the exceptions and interrupts will be caught, except for Reset and NMI which, if selected, will be caught regardless of the current exception mode:

Bit 28 = Machine Mode

Bit 29 = Supervisor Mode

Bit 30 = User Mode

Bit 31 = Not used

For use with

The C-SPY I-jet driver.

Description

Use this option to make the application stop when a certain exception occurs.

Note

Not all exceptions are supported by all devices. Refer to the manufacturer’s device manual to confirm which exceptions your device supports.

Caution

Project>Options>Debugger>I-jet>Breakpoints>Catch exceptions