summaryrefslogtreecommitdiff
path: root/interrupt/vectors_nvic.cpp.j2
blob: 89d65465d28d3b57435c98c32e8f97736920b2f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// This file is auto-generated from a template!
// You should reconsider editing!
#include "interrupt.h"

void entry();
extern int _ram_end;

[[gnu::section(".vectors")]]
interrupt::vector_t vectors[] = {
	(interrupt::vector_t)&_ram_end,
	entry,

    {% for i in range(2, 16) %}
        {% if i in interrupts.exception %}
            interrupt::handler<interrupt::exception::{{ interrupts.exception[i] }}>,
        {% else %}
            0,
        {% endif %}
    {% endfor %}

    {% for i in range(interrupts.irq | max + 1 if interrupts.irq else 0) %}
        {% if i in interrupts.irq %}
            interrupt::handler<interrupt::irq::{{ interrupts.irq[i] }}>,
        {% else %}
            0,
        {% endif %}
    {% endfor %}
};