]>
wirehaze git hosting - stm32f411ceu6.git/blob - sys/core/exceptions.c
7 /* Initialize just enough to be able to handle a fault. */
8 __attribute__ ((noinline
, used
)) static void
11 unsigned int *src
, *dst
;
13 /* Relocate .data section to SRAM */
14 src
= &_data_lma_start
;
15 dst
= &_data_vma_start
;
17 while (dst
< &_data_vma_end
)
21 dst
= &_bss_vma_start
;
23 while (dst
< &_bss_vma_end
)
32 __attribute__ ((naked
, noreturn
)) static void
38 /* This function is the core logic for reset_handler (). We just need it so
39 * that when we jump to kentry the stack is empty. */
45 /* Jump to kernel entry code. When reset_handler () is called we are already
46 * running on Thread mode (Privileged), so we can just jump directly. */
50 /* TODO write proper exception handlers, this is just a test */
51 __attribute__ ((noreturn
)) static void
57 __attribute__ ((section (".vector_table"), used
))
58 static unsigned long const vector_table
[] = {
59 [0] = (unsigned long) &_sram_end
,
60 [1] = (unsigned long) reset_handler
,
61 [3] = (unsigned long) fault_handler
, /* ??? */
62 [6] = (unsigned long) fault_handler
,