aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple/rules.mk
diff options
context:
space:
mode:
authorPerry Hung <iperry@gmail.com>2010-09-17 03:49:14 -0400
committerPerry Hung <iperry@gmail.com>2010-09-17 03:49:14 -0400
commit2e79aafb7081a5305ee875277d26734779ca6d2f (patch)
tree9ae02b8733ecd75f9e783a81cd7d46fa7e505b9a /libmaple/rules.mk
parentbdb85a454917a6e875c77ae12f9fd67961aebfae (diff)
downloadlibrambutan-2e79aafb7081a5305ee875277d26734779ca6d2f.tar.gz
librambutan-2e79aafb7081a5305ee875277d26734779ca6d2f.zip
Enable USB auto-reset in a hard fault.
Redirect thread-mode execution to a fail routine which throbs the LED to indicate a hard fault. Because the fail routine runs in thread mode with interrupts on, USB auto-reset should now work. Test by executing some bogus instruction (e.g. *(volatile int*)0xf34fdaa = 0;) and check that the auto-reset continues to work.
Diffstat (limited to 'libmaple/rules.mk')
-rw-r--r--libmaple/rules.mk11
1 files changed, 7 insertions, 4 deletions
diff --git a/libmaple/rules.mk b/libmaple/rules.mk
index 8428277..cd50495 100644
--- a/libmaple/rules.mk
+++ b/libmaple/rules.mk
@@ -16,7 +16,6 @@ cSRCS_$(d) := systick.c \
timers.c \
adc.c \
syscalls.c \
- exc.c \
exti.c \
gpio.c \
nvic.c \
@@ -25,8 +24,8 @@ cSRCS_$(d) := systick.c \
rcc.c \
flash.c \
spi.c \
- fsmc.c \
- dac.c \
+ fsmc.c \
+ dac.c \
usb/usb.c \
usb/usb_callbacks.c \
usb/usb_hardware.c \
@@ -37,12 +36,16 @@ cSRCS_$(d) := systick.c \
usb/usb_lib/usb_mem.c \
usb/usb_lib/usb_regs.c
+sSRCS_$(d) := exc.S
+
cFILES_$(d) := $(cSRCS_$(d):%=$(d)/%)
+sFILES_$(d) := $(sSRCS_$(d):%=$(d)/%)
-OBJS_$(d) := $(cFILES_$(d):%.c=$(BUILD_PATH)/%.o)
+OBJS_$(d) := $(cFILES_$(d):%.c=$(BUILD_PATH)/%.o) $(sFILES_$(d):%.S=$(BUILD_PATH)/%.o)
DEPS_$(d) := $(OBJS_$(d):%.o=%.d)
$(OBJS_$(d)): TGT_CFLAGS := $(CFLAGS_$(d))
+$(OBJS_$(d)): TGT_ASFLAGS :=
TGT_BIN += $(OBJS_$(d))