From 569a15a70956fa17edab8c42653df4e916b222cc Mon Sep 17 00:00:00 2001 From: sallai Date: Wed, 10 Sep 2008 18:06:22 +0000 Subject: [PATCH] added AVR studio debug support --- support/make/avr/avr-studio-debug.extra | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 support/make/avr/avr-studio-debug.extra diff --git a/support/make/avr/avr-studio-debug.extra b/support/make/avr/avr-studio-debug.extra new file mode 100644 index 00000000..e5fd6d93 --- /dev/null +++ b/support/make/avr/avr-studio-debug.extra @@ -0,0 +1,23 @@ +#-*-Makefile-*- vim:syntax=make +#$Id$ + +BUILD_DEPS = srec tosimage bytes $(POST_BUILD_EXTRA_DEPS) buildelf +APPC_WINPATH = $(BUILDDIR)/app-winpath.c +MAIN_ELF = $(BUILDDIR)/main.elf + +# no inlining or optimizations +OPTFLAGS += -O0 -fnesc-no-inline + +# produce dwarf-2 debug information for AVR Studio +OPTFLAGS += -gdwarf-2 + +# we use ncc to invoke gcc thus need to allow dollars in identifiers +#OPTFLAGS += -fdollars-in-identifiers + +# alternatively, we can use a different separator +PFLAGS += -fnesc-separator=__ + +buildelf: FORCE + @echo " building ELF output $(MAIN_ELF) for debugging in AVR Studio" + @perl -pe 's/#(.*)\"(.*)\"/ "#$$1\"".`cygpath -m $$2`."\""/e; s/\n\"/\"/;' $(BUILDDIR)/app.c > $(APPC_WINPATH) + @$(NCC) -o $(MAIN_ELF) $(NCC_SAFE_TINYOS_FLAGS) $(OPTFLAGS) $(PFLAGS) $(CFLAGS) $(APPC_WINPATH) $(LIBS) $(LDFLAGS) -- 2.39.2