summaryrefslogtreecommitdiff
path: root/interrupt/SConscript
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2021-01-16 01:25:21 +0100
committerVegard Storheil Eriksen <zyp@jvnv.net>2021-01-16 01:25:21 +0100
commit172d694cf7ba582635ac38454bad0f0fdaa14773 (patch)
treeefb0d145ed7fb3eeb44541714568680a6451ab3d /interrupt/SConscript
parent9921c9db409ad5b00fe4a43a2459e2fd2de6b0cf (diff)
interrupt: Generate interrupts from platform spec.
Diffstat (limited to 'interrupt/SConscript')
-rw-r--r--interrupt/SConscript18
1 files changed, 18 insertions, 0 deletions
diff --git a/interrupt/SConscript b/interrupt/SConscript
new file mode 100644
index 0000000..c94bde8
--- /dev/null
+++ b/interrupt/SConscript
@@ -0,0 +1,18 @@
+Import('env')
+
+sources = []
+
+interrupt_controller = env['PLATFORM_SPEC'].get('interrupt_controller')
+
+exceptions = env['PLATFORM_SPEC'].get('exception', {})
+irqs = env['PLATFORM_SPEC'].get('irq', {})
+
+env.Jinja2('interrupt_enums.h', 'interrupt_enums.h.j2', exceptions = exceptions, irqs = irqs),
+
+if interrupt_controller == 'nvic':
+ sources.extend([
+ env.Jinja2('vectors_nvic.cpp', 'vectors_nvic.cpp.j2', exceptions = exceptions, irqs = irqs),
+ env.Jinja2('default_handlers.cpp', 'default_handlers.cpp.j2', exceptions = exceptions, irqs = irqs),
+ ])
+
+Return('sources')