aboutsummaryrefslogtreecommitdiff
path: root/src/isr.s
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2024-11-14 02:19:09 -0700
committerJosh Rahm <joshuarahm@gmail.com>2024-11-14 02:19:09 -0700
commitd1ebd3bd806f4b4e1f74703f682ca64994c79a28 (patch)
tree248a6a35a3b7c5232bcdafe6a6bfbe556be8ad0f /src/isr.s
parentc9402e5a5d67ef877fa7f5f67c07a794574ded35 (diff)
downloadch573-d1ebd3bd806f4b4e1f74703f682ca64994c79a28.tar.gz
ch573-d1ebd3bd806f4b4e1f74703f682ca64994c79a28.tar.bz2
ch573-d1ebd3bd806f4b4e1f74703f682ca64994c79a28.zip
Get a good, basic framework for ISRs and properly handle the data sections.
Diffstat (limited to 'src/isr.s')
-rw-r--r--src/isr.s54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/isr.s b/src/isr.s
new file mode 100644
index 0000000..6a9e6cf
--- /dev/null
+++ b/src/isr.s
@@ -0,0 +1,54 @@
+
+.section .sinit
+_start:
+j on_reset /* first instruction. Should jump directly to on_reset */
+
+.section .isr_vector
+.global isr_vector
+isr_vector:
+.align 4
+.word 0
+ j irq_on_nmi
+ j irq_on_exc
+
+.word 0
+.word 0
+.word 0
+.word 0
+.word 0
+.word 0
+.word 0
+.word 0
+
+ j irq_on_systick
+
+.word 0
+
+ j irq_on_swi
+
+.word 0
+
+ j irq_on_tmr0
+ j irq_on_gpio_a
+ j irq_on_gpio_b
+ j irq_on_spi0
+ j irq_on_blel
+ j irq_on_bleb
+ j irq_on_usb
+
+.word 0
+
+ j irq_on_tmr1
+ j irq_on_tmr2
+ j irq_on_uart0
+ j irq_on_uart1
+ j irq_on_rtc
+ j irq_on_adc
+
+.word 0
+
+ j irq_on_pwmx
+ j irq_on_tmr3
+ j irq_on_uart2
+ j irq_on_uart3
+ j irq_on_wdog_bat