aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
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 /Makefile
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 'Makefile')
-rw-r--r--Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index bc34f9e..4fd5ade 100644
--- a/Makefile
+++ b/Makefile
@@ -29,11 +29,12 @@ LIBMAPLE_PATH := $(SRCROOT)/libmaple
SUPPORT_PATH := $(SRCROOT)/support
# Useful variables
-GLOBAL_CFLAGS := -Os -g -mcpu=cortex-m3 -mthumb -march=armv7-m -nostdlib \
- -ffunction-sections -fdata-sections -Wl,--gc-sections \
- -DBOARD_$(BOARD) -DMCU_$(MCU)
+GLOBAL_CFLAGS := -Os -g -mcpu=cortex-m3 -mthumb -march=armv7-m -nostdlib \
+ -ffunction-sections -fdata-sections -Wl,--gc-sections \
+ -DBOARD_$(BOARD) -DMCU_$(MCU)
GLOBAL_CXXFLAGS := -fno-rtti -fno-exceptions -Wall -DBOARD_$(BOARD) -DMCU_$(MCU)
-
+GLOBAL_ASFLAGS := -mcpu=cortex-m3 -march=armv7-m -mthumb -DBOARD_$(BOARD) \
+ -DMCU_$(MCU) -x assembler-with-cpp
LDDIR := $(SUPPORT_PATH)/ld
LDFLAGS = -T$(LDDIR)/$(LDSCRIPT) -L$(LDDIR) \