From 78081bd794fe58a1be1b078ddf713158fabcdb83 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Sat, 6 Jul 2013 22:55:44 -0400 Subject: [PATCH] lpc43xx: Add irq.yaml for M0 core --- include/libopencm3/dispatch/nvic.h | 2 ++ include/libopencm3/lpc43xx/m0/irq.yaml | 34 ++++++++++++++++++++++++++ lib/dispatch/vector_nvic.c | 2 ++ lib/lpc43xx/m0/Makefile | 2 +- 4 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 include/libopencm3/lpc43xx/m0/irq.yaml diff --git a/include/libopencm3/dispatch/nvic.h b/include/libopencm3/dispatch/nvic.h index 67ed85c3..868910d0 100644 --- a/include/libopencm3/dispatch/nvic.h +++ b/include/libopencm3/dispatch/nvic.h @@ -22,6 +22,8 @@ # include #elif defined(LPC43XX_M4) # include +#elif defined(LPC43XX_M0) +# include #elif defined(SAM3X) # include diff --git a/include/libopencm3/lpc43xx/m0/irq.yaml b/include/libopencm3/lpc43xx/m0/irq.yaml new file mode 100644 index 00000000..33ce9cb5 --- /dev/null +++ b/include/libopencm3/lpc43xx/m0/irq.yaml @@ -0,0 +1,34 @@ +includeguard: LIBOPENCM3_LPC43xx_M0_NVIC_H +partname_humanreadable: LPC 43xx series M0 core +partname_doxygen: LPC43xx (M0) +irqs: + 0: rtc + 1: m4core + 2: dma +# reserved: 3 + 4: flasheepromat + 5: ethernet + 6: sdio + 7: lcd + 8: usb0 + 9: usb1 + 10: sct + 11: ritimer_or_wwdt + 12: timer0 + 13: gint1 + 14: pin_int4 + 15: timer3 + 16: mcpwm + 17: adc0 + 18: i2c0_or_irc1 + 19: sgpio + 20: spi_or_dac + 21: adc1 + 22: ssp0_or_ssp1 + 23: eventrouter + 24: usart0 + 25: uart1 + 26: usart2_or_c_can1 + 27: usart3 + 28: i2s0_or_i2s1 + 29: c_can0 \ No newline at end of file diff --git a/lib/dispatch/vector_nvic.c b/lib/dispatch/vector_nvic.c index fcf6fae8..4241d0c1 100644 --- a/lib/dispatch/vector_nvic.c +++ b/lib/dispatch/vector_nvic.c @@ -22,6 +22,8 @@ # include "../lpc17xx/vector_nvic.c" #elif defined(LPC43XX_M4) # include "../lpc43xx/m4/vector_nvic.c" +#elif defined(LPC43XX_M0) +# include "../lpc43xx/m0/vector_nvic.c" #elif defined(SAM3X) # include "../sam/3x/vector_nvic.c" diff --git a/lib/lpc43xx/m0/Makefile b/lib/lpc43xx/m0/Makefile index 2995c96f..0aa5bea9 100644 --- a/lib/lpc43xx/m0/Makefile +++ b/lib/lpc43xx/m0/Makefile @@ -27,7 +27,7 @@ CC = $(PREFIX)-gcc AR = $(PREFIX)-ar CFLAGS = -O2 -g3 -Wall -Wextra -I../../../include -fno-common \ -mcpu=cortex-m0 -mthumb -Wstrict-prototypes \ - -ffunction-sections -fdata-sections -MD + -ffunction-sections -fdata-sections -MD -DLPC43XX -DLPC43XX_M0 # ARFLAGS = rcsv ARFLAGS = rcs