Filling the vector tables

I am using e2studio/CCRX/SmartConfigurator

I noticed that in vecttbl.c, the Exception Vector Table is filled in the following way:

#pragma section C EXCEPTVECT

void (* const Except_Vectors[])(void) =
{
/* Offset from EXTB: Reserved area - must be all 0xFF */
(void (*)(void))0xFFFFFFFF, /* 0x00 - Reserved */
......
(void (*)(void))0xFFFFFFFF, /* 0x4c - Reserved */

/* Exception vector table */
excep_supervisor_inst_isr, /* 0x50 Exception(Supervisor Instruction) */
excep_access_isr, /* 0x54 Exception(Access exception) */
undefined_interrupt_source_isr, /* 0x58 Reserved */
excep_undefined_inst_isr, /* 0x5c Exception(Undefined Instruction) */
undefined_interrupt_source_isr, /* 0x60 Reserved */
excep_floating_point_isr, /* 0x64 Exception(Floating Point) */
......
non_maskable_isr, /* 0x78 NMI */
};

However, for Interrupt Vector Table, user would use #pragma interrupt func_name(....)

Q1. Why are they done differently?

Q2. What are the differences?

  • If you like you can also program such a table for user interrupts. There are some sample codes that have an array with interrupt vector addresses.
    Exceptions are (usually) non maskable interrupts.
    Interrupts are maskable peripheral interrupts.
    Exception vector table includes some interrupts being used by the emulator (software break, debug interrupt, ...)
    In RX V1 exception vector table was located at a fixed address.
  • In reply to FrankL:

    I created an RX65N project (without adding any FIT modules etc.)
    The vector excep_supervisor_inst_isr in the Exception Table, contains this code:

    R_BSP_ATTRIB_INTERRUPT void excep_supervisor_inst_isr(void)
    {
    /* If user has registered a callback for this exception then call it. */
    R_BSP_InterruptControl(BSP_INT_SRC_EXC_SUPERVISOR_INSTR, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
    }

    BSP_INT_SRC_EXC_SUPERVISOR_INSTR has the value '0'

    However as I traced R_BSP_InterruptControl(), I could not find which part of the BSP code actually fill g_bsp_vectors[0] with callback function

    Does user have to fill g_bsp_vectors[0]? If yes, where should it be? Or am I missing something?