aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile.include3
-rw-r--r--lib/dispatch/vector_nvic.c5
-rw-r--r--lib/lm3s/Makefile2
-rw-r--r--lib/lpc13xx/Makefile4
-rw-r--r--lib/lpc17xx/Makefile4
-rw-r--r--lib/lpc43xx/Makefile5
-rw-r--r--lib/stm32/f1/Makefile6
-rw-r--r--lib/stm32/f2/Makefile4
-rw-r--r--lib/stm32/f4/Makefile7
9 files changed, 22 insertions, 18 deletions
diff --git a/lib/Makefile.include b/lib/Makefile.include
index 9fbea24..6c25069 100644
--- a/lib/Makefile.include
+++ b/lib/Makefile.include
@@ -23,6 +23,9 @@ ifneq ($(V),1)
Q := @
endif
+# common objects
+OBJS += vector.o systick.o scb.o nvic.o assert.o
+
all: $(SRCLIBDIR)/$(LIBNAME).a
$(SRCLIBDIR)/$(LIBNAME).a: $(SRCLIBDIR)/$(LIBNAME).ld $(OBJS)
diff --git a/lib/dispatch/vector_nvic.c b/lib/dispatch/vector_nvic.c
index d710d31..233c320 100644
--- a/lib/dispatch/vector_nvic.c
+++ b/lib/dispatch/vector_nvic.c
@@ -17,8 +17,11 @@
#elif defined(LPC43XX)
# include "../lpc43xx/vector_nvic.c"
+#elif defined(LM3S)
+# include "../lm3s/vector_nvic.c"
+
#else
-# warning"no chipset defined; user interrupts are disabled"
+# warning"no interrupts defined for chipset; not allocating space in the vector table"
#define IRQ_HANDLERS
diff --git a/lib/lm3s/Makefile b/lib/lm3s/Makefile
index e471a00..6fc814d 100644
--- a/lib/lm3s/Makefile
+++ b/lib/lm3s/Makefile
@@ -25,7 +25,7 @@ CC = $(PREFIX)-gcc
AR = $(PREFIX)-ar
CFLAGS = -Os -g -Wall -Wextra -I../../include -fno-common \
-mcpu=cortex-m3 -mthumb -Wstrict-prototypes \
- -ffunction-sections -fdata-sections -MD
+ -ffunction-sections -fdata-sections -MD -DLM3S
# ARFLAGS = rcsv
ARFLAGS = rcs
OBJS = gpio.o vector.o assert.o
diff --git a/lib/lpc13xx/Makefile b/lib/lpc13xx/Makefile
index e1e69f7..15bc686 100644
--- a/lib/lpc13xx/Makefile
+++ b/lib/lpc13xx/Makefile
@@ -25,10 +25,10 @@ CC = $(PREFIX)-gcc
AR = $(PREFIX)-ar
CFLAGS = -Os -g -Wall -Wextra -I../../include -fno-common \
-mcpu=cortex-m3 -mthumb -Wstrict-prototypes \
- -ffunction-sections -fdata-sections -MD
+ -ffunction-sections -fdata-sections -MD -DLPC13XX
# ARFLAGS = rcsv
ARFLAGS = rcs
-OBJS = gpio.o assert.o
+OBJS = gpio.o
VPATH += ../cm3
diff --git a/lib/lpc17xx/Makefile b/lib/lpc17xx/Makefile
index d1da64a..19fc152 100644
--- a/lib/lpc17xx/Makefile
+++ b/lib/lpc17xx/Makefile
@@ -25,10 +25,10 @@ CC = $(PREFIX)-gcc
AR = $(PREFIX)-ar
CFLAGS = -O0 -g -Wall -Wextra -I../../include -fno-common \
-mcpu=cortex-m3 -mthumb -Wstrict-prototypes \
- -ffunction-sections -fdata-sections -MD
+ -ffunction-sections -fdata-sections -MD -DLPC17XX
# ARFLAGS = rcsv
ARFLAGS = rcs
-OBJS = gpio.o vector.o assert.o
+OBJS = gpio.o
VPATH += ../cm3
diff --git a/lib/lpc43xx/Makefile b/lib/lpc43xx/Makefile
index 6e08ea0..efbba0d 100644
--- a/lib/lpc43xx/Makefile
+++ b/lib/lpc43xx/Makefile
@@ -28,11 +28,10 @@ AR = $(PREFIX)-ar
CFLAGS = -O2 -g3 -Wall -Wextra -I../../include -fno-common \
-mcpu=cortex-m4 -mthumb -Wstrict-prototypes \
-ffunction-sections -fdata-sections -MD \
- -mfloat-abi=hard -mfpu=fpv4-sp-d16
+ -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DLPC43XX
# ARFLAGS = rcsv
ARFLAGS = rcs
-OBJS = gpio.o vector.o scu.o i2c.o ssp.o nvic.o systick.o \
- assert.o
+OBJS = gpio.o scu.o i2c.o ssp.o
VPATH += ../cm3
diff --git a/lib/stm32/f1/Makefile b/lib/stm32/f1/Makefile
index a2f7bf2..2bd5ff0 100644
--- a/lib/stm32/f1/Makefile
+++ b/lib/stm32/f1/Makefile
@@ -28,10 +28,10 @@ CFLAGS = -Os -g -Wall -Wextra -I../../../include -fno-common \
-ffunction-sections -fdata-sections -MD -DSTM32F1
# ARFLAGS = rcsv
ARFLAGS = rcs
-OBJS = vector.o rcc.o gpio.o usart.o adc.o spi.o flash.o nvic.o \
- rtc.o i2c.o dma.o systick.o exti.o scb.o ethernet.o \
+OBJS = rcc.o gpio.o usart.o adc.o spi.o flash.o \
+ rtc.o i2c.o dma.o exti.o ethernet.o \
usb_f103.o usb.o usb_control.o usb_standard.o can.o \
- timer.o usb_f107.o desig.o crc.o assert.o dac.o iwdg.o pwr.o
+ timer.o usb_f107.o desig.o crc.o dac.o iwdg.o pwr.o
VPATH += ../../usb:../:../../cm3
diff --git a/lib/stm32/f2/Makefile b/lib/stm32/f2/Makefile
index c127d61..5cbb977 100644
--- a/lib/stm32/f2/Makefile
+++ b/lib/stm32/f2/Makefile
@@ -28,8 +28,8 @@ CFLAGS = -Os -g -Wall -Wextra -I../../../include -fno-common \
-ffunction-sections -fdata-sections -MD -DSTM32F2
# ARFLAGS = rcsv
ARFLAGS = rcs
-OBJS = vector.o rcc.o gpio.o usart.o spi.o flash.o nvic.o \
- i2c.o systick.o exti.o scb.o timer.o assert.o
+OBJS = rcc.o gpio.o usart.o spi.o flash.o \
+ i2c.o exti.o timer.o
VPATH += ../../usb:../:../../cm3
diff --git a/lib/stm32/f4/Makefile b/lib/stm32/f4/Makefile
index fd0b279..e09ef26 100644
--- a/lib/stm32/f4/Makefile
+++ b/lib/stm32/f4/Makefile
@@ -29,10 +29,9 @@ CFLAGS = -Os -g -Wall -Wextra -I../../../include -fno-common \
-ffunction-sections -fdata-sections -MD -DSTM32F4
# ARFLAGS = rcsv
ARFLAGS = rcs
-OBJS = vector.o rcc.o gpio.o usart.o spi.o flash.o nvic.o \
- i2c.o systick.o exti.o scb.o pwr.o timer.o \
- usb.o usb_standard.o usb_control.o usb_f107.o \
- assert.o
+OBJS = rcc.o gpio.o usart.o spi.o flash.o \
+ i2c.o exti.o pwr.o timer.o \
+ usb.o usb_standard.o usb_control.o usb_f107.o
VPATH += ../../usb:../:../../cm3