|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Cortex-M85 vector table + ra8_isr dispatching IRQ trampolines (RA8P1). More...
Go to the source code of this file.
Macros | |
| #define | RA8_IRQ_STUB(n) |
| RA8 IRQ STUB. | |
| #define | E(n) |
Typedefs | |
| typedef void(* | exc_handler_t) (void) |
Enumerations | |
| enum | : uint16_t { k_ra8_irq_count = 112U } |
| enum | ra8_vector_exc_t : uint32_t { k_ra8_vector_hardfault = 3U , k_ra8_vector_memmanage = 4U , k_ra8_vector_busfault = 5U , k_ra8_vector_usagefault = 6U } |
| Exception numbers matching the Cortex-M vector table slots. More... | |
Functions | |
| void | Reset_Handler (void) |
| void | HardFault_Handler (void) |
| void | MemManage_Handler (void) |
| void | BusFault_Handler (void) |
| void | UsageFault_Handler (void) |
| void | NMI_Handler (void) |
| Cortex-M85 NMI handler (vector table slot 2). | |
| void | SecureFault_Handler (void) |
| Cortex-M85 SecureFault handler (vector table slot 7). | |
| void | SVC_Handler (void) |
| void | DebugMon_Handler (void) |
| void | PendSV_Handler (void) |
| void | SysTick_Handler (void) |
| Service one SysTick event for the core timebase. | |
| void | ra8_isr_dispatch (uint16_t slot) |
| Invoke the handler stored in dispatch-table slot slot. | |
| void | IRQ0_Handler (void) |
| void | IRQ1_Handler (void) |
| void | IRQ2_Handler (void) |
| void | IRQ3_Handler (void) |
| void | IRQ4_Handler (void) |
| void | IRQ5_Handler (void) |
| void | IRQ6_Handler (void) |
| void | IRQ7_Handler (void) |
| void | IRQ8_Handler (void) |
| void | IRQ9_Handler (void) |
| void | IRQ10_Handler (void) |
| void | IRQ11_Handler (void) |
| void | IRQ12_Handler (void) |
| void | IRQ13_Handler (void) |
| void | IRQ14_Handler (void) |
| void | IRQ15_Handler (void) |
| void | IRQ16_Handler (void) |
| void | IRQ17_Handler (void) |
| void | IRQ18_Handler (void) |
| void | IRQ19_Handler (void) |
| void | IRQ20_Handler (void) |
| void | IRQ21_Handler (void) |
| void | IRQ22_Handler (void) |
| void | IRQ23_Handler (void) |
| void | IRQ24_Handler (void) |
| void | IRQ25_Handler (void) |
| void | IRQ26_Handler (void) |
| void | IRQ27_Handler (void) |
| void | IRQ28_Handler (void) |
| void | IRQ29_Handler (void) |
| void | IRQ30_Handler (void) |
| void | IRQ31_Handler (void) |
| void | IRQ32_Handler (void) |
| void | IRQ33_Handler (void) |
| void | IRQ34_Handler (void) |
| void | IRQ35_Handler (void) |
| void | IRQ36_Handler (void) |
| void | IRQ37_Handler (void) |
| void | IRQ38_Handler (void) |
| void | IRQ39_Handler (void) |
| void | IRQ40_Handler (void) |
| void | IRQ41_Handler (void) |
| void | IRQ42_Handler (void) |
| void | IRQ43_Handler (void) |
| void | IRQ44_Handler (void) |
| void | IRQ45_Handler (void) |
| void | IRQ46_Handler (void) |
| void | IRQ47_Handler (void) |
| void | IRQ48_Handler (void) |
| void | IRQ49_Handler (void) |
| void | IRQ50_Handler (void) |
| void | IRQ51_Handler (void) |
| void | IRQ52_Handler (void) |
| void | IRQ53_Handler (void) |
| void | IRQ54_Handler (void) |
| void | IRQ55_Handler (void) |
| void | IRQ56_Handler (void) |
| void | IRQ57_Handler (void) |
| void | IRQ58_Handler (void) |
| void | IRQ59_Handler (void) |
| void | IRQ60_Handler (void) |
| void | IRQ61_Handler (void) |
| void | IRQ62_Handler (void) |
| void | IRQ63_Handler (void) |
| void | IRQ64_Handler (void) |
| void | IRQ65_Handler (void) |
| void | IRQ66_Handler (void) |
| void | IRQ67_Handler (void) |
| void | IRQ68_Handler (void) |
| void | IRQ69_Handler (void) |
| void | IRQ70_Handler (void) |
| void | IRQ71_Handler (void) |
| void | IRQ72_Handler (void) |
| void | IRQ73_Handler (void) |
| void | IRQ74_Handler (void) |
| void | IRQ75_Handler (void) |
| void | IRQ76_Handler (void) |
| void | IRQ77_Handler (void) |
| void | IRQ78_Handler (void) |
| void | IRQ79_Handler (void) |
| void | IRQ80_Handler (void) |
| void | IRQ81_Handler (void) |
| void | IRQ82_Handler (void) |
| void | IRQ83_Handler (void) |
| void | IRQ84_Handler (void) |
| void | IRQ85_Handler (void) |
| void | IRQ86_Handler (void) |
| void | IRQ87_Handler (void) |
| void | IRQ88_Handler (void) |
| void | IRQ89_Handler (void) |
| void | IRQ90_Handler (void) |
| void | IRQ91_Handler (void) |
| void | IRQ92_Handler (void) |
| void | IRQ93_Handler (void) |
| void | IRQ94_Handler (void) |
| void | IRQ95_Handler (void) |
| void | IRQ96_Handler (void) |
| void | IRQ97_Handler (void) |
| void | IRQ98_Handler (void) |
| void | IRQ99_Handler (void) |
| void | IRQ100_Handler (void) |
| void | IRQ101_Handler (void) |
| void | IRQ102_Handler (void) |
| void | IRQ103_Handler (void) |
| void | IRQ104_Handler (void) |
| void | IRQ105_Handler (void) |
| void | IRQ106_Handler (void) |
| void | IRQ107_Handler (void) |
| void | IRQ108_Handler (void) |
| void | IRQ109_Handler (void) |
| void | IRQ110_Handler (void) |
| void | IRQ111_Handler (void) |
| void | ra8_exception_report (const void *frame, uint32_t exc_number) |
| void | Default_Handler (void) |
| Catch-all handler for every exception slot nothing else claims. | |
Variables | |
| uint32_t | g_ra8_ls_stack_top |
| Top of main stack (linker symbol). | |
| uint32_t | g_ra8_ls_sdata |
| Start of .data in SRAM. | |
| uint32_t | g_ra8_ls_edata |
| End of .data in SRAM. | |
| uint32_t | g_ra8_ls_sidata |
| Source of .data in MRAM. | |
| uint32_t | g_ra8_ls_sbss |
| Start of .bss in SRAM. | |
| uint32_t | g_ra8_ls_ebss |
| End of .bss in SRAM. | |
| const exc_handler_t | g_ra8_vector_table_start [16U+k_ra8_irq_count] |
Cortex-M85 vector table + ra8_isr dispatching IRQ trampolines (RA8P1).
Emits the interrupt vector table that the Cortex-M85 reads at reset from the address in its VTOR register. Slot 0 is the initial main stack pointer, slot 1 is the Reset_Handler, and slots 2..15 are the standard ARM core exceptions. Slots 16+ are peripheral IRQs routed through the ICU's IELSR table.
Every handler is declared weak and aliased to Default_Handler, so application code can override any of them by declaring a non-weak function with the same name.
Definition in file vector_table.c.
| #define E | ( | n | ) |
| #define RA8_IRQ_STUB | ( | n | ) |
RA8 IRQ STUB.
Definition at line 117 of file vector_table.c.
| typedef void(* exc_handler_t) (void) |
Definition at line 53 of file vector_table.c.
| anonymous enum : uint16_t |
| Enumerator | |
|---|---|
| k_ra8_irq_count | RA8 IRQ count. |
Definition at line 109 of file vector_table.c.
| enum ra8_vector_exc_t : uint32_t |
Exception numbers matching the Cortex-M vector table slots.
| Enumerator | |
|---|---|
| k_ra8_vector_hardfault | RA8 vector hardfault. |
| k_ra8_vector_memmanage | RA8 vector memmanage. |
| k_ra8_vector_busfault | RA8 vector busfault. |
| k_ra8_vector_usagefault | RA8 vector usagefault. |
Definition at line 456 of file vector_table.c.
| void BusFault_Handler | ( | void | ) |
Definition at line 484 of file vector_table.c.
| void DebugMon_Handler | ( | void | ) |
| void Default_Handler | ( | void | ) |
Catch-all handler for every exception slot nothing else claims.
The core exception vectors are declared weak and aliased here, so an unclaimed exception lands in this function instead of an unmapped address. An application overrides any one of them by defining a non-weak function with the matching handler name.
Definition at line 535 of file vector_table.c.
| void HardFault_Handler | ( | void | ) |
Definition at line 464 of file vector_table.c.
| void IRQ0_Handler | ( | void | ) |
Definition at line 132 of file vector_table.c.
| void IRQ100_Handler | ( | void | ) |
Definition at line 232 of file vector_table.c.
| void IRQ101_Handler | ( | void | ) |
Definition at line 233 of file vector_table.c.
| void IRQ102_Handler | ( | void | ) |
Definition at line 234 of file vector_table.c.
| void IRQ103_Handler | ( | void | ) |
Definition at line 235 of file vector_table.c.
| void IRQ104_Handler | ( | void | ) |
Definition at line 236 of file vector_table.c.
| void IRQ105_Handler | ( | void | ) |
Definition at line 237 of file vector_table.c.
| void IRQ106_Handler | ( | void | ) |
Definition at line 238 of file vector_table.c.
| void IRQ107_Handler | ( | void | ) |
Definition at line 239 of file vector_table.c.
| void IRQ108_Handler | ( | void | ) |
Definition at line 240 of file vector_table.c.
| void IRQ109_Handler | ( | void | ) |
Definition at line 241 of file vector_table.c.
| void IRQ10_Handler | ( | void | ) |
Definition at line 142 of file vector_table.c.
| void IRQ110_Handler | ( | void | ) |
Definition at line 242 of file vector_table.c.
| void IRQ111_Handler | ( | void | ) |
Definition at line 243 of file vector_table.c.
| void IRQ11_Handler | ( | void | ) |
Definition at line 143 of file vector_table.c.
| void IRQ12_Handler | ( | void | ) |
Definition at line 144 of file vector_table.c.
| void IRQ13_Handler | ( | void | ) |
Definition at line 145 of file vector_table.c.
| void IRQ14_Handler | ( | void | ) |
Definition at line 146 of file vector_table.c.
| void IRQ15_Handler | ( | void | ) |
Definition at line 147 of file vector_table.c.
| void IRQ16_Handler | ( | void | ) |
Definition at line 148 of file vector_table.c.
| void IRQ17_Handler | ( | void | ) |
Definition at line 149 of file vector_table.c.
| void IRQ18_Handler | ( | void | ) |
Definition at line 150 of file vector_table.c.
| void IRQ19_Handler | ( | void | ) |
Definition at line 151 of file vector_table.c.
| void IRQ1_Handler | ( | void | ) |
Definition at line 133 of file vector_table.c.
| void IRQ20_Handler | ( | void | ) |
Definition at line 152 of file vector_table.c.
| void IRQ21_Handler | ( | void | ) |
Definition at line 153 of file vector_table.c.
| void IRQ22_Handler | ( | void | ) |
Definition at line 154 of file vector_table.c.
| void IRQ23_Handler | ( | void | ) |
Definition at line 155 of file vector_table.c.
| void IRQ24_Handler | ( | void | ) |
Definition at line 156 of file vector_table.c.
| void IRQ25_Handler | ( | void | ) |
Definition at line 157 of file vector_table.c.
| void IRQ26_Handler | ( | void | ) |
Definition at line 158 of file vector_table.c.
| void IRQ27_Handler | ( | void | ) |
Definition at line 159 of file vector_table.c.
| void IRQ28_Handler | ( | void | ) |
Definition at line 160 of file vector_table.c.
| void IRQ29_Handler | ( | void | ) |
Definition at line 161 of file vector_table.c.
| void IRQ2_Handler | ( | void | ) |
Definition at line 134 of file vector_table.c.
| void IRQ30_Handler | ( | void | ) |
Definition at line 162 of file vector_table.c.
| void IRQ31_Handler | ( | void | ) |
Definition at line 163 of file vector_table.c.
| void IRQ32_Handler | ( | void | ) |
Definition at line 164 of file vector_table.c.
| void IRQ33_Handler | ( | void | ) |
Definition at line 165 of file vector_table.c.
| void IRQ34_Handler | ( | void | ) |
Definition at line 166 of file vector_table.c.
| void IRQ35_Handler | ( | void | ) |
Definition at line 167 of file vector_table.c.
| void IRQ36_Handler | ( | void | ) |
Definition at line 168 of file vector_table.c.
| void IRQ37_Handler | ( | void | ) |
Definition at line 169 of file vector_table.c.
| void IRQ38_Handler | ( | void | ) |
Definition at line 170 of file vector_table.c.
| void IRQ39_Handler | ( | void | ) |
Definition at line 171 of file vector_table.c.
| void IRQ3_Handler | ( | void | ) |
Definition at line 135 of file vector_table.c.
| void IRQ40_Handler | ( | void | ) |
Definition at line 172 of file vector_table.c.
| void IRQ41_Handler | ( | void | ) |
Definition at line 173 of file vector_table.c.
| void IRQ42_Handler | ( | void | ) |
Definition at line 174 of file vector_table.c.
| void IRQ43_Handler | ( | void | ) |
Definition at line 175 of file vector_table.c.
| void IRQ44_Handler | ( | void | ) |
Definition at line 176 of file vector_table.c.
| void IRQ45_Handler | ( | void | ) |
Definition at line 177 of file vector_table.c.
| void IRQ46_Handler | ( | void | ) |
Definition at line 178 of file vector_table.c.
| void IRQ47_Handler | ( | void | ) |
Definition at line 179 of file vector_table.c.
| void IRQ48_Handler | ( | void | ) |
Definition at line 180 of file vector_table.c.
| void IRQ49_Handler | ( | void | ) |
Definition at line 181 of file vector_table.c.
| void IRQ4_Handler | ( | void | ) |
Definition at line 136 of file vector_table.c.
| void IRQ50_Handler | ( | void | ) |
Definition at line 182 of file vector_table.c.
| void IRQ51_Handler | ( | void | ) |
Definition at line 183 of file vector_table.c.
| void IRQ52_Handler | ( | void | ) |
Definition at line 184 of file vector_table.c.
| void IRQ53_Handler | ( | void | ) |
Definition at line 185 of file vector_table.c.
| void IRQ54_Handler | ( | void | ) |
Definition at line 186 of file vector_table.c.
| void IRQ55_Handler | ( | void | ) |
Definition at line 187 of file vector_table.c.
| void IRQ56_Handler | ( | void | ) |
Definition at line 188 of file vector_table.c.
| void IRQ57_Handler | ( | void | ) |
Definition at line 189 of file vector_table.c.
| void IRQ58_Handler | ( | void | ) |
Definition at line 190 of file vector_table.c.
| void IRQ59_Handler | ( | void | ) |
Definition at line 191 of file vector_table.c.
| void IRQ5_Handler | ( | void | ) |
Definition at line 137 of file vector_table.c.
| void IRQ60_Handler | ( | void | ) |
Definition at line 192 of file vector_table.c.
| void IRQ61_Handler | ( | void | ) |
Definition at line 193 of file vector_table.c.
| void IRQ62_Handler | ( | void | ) |
Definition at line 194 of file vector_table.c.
| void IRQ63_Handler | ( | void | ) |
Definition at line 195 of file vector_table.c.
| void IRQ64_Handler | ( | void | ) |
Definition at line 196 of file vector_table.c.
| void IRQ65_Handler | ( | void | ) |
Definition at line 197 of file vector_table.c.
| void IRQ66_Handler | ( | void | ) |
Definition at line 198 of file vector_table.c.
| void IRQ67_Handler | ( | void | ) |
Definition at line 199 of file vector_table.c.
| void IRQ68_Handler | ( | void | ) |
Definition at line 200 of file vector_table.c.
| void IRQ69_Handler | ( | void | ) |
Definition at line 201 of file vector_table.c.
| void IRQ6_Handler | ( | void | ) |
Definition at line 138 of file vector_table.c.
| void IRQ70_Handler | ( | void | ) |
Definition at line 202 of file vector_table.c.
| void IRQ71_Handler | ( | void | ) |
Definition at line 203 of file vector_table.c.
| void IRQ72_Handler | ( | void | ) |
Definition at line 204 of file vector_table.c.
| void IRQ73_Handler | ( | void | ) |
Definition at line 205 of file vector_table.c.
| void IRQ74_Handler | ( | void | ) |
Definition at line 206 of file vector_table.c.
| void IRQ75_Handler | ( | void | ) |
Definition at line 207 of file vector_table.c.
| void IRQ76_Handler | ( | void | ) |
Definition at line 208 of file vector_table.c.
| void IRQ77_Handler | ( | void | ) |
Definition at line 209 of file vector_table.c.
| void IRQ78_Handler | ( | void | ) |
Definition at line 210 of file vector_table.c.
| void IRQ79_Handler | ( | void | ) |
Definition at line 211 of file vector_table.c.
| void IRQ7_Handler | ( | void | ) |
Definition at line 139 of file vector_table.c.
| void IRQ80_Handler | ( | void | ) |
Definition at line 212 of file vector_table.c.
| void IRQ81_Handler | ( | void | ) |
Definition at line 213 of file vector_table.c.
| void IRQ82_Handler | ( | void | ) |
Definition at line 214 of file vector_table.c.
| void IRQ83_Handler | ( | void | ) |
Definition at line 215 of file vector_table.c.
| void IRQ84_Handler | ( | void | ) |
Definition at line 216 of file vector_table.c.
| void IRQ85_Handler | ( | void | ) |
Definition at line 217 of file vector_table.c.
| void IRQ86_Handler | ( | void | ) |
Definition at line 218 of file vector_table.c.
| void IRQ87_Handler | ( | void | ) |
Definition at line 219 of file vector_table.c.
| void IRQ88_Handler | ( | void | ) |
Definition at line 220 of file vector_table.c.
| void IRQ89_Handler | ( | void | ) |
Definition at line 221 of file vector_table.c.
| void IRQ8_Handler | ( | void | ) |
Definition at line 140 of file vector_table.c.
| void IRQ90_Handler | ( | void | ) |
Definition at line 222 of file vector_table.c.
| void IRQ91_Handler | ( | void | ) |
Definition at line 223 of file vector_table.c.
| void IRQ92_Handler | ( | void | ) |
Definition at line 224 of file vector_table.c.
| void IRQ93_Handler | ( | void | ) |
Definition at line 225 of file vector_table.c.
| void IRQ94_Handler | ( | void | ) |
Definition at line 226 of file vector_table.c.
| void IRQ95_Handler | ( | void | ) |
Definition at line 227 of file vector_table.c.
| void IRQ96_Handler | ( | void | ) |
Definition at line 228 of file vector_table.c.
| void IRQ97_Handler | ( | void | ) |
Definition at line 229 of file vector_table.c.
| void IRQ98_Handler | ( | void | ) |
Definition at line 230 of file vector_table.c.
| void IRQ99_Handler | ( | void | ) |
Definition at line 231 of file vector_table.c.
| void IRQ9_Handler | ( | void | ) |
Definition at line 141 of file vector_table.c.
| void MemManage_Handler | ( | void | ) |
Definition at line 474 of file vector_table.c.
| void NMI_Handler | ( | void | ) |
Cortex-M85 NMI handler (vector table slot 2).
Strong definition overriding the weak NMI_Handler alias in every per-app vector_table.c. Naked trampoline in the exact shape of the HardFault/MemManage/BusFault/UsageFault/SecureFault trampolines: tst lr, #4 selects the interrupted stack (MSP when EXC_RETURN[2] = 0, else PSP) into r0 and control tail-branches into internal_nmi_report(), which appends the ICU cause. Naked asm is required: only assembly can read EXC_RETURN and the banked stack pointers before the compiler touches any register.
Strong definition overriding the weak NMI_Handler alias in every per-app vector_table.c. Naked trampoline in the exact shape of the HardFault/MemManage/BusFault/UsageFault/SecureFault trampolines: tst lr, #4 selects the interrupted stack (MSP when EXC_RETURN[2] = 0, else PSP) into r0 and control tail-branches into internal_ra8_board_nmi_report(), which appends the ICU cause. Naked asm is required: only assembly can read EXC_RETURN and the banked stack pointers before the compiler touches any register.
Definition at line 109 of file nmi_exception.c.
| void PendSV_Handler | ( | void | ) |
|
extern |
|
extern |
Invoke the handler stored in dispatch-table slot slot.
Called from the Cortex-M85 vector-table trampoline when any ICU NVIC line fires. The trampoline feeds its NVIC index (which matches the IELSR slot number). ra8_isr_dispatch looks up the handler + context stored at registration time and calls the handler with the stored context. The IELSR.IR flag is cleared before the handler runs so a nested identical event re-raises the interrupt instead of being latched.
| [in] | slot | Slot number 0..k_ra8_isr_slot_count - 1. |
| void Reset_Handler | ( | void | ) |
Definition at line 407 of file vector_table.c.
References g_ra8_ls_ebss, g_ra8_ls_edata, g_ra8_ls_sbss, g_ra8_ls_sdata, g_ra8_ls_sidata, main(), and SystemInit().
| void SecureFault_Handler | ( | void | ) |
Cortex-M85 SecureFault handler (vector table slot 7).
Strong definition overriding the weak SecureFault_Handler alias in every per-app vector_table.c. Naked trampoline in the exact shape of the HardFault/MemManage/BusFault/UsageFault trampolines: tst lr, #4 selects the faulting stack (MSP when EXC_RETURN[2] = 0, else PSP), r1 carries the architectural exception number 7, and control tail-branches into ra8_exception_report(), which snapshots the frame
Cortex-M85 SecureFault handler (vector table slot 7).
Vector_table.c installs this in the SecureFault slot when the firmware is built with RA8_TRUSTZONE_ENABLE. With TZ off the function is dead-stripped because nothing references it.
Definition at line 71 of file secure_exception.c.
| void SVC_Handler | ( | void | ) |
|
extern |
Service one SysTick event for the core timebase.
Service the SysTick exception selected by the linked application.
The weak firmware implementation advances the millisecond counter, then services linked ThreadX and USB hooks when their weak symbols and readiness state permit. The host-test implementation advances only the counter. An application may replace either weak definition with a strong handler.
Service one SysTick event for the core timebase.
Service the SysTick exception selected by the linked application.
Service one SysTick event for the core timebase.
Service one SysTick event for the core timebase.
Resolves to the weak core timebase handler unless a strong RTOS or application handler overrides it. The vector table references the selected implementation without owning its subsystem policy.
The weak firmware implementation advances the millisecond counter, then services linked ThreadX and USB hooks when their weak symbols and readiness state permit. The host-test implementation advances only the counter. An application may replace either weak definition with a strong handler.
Service the SysTick exception selected by the linked application.
The weak firmware implementation advances the millisecond counter, then services linked ThreadX and USB hooks when their weak symbols and readiness state permit. The host-test implementation advances only the counter. An application may replace either weak definition with a strong handler.
Service the SysTick exception selected by the linked application.
Definition at line 244 of file ra8_time.c.
| void UsageFault_Handler | ( | void | ) |
Definition at line 494 of file vector_table.c.
|
extern |
End of .bss in SRAM.
|
extern |
End of .data in SRAM.
|
extern |
Start of .bss in SRAM.
|
extern |
Start of .data in SRAM.
|
extern |
Source of .data in MRAM.
|
extern |
Top of main stack (linker symbol).
| const exc_handler_t g_ra8_vector_table_start[16U+k_ra8_irq_count] |
Definition at line 265 of file vector_table.c.