[mc1322x] Building mc1322x contiki
Jon Smirl
jonsmirl at gmail.com
Tue Oct 6 12:58:11 EDT 2009
I'm trying to build the mc1322x contiki examples using
gcc-4.3.2-glibc-2.8-binutils-2.18 from the Phytec cross tools.
My binary is ending up 550K. It is sucking in 500K of run-time
library. Are my cross tools built wrong? Should they be built with
exception handling turned off?
I had to add the exidx section...
diff --git a/cpu/mc1322x/Makefile.mc1322x b/cpu/mc1322x/Makefile.mc1322x
index 1014ca2..189cd6b 100644
--- a/cpu/mc1322x/Makefile.mc1322x
+++ b/cpu/mc1322x/Makefile.mc1322x
@@ -18,7 +18,7 @@ CONTIKI_SOURCEFILES += $(CONTIKI_TARGET_SOURCEFILES)
THREADS =
-CROSS=arm-linux-
+CROSS=arm-v4t-linux-gnueabi-
### Compiler definitions
CC = $(CROSS)gcc
@@ -50,7 +50,7 @@ CFLAGSNO = -I. -I$(CONTIKI)/core -I$(CONTIKI_CPU)
-I$(CONTIKI_CPU)/loader \
-Werror $(ARCH_FLAGS) -g
CFLAGS += $(CFLAGSNO) -Os -DRUN_AS_SYSTEM -DROM_RUN
-fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -DTE
-LDFLAGS += -T $(LINKERSCRIPT) -nostartfiles -static
+LDFLAGS += -T $(LINKERSCRIPT) -nostartfiles -static
-Wl,-Map=contiki-$(TARGET).map,-export-dynamic
AFLAGS := $(AFLAGS_DEBUG) -D__ASSEMBLY__ $(CPPFLAGS) -gstabs
CDEPFLAGS = $(CFLAGS) -D __MAKING_DEPS__
diff --git a/cpu/mc1322x/mc1322x.lds b/cpu/mc1322x/mc1322x.lds
index 061604a..e19ef15 100644
--- a/cpu/mc1322x/mc1322x.lds
+++ b/cpu/mc1322x/mc1322x.lds
@@ -259,4 +259,11 @@ HEAP_SIZE = 1024;
.gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) }
+
+ ROM 0 (NOLOAD) :
+ {
+ __exidx_start = .;
+ *(.ARM.exidx* .gnu.linkonce.armexidx.*)
+ __exidx_end = .;
+ }
}
--
Jon Smirl
jonsmirl at gmail.com
More information about the mc1322x
mailing list