diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-06-11 14:47:03 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-06-11 14:47:03 +0000 |
commit | 94a04f9e5a37e615bc7f8809a055ed98ea36a19b (patch) | |
tree | 78aebf6ed7c5d6f6b9b81f7f81d33b71810593e1 /nuttx/configs/olimex-strp711/ostest | |
parent | 3ad84ca396bbfad20398f519d4493111c2bf63a6 (diff) | |
download | px4-nuttx-94a04f9e5a37e615bc7f8809a055ed98ea36a19b.tar.gz px4-nuttx-94a04f9e5a37e615bc7f8809a055ed98ea36a19b.tar.bz2 px4-nuttx-94a04f9e5a37e615bc7f8809a055ed98ea36a19b.zip |
Add support for Windows GCC to lpc2148 and str711
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1875 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs/olimex-strp711/ostest')
-rw-r--r-- | nuttx/configs/olimex-strp711/ostest/Make.defs | 53 | ||||
-rw-r--r-- | nuttx/configs/olimex-strp711/ostest/ld.script | 31 |
2 files changed, 64 insertions, 20 deletions
diff --git a/nuttx/configs/olimex-strp711/ostest/Make.defs b/nuttx/configs/olimex-strp711/ostest/Make.defs index f33c444fe..56a973b57 100644 --- a/nuttx/configs/olimex-strp711/ostest/Make.defs +++ b/nuttx/configs/olimex-strp711/ostest/Make.defs @@ -35,8 +35,15 @@ include ${TOPDIR}/.config +# The default value for CROSSDEV can be overridden from the make command line: +# make -- Will build for the NuttX buildroot toolchain +# make CROSSDEV=arm-eabi- -- Will build for the devkitARM toolchain +# make CROSSDEV=arm-none-eabi- -- Will build for the CodeSourcery toolchain +# make CROSSDEV=arm-elf- -- Will build for the NuttX buildroot toolchain + CROSSDEV = arm-elf- CC = $(CROSSDEV)gcc +CXX = $(CROSSDEV)g++ CPP = $(CROSSDEV)gcc -E LD = $(CROSSDEV)ld AR = $(CROSSDEV)ar rcs @@ -58,23 +65,41 @@ endif ifeq ("${CONFIG_DEBUG}","y") ARCHOPTIMIZATION = -g else - ARCHOPTIMIZATION = -Os -fno-strict-aliasing -fno-strength-reduce \ - -fomit-frame-pointer + ARCHOPTIMIZATION = -Os -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer endif ifeq ($(ARCHCCMAJOR),4) - ARCHCPUFLAGS = -mcpu=arm7tdmi -mfloat-abi=soft -fno-builtin + ARCHCPUFLAGS = -mcpu=arm7tdmi -mfloat-abi=soft else - ARCHCPUFLAGS = -mapcs-32 -mcpu=arm7tdmi -msoft-float -fno-builtin + ARCHCPUFLAGS = -mapcs-32 -mcpu=arm7tdmi -msoft-float endif + +ifeq ($(CROSSDEV),arm-elf-) + MKDEP = $(TOPDIR)/tools/mkdeps.sh + ARCHINCLUDES = -I. -isystem $(TOPDIR)/include + ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script +else + WINTOOL = y + DIRLINK = $(TOPDIR)/tools/winlink.sh + DIRUNLINK = $(TOPDIR)/tools/unlink.sh + MKDEP = $(TOPDIR)/tools/mknulldeps.sh + ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" + ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script}" +endif + +ARCHCFLAGS = -fno-builtin +ARCHCXXFLAGS = -fno-builtin -fno-exceptions ARCHPICFLAGS = -fpic ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow +ARCHWARNINGSXX = -Wall -Wshadow ARCHDEFINES = -ARCHINCLUDES = -I. -isystem $(TOPDIR)/include -ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script -CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \ +CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \ $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) -pipe +CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) \ + $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) -pipe CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) AFLAGS = $(CFLAGS) -D__ASSEMBLY__ @@ -82,7 +107,10 @@ OBJEXT = .o LIBEXT = .a EXEEXT = -ifeq ("${CONFIG_DEBUG}","y") +ifneq ($(CROSSDEV),arm-elf-) + LDFLAGS += -nostartfiles -nodefaultlibs +endif +ifeq ($(CONFIG_DEBUG),y) LDFLAGS += -g endif @@ -96,6 +124,11 @@ define COMPILE @$(CC) -c $(CFLAGS) $1 -o $2 endef +define COMPILEXX + @echo "CXX: $1" + @$(CXX) -c $(CXXFLAGS) $1 -o $2 +endef + define ASSEMBLE @echo "AS: $1" @$(CC) -c $(AFLAGS) $1 -o $2 @@ -110,10 +143,8 @@ define CLEAN @rm -f *.o *.a endef -MKDEP = $(TOPDIR)/tools/mkdeps.sh - HOSTCC = gcc HOSTINCLUDES = -I. -HOSTCFLAGS = -Wall -wstrict-prototypes -Wshadow -g -pipe +HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe HOSTLDFLAGS = diff --git a/nuttx/configs/olimex-strp711/ostest/ld.script b/nuttx/configs/olimex-strp711/ostest/ld.script index 053b9938d..d19e51e82 100644 --- a/nuttx/configs/olimex-strp711/ostest/ld.script +++ b/nuttx/configs/olimex-strp711/ostest/ld.script @@ -1,7 +1,7 @@ /**************************************************************************** * configs/olimex-strp711/ostest/ld.script * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -60,14 +60,16 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - *(.text) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata) - *(.rodata.str1.*) + *(.rodata .rodata.*) + *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) - *(.got) /* Global offset table */ + *(.got) + *(.gcc_except_table) + *(.gnu.linkonce.r.*) _etext = ABSOLUTE(.); } > flash @@ -80,18 +82,29 @@ SECTIONS .data : { _sdata = ABSOLUTE(.); - *(.data) + *(.data .data.*) + *(.gnu.linkonce.d.*) CONSTRUCTORS _edata = ABSOLUTE(.); } > sram AT > flash - .bss : { /* BSS */ + .ARM.extab : { + *(.ARM.extab*) + } >sram + + .ARM.exidx : { + *(.ARM.exidx*) + } >sram + + .bss : { _sbss = ABSOLUTE(.); - *(.bss) + *(.bss .bss.*) + *(.gnu.linkonce.b.*) *(COMMON) _ebss = ABSOLUTE(.); } > sram - /* Stabs debugging sections. */ + + /* Stabs debugging sections. */ .stab 0 : { *(.stab) } .stabstr 0 : { *(.stabstr) } .stab.excl 0 : { *(.stab.excl) } |