Fixes for build CodeSourcery toolchain
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1868 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
890f761228
commit
64497e92d2
11 changed files with 122 additions and 42 deletions
|
@ -767,5 +767,6 @@
|
||||||
specific directories.
|
specific directories.
|
||||||
* config/olimex-strp711/src/up_nsh.c: Add an NSH board specific directory for
|
* config/olimex-strp711/src/up_nsh.c: Add an NSH board specific directory for
|
||||||
for the Olimex STR7P11 board.
|
for the Olimex STR7P11 board.
|
||||||
|
* Fixed build of LM3X6918 using the CodeSourcery Windows native toolchain. There
|
||||||
|
were lots of issues with Cygwin paths and Cygwin symbolic links. These changes
|
||||||
|
may work with the devarmKIT as well, but that remains untested.
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<tr align="center" bgcolor="#e4e4e4">
|
<tr align="center" bgcolor="#e4e4e4">
|
||||||
<td>
|
<td>
|
||||||
<h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1>
|
<h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1>
|
||||||
<p>Last Updated: June 08, 2009</p>
|
<p>Last Updated: June 09, 2009</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -1437,6 +1437,9 @@ nuttx-0.4.8 2009-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
specific directories.
|
specific directories.
|
||||||
* config/olimex-strp711/src/up_nsh.c: Add an NSH board specific directory for
|
* config/olimex-strp711/src/up_nsh.c: Add an NSH board specific directory for
|
||||||
for the Olimex STR7P11 board.
|
for the Olimex STR7P11 board.
|
||||||
|
* Fixed build of LM3X6918 using the CodeSourcery Windows native toolchain. There
|
||||||
|
were lots of issues with Cygwin paths and Cygwin symbolic links. These changes
|
||||||
|
may work with the devarmKIT as well, but that remains untested.
|
||||||
|
|
||||||
pascal-0.1.3 2009-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
pascal-0.1.3 2009-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
|
|
||||||
|
|
14
Makefile
14
Makefile
|
@ -44,6 +44,14 @@ DIRLINK = $(TOPDIR)/tools/link.sh
|
||||||
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
|
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# This is the final executable
|
||||||
|
|
||||||
|
ifeq ($(WINTOOL),y)
|
||||||
|
NUTTX = "${shell cygpath -w $(TOPDIR)/nuttx}"
|
||||||
|
else
|
||||||
|
NUTTX = $(TOPDIR)/nuttx
|
||||||
|
endif
|
||||||
|
|
||||||
# Process architecture and board-specific directories
|
# Process architecture and board-specific directories
|
||||||
|
|
||||||
ARCH_DIR = arch/$(CONFIG_ARCH)
|
ARCH_DIR = arch/$(CONFIG_ARCH)
|
||||||
|
@ -245,13 +253,13 @@ ifeq ($(CONFIG_RRLOAD_BINARY),y)
|
||||||
fi
|
fi
|
||||||
endif
|
endif
|
||||||
ifeq ($(CONFIG_INTELHEX_BINARY),y)
|
ifeq ($(CONFIG_INTELHEX_BINARY),y)
|
||||||
@$(OBJCOPY) $(OBJCOPYARGS) -O ihex $(TOPDIR)/$@ $(TOPDIR)/$@.ihx
|
@$(OBJCOPY) $(OBJCOPYARGS) -O ihex $(NUTTX)$(EXEEXT) $(NUTTX)$(EXEEXT).ihx
|
||||||
endif
|
endif
|
||||||
ifeq ($(CONFIG_MOTOROLA_SREC),y)
|
ifeq ($(CONFIG_MOTOROLA_SREC),y)
|
||||||
@$(OBJCOPY) $(OBJCOPYARGS) -O srec $(TOPDIR)/$@ $(TOPDIR)/$@.srec
|
@$(OBJCOPY) $(OBJCOPYARGS) -O srec $(NUTTX)$(EXEEXT) $(NUTTX)$(EXEEXT).srec
|
||||||
endif
|
endif
|
||||||
ifeq ($(CONFIG_RAW_BINARY),y)
|
ifeq ($(CONFIG_RAW_BINARY),y)
|
||||||
@$(OBJCOPY) $(OBJCOPYARGS) -O binary $(TOPDIR)/$@ $(TOPDIR)/$@.bin
|
@$(OBJCOPY) $(OBJCOPYARGS) -O binary $(NUTTX)$(EXEEXT) $(NUTTX)$(EXEEXT).bin
|
||||||
endif
|
endif
|
||||||
|
|
||||||
depend:
|
depend:
|
||||||
|
|
8
TODO
8
TODO
|
@ -24,7 +24,7 @@ NuttX TODO List (Last updated April 12, 2009)
|
||||||
(2) ARM/i.MX (arch/arm/src/imx/)
|
(2) ARM/i.MX (arch/arm/src/imx/)
|
||||||
(8) ARM/LPC214x (arch/arm/src/lpc214x/)
|
(8) ARM/LPC214x (arch/arm/src/lpc214x/)
|
||||||
(3) ARM/STR71x (arch/arm/src/str71x/)
|
(3) ARM/STR71x (arch/arm/src/str71x/)
|
||||||
(1) ARM/LM3S6918 (arch/arm/src/lm3s/)
|
(3) ARM/LM3S6918 (arch/arm/src/lm3s/)
|
||||||
(4) pjrc-8052 / MCS51 (arch/pjrc-8051/)
|
(4) pjrc-8052 / MCS51 (arch/pjrc-8051/)
|
||||||
(2) Hitachi/Renesas SH-1 (arch/sh/src/sh1)
|
(2) Hitachi/Renesas SH-1 (arch/sh/src/sh1)
|
||||||
(4) Renesas M16C/26 (arch/sh/src/m16c)
|
(4) Renesas M16C/26 (arch/sh/src/m16c)
|
||||||
|
@ -548,6 +548,12 @@ o ARM/LM3S6918 (arch/arm/src/lm3s/)
|
||||||
Priority: Medium, If the transfer is properly tuned, then there should not
|
Priority: Medium, If the transfer is properly tuned, then there should not
|
||||||
be any Rx FIFO overruns.
|
be any Rx FIFO overruns.
|
||||||
|
|
||||||
|
Description: Dependency generation is currently disabled when a Windows native
|
||||||
|
toolchain is used. I think that the only issue is that all of the
|
||||||
|
Windows dependencies needed to be quoted in the Make.dep files.
|
||||||
|
Status: Open
|
||||||
|
Priority: Low -- unless some dependency-related build issues is discovered.
|
||||||
|
|
||||||
o pjrc-8052 / MCS51 (arch/pjrc-8051/)
|
o pjrc-8052 / MCS51 (arch/pjrc-8051/)
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|
|
@ -43,8 +43,17 @@ else
|
||||||
ARCH_SUBDIR = arm
|
ARCH_SUBDIR = arm
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CFLAGS += -I$(ARCH_SRCDIR)/chip -I$(ARCH_SRCDIR)/common \
|
ifeq ($(WINTOOL),y)
|
||||||
|
NUTTX = "${shell cygpath -w $(TOPDIR)/nuttx}"
|
||||||
|
CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/chip}" \
|
||||||
|
-I "${shell cygpath -w $(ARCH_SRCDIR)/common}" \
|
||||||
|
-I "${shell cygpath -w $(ARCH_SRCDIR)/$(ARCH_SUBDIR)}" \
|
||||||
|
-I "${shell cygpath -w $(TOPDIR)/sched}"
|
||||||
|
else
|
||||||
|
NUTTX = $(TOPDIR)/nuttx
|
||||||
|
CFLAGS += -I$(ARCH_SRCDIR)/chip -I$(ARCH_SRCDIR)/common \
|
||||||
-I$(ARCH_SRCDIR)/$(ARCH_SUBDIR) -I$(TOPDIR)/sched
|
-I$(ARCH_SRCDIR)/$(ARCH_SUBDIR) -I$(TOPDIR)/sched
|
||||||
|
endif
|
||||||
|
|
||||||
HEAD_AOBJ = $(HEAD_ASRC:.S=$(OBJEXT))
|
HEAD_AOBJ = $(HEAD_ASRC:.S=$(OBJEXT))
|
||||||
|
|
||||||
|
@ -61,7 +70,13 @@ LDFLAGS = $(ARCHSCRIPT)
|
||||||
EXTRA_LIBS =
|
EXTRA_LIBS =
|
||||||
|
|
||||||
LINKLIBS =
|
LINKLIBS =
|
||||||
LDPATHES = $(addprefix -L$(TOPDIR)/,$(dir $(LINKLIBS)))
|
ifeq ($(WINTOOL),y)
|
||||||
|
LIBPATHS = ${shell for path in $(LINKLIBS); do dir=`dirname $(TOPDIR)/$$path`;echo "-L\"`cygpath -w $$dir`\"";done}
|
||||||
|
LIBPATHS += -L"${shell cygpath -w $(BOARDDIR)}"
|
||||||
|
else
|
||||||
|
LIBPATHS = $(addprefix -L$(TOPDIR)/,$(dir $(LINKLIBS)))
|
||||||
|
LIBPATHS += -L"$(BOARDDIR)"
|
||||||
|
endif
|
||||||
LDLIBS = $(patsubst lib%,-l%,$(basename $(notdir $(LINKLIBS))))
|
LDLIBS = $(patsubst lib%,-l%,$(basename $(notdir $(LINKLIBS))))
|
||||||
|
|
||||||
BOARDDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src/board
|
BOARDDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src/board
|
||||||
|
@ -88,20 +103,20 @@ board/libboard$(LIBEXT):
|
||||||
|
|
||||||
nuttx: $(HEAD_AOBJ) board/libboard$(LIBEXT)
|
nuttx: $(HEAD_AOBJ) board/libboard$(LIBEXT)
|
||||||
@echo "LD: nuttx"
|
@echo "LD: nuttx"
|
||||||
@$(LD) --entry=__start $(LDFLAGS) $(LDPATHES) -L$(BOARDDIR) -o $(TOPDIR)/$@ $(HEAD_AOBJ) \
|
@$(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) -o $(NUTTX)$(EXEEXT) $(HEAD_AOBJ) \
|
||||||
--start-group $(LDLIBS) -lboard --end-group $(EXTRA_LIBS) $(LIBGCC)
|
--start-group $(LDLIBS) -lboard --end-group $(EXTRA_LIBS) $(LIBGCC)
|
||||||
ifeq ($(CONFIG_BOOT_RUNFROMFLASH),y)
|
ifeq ($(CONFIG_BOOT_RUNFROMFLASH),y)
|
||||||
@export flashloc=`$(OBJDUMP) --all-headers $(TOPDIR)/$@ | grep _eronly | cut -d' ' -f1`; \
|
@export flashloc=`$(OBJDUMP) --all-headers $(NUTTX)$(EXEEXT) | grep _eronly | cut -d' ' -f1`; \
|
||||||
$(OBJCOPY) $(OBJCOPYARGS) --adjust-section-vma=.data=0x$$flashloc $(TOPDIR)/$@ $(TOPDIR)/$@.flashimage
|
$(OBJCOPY) $(OBJCOPYARGS) --adjust-section-vma=.data=0x$$flashloc $(NUTTX)$(EXEEXT) $(NUTTX).flashimage
|
||||||
@mv $(TOPDIR)/$@.flashimage $(TOPDIR)/$@
|
@mv $(NUTTX).flashimage $(NUTTX)$(EXEEXT)
|
||||||
endif
|
endif
|
||||||
@$(NM) $(TOPDIR)/$@ | \
|
@$(NM) $(NUTTX)$(EXEEXT) | \
|
||||||
grep -v '\(compiled\)\|\(\$(OBJEXT)$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
|
grep -v '\(compiled\)\|\(\$(OBJEXT)$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
|
||||||
sort > $(TOPDIR)/System.map
|
sort > $(TOPDIR)/System.map
|
||||||
@export vflashstart=`$(OBJDUMP) --all-headers $(TOPDIR)/$@ | grep _vflashstart | cut -d' ' -f1`; \
|
@export vflashstart=`$(OBJDUMP) --all-headers $(NUTTX)$(EXEEXT) | grep _vflashstart | cut -d' ' -f1`; \
|
||||||
if [ ! -z "$$vflashstart" ]; then \
|
if [ ! -z "$$vflashstart" ]; then \
|
||||||
$(OBJCOPY) $(OBJCOPYARGS) --adjust-section-vma=.vector=0x$$vflashstart $(TOPDIR)/$@ $(TOPDIR)/$@.flashimage; \
|
$(OBJCOPY) $(OBJCOPYARGS) --adjust-section-vma=.vector=0x$$vflashstart $(NUTTX)$(EXEEXT) $(NUTTX).flashimage; \
|
||||||
mv $(TOPDIR)/$@.flashimage $(TOPDIR)/$@; \
|
mv $(NUTTX).flashimage $(NUTTX)$(EXEEXT); \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
.depend: Makefile chip/Make.defs $(SRCS)
|
.depend: Makefile chip/Make.defs $(SRCS)
|
||||||
|
|
|
@ -38,6 +38,27 @@ GNU Toolchain Options
|
||||||
Of course, hard coding this CROSS_COMPILE value in Make.defs file will save
|
Of course, hard coding this CROSS_COMPILE value in Make.defs file will save
|
||||||
some repetitive typing.
|
some repetitive typing.
|
||||||
|
|
||||||
|
NOTE: the CodeSourcery and devkitARM toolchains are Windows native toolchains.
|
||||||
|
The NuttX buildroot toolchain is a Cygwin toolchain. There are several limitations
|
||||||
|
to using a Windows based toolchain in a Cygwin environment. The two biggestg are:
|
||||||
|
|
||||||
|
1. The Windows toolchain cannot follow Cygwin paths. Path conversions are
|
||||||
|
performed automatically in the Cygwin makefiles using the 'cygpath' utility
|
||||||
|
but you might easily find some new path problems. If so, check out 'cygpath -w'
|
||||||
|
|
||||||
|
2. Windows toolchains cannot follow Cygwin symbolic links. Many symbolic links
|
||||||
|
are used in Nuttx (e.g., include/arch). The make system works around these
|
||||||
|
problems for the Windows tools by copying directories instead of linking them.
|
||||||
|
But this can also cause some confusion for you: For example, you may edit
|
||||||
|
a file in a "linked" directory and find that your changes had not effect.
|
||||||
|
That is because you are building the copy of the file in the "fake" symbolic
|
||||||
|
directory. If you use a Windows toolchain, you should get in the habit of
|
||||||
|
making like this:
|
||||||
|
|
||||||
|
make clean_context; make CROSSDEV=arm-none-eabi-
|
||||||
|
|
||||||
|
An alias in your .bashrc file might make that less painful.
|
||||||
|
|
||||||
NuttX buildroot Toolchain
|
NuttX buildroot Toolchain
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|
|
@ -66,17 +66,24 @@ else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CROSSDEV),arm-elf-)
|
ifeq ($(CROSSDEV),arm-elf-)
|
||||||
|
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||||
ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft
|
ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft
|
||||||
|
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
||||||
|
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||||
|
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/httpd/ld.script
|
||||||
else
|
else
|
||||||
|
WINTOOL = y
|
||||||
|
DIRLINK = $(TOPDIR)/tools/winlink.sh
|
||||||
|
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
|
||||||
|
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
||||||
ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
|
ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
|
||||||
|
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)/httpd/ld.script}"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ARCHDEFINES =
|
ARCHDEFINES =
|
||||||
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
|
||||||
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
|
||||||
|
|
||||||
ARCHPICFLAGS = -fpic
|
ARCHPICFLAGS = -fpic
|
||||||
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/httpd/ld.script
|
|
||||||
|
|
||||||
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
|
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
|
||||||
$(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) -pipe
|
$(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) -pipe
|
||||||
|
@ -125,8 +132,6 @@ define CLEAN
|
||||||
@rm -f *.o *.a
|
@rm -f *.o *.a
|
||||||
endef
|
endef
|
||||||
|
|
||||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
|
||||||
|
|
||||||
HOSTCC = gcc
|
HOSTCC = gcc
|
||||||
HOSTINCLUDES = -I.
|
HOSTINCLUDES = -I.
|
||||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
||||||
|
|
|
@ -66,17 +66,24 @@ else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CROSSDEV),arm-elf-)
|
ifeq ($(CROSSDEV),arm-elf-)
|
||||||
|
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||||
ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft
|
ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft
|
||||||
|
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
||||||
|
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||||
|
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nettest/ld.script
|
||||||
else
|
else
|
||||||
|
WINTOOL = y
|
||||||
|
DIRLINK = $(TOPDIR)/tools/winlink.sh
|
||||||
|
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
|
||||||
|
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
||||||
ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
|
ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
|
||||||
|
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)/nettest/ld.script}"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ARCHDEFINES =
|
ARCHDEFINES =
|
||||||
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
|
||||||
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
|
||||||
|
|
||||||
ARCHPICFLAGS = -fpic
|
ARCHPICFLAGS = -fpic
|
||||||
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nettest/ld.script
|
|
||||||
|
|
||||||
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
|
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
|
||||||
$(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) -pipe
|
$(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) -pipe
|
||||||
|
@ -125,8 +132,6 @@ define CLEAN
|
||||||
@rm -f *.o *.a
|
@rm -f *.o *.a
|
||||||
endef
|
endef
|
||||||
|
|
||||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
|
||||||
|
|
||||||
HOSTCC = gcc
|
HOSTCC = gcc
|
||||||
HOSTINCLUDES = -I.
|
HOSTINCLUDES = -I.
|
||||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
||||||
|
|
|
@ -66,17 +66,24 @@ else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CROSSDEV),arm-elf-)
|
ifeq ($(CROSSDEV),arm-elf-)
|
||||||
|
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||||
ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft
|
ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft
|
||||||
|
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
||||||
|
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||||
|
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nsh/ld.script
|
||||||
else
|
else
|
||||||
|
WINTOOL = y
|
||||||
|
DIRLINK = $(TOPDIR)/tools/winlink.sh
|
||||||
|
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
|
||||||
|
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
||||||
ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
|
ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
|
||||||
|
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)/nsh/ld.script}"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ARCHDEFINES =
|
ARCHDEFINES =
|
||||||
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
|
||||||
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
|
||||||
|
|
||||||
ARCHPICFLAGS = -fpic
|
ARCHPICFLAGS = -fpic
|
||||||
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nsh/ld.script
|
|
||||||
|
|
||||||
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
|
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
|
||||||
$(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) -pipe
|
$(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) -pipe
|
||||||
|
@ -125,8 +132,6 @@ define CLEAN
|
||||||
@rm -f *.o *.a
|
@rm -f *.o *.a
|
||||||
endef
|
endef
|
||||||
|
|
||||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
|
||||||
|
|
||||||
HOSTCC = gcc
|
HOSTCC = gcc
|
||||||
HOSTINCLUDES = -I.
|
HOSTINCLUDES = -I.
|
||||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
||||||
|
|
|
@ -66,17 +66,24 @@ else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CROSSDEV),arm-elf-)
|
ifeq ($(CROSSDEV),arm-elf-)
|
||||||
|
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||||
ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft
|
ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft
|
||||||
|
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
|
else
|
||||||
|
WINTOOL = y
|
||||||
|
DIRLINK = $(TOPDIR)/tools/winlink.sh
|
||||||
|
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
|
||||||
|
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
||||||
ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
|
ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
|
||||||
|
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
|
endif
|
||||||
|
|
||||||
ARCHDEFINES =
|
ARCHDEFINES =
|
||||||
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
|
||||||
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
|
||||||
|
|
||||||
ARCHPICFLAGS = -fpic
|
ARCHPICFLAGS = -fpic
|
||||||
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script
|
|
||||||
|
|
||||||
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
|
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
|
||||||
$(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) -pipe
|
$(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) -pipe
|
||||||
|
@ -125,8 +132,6 @@ define CLEAN
|
||||||
@rm -f *.o *.a
|
@rm -f *.o *.a
|
||||||
endef
|
endef
|
||||||
|
|
||||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
|
||||||
|
|
||||||
HOSTCC = gcc
|
HOSTCC = gcc
|
||||||
HOSTINCLUDES = -I.
|
HOSTINCLUDES = -I.
|
||||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
||||||
|
|
|
@ -49,7 +49,13 @@ SRCS = $(ASRCS) $(CSRCS)
|
||||||
OBJS = $(AOBJS) $(COBJS)
|
OBJS = $(AOBJS) $(COBJS)
|
||||||
|
|
||||||
ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src
|
ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src
|
||||||
CFLAGS += -I$(ARCH_SRCDIR)/chip -I$(ARCH_SRCDIR)/common -I$(ARCH_SRCDIR)/cortexm3
|
ifeq ($(WINTOOL),y)
|
||||||
|
CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/chip}" \
|
||||||
|
-I "${shell cygpath -w $(ARCH_SRCDIR)/common}" \
|
||||||
|
-I "${shell cygpath -w $(ARCH_SRCDIR)/cortexm3}"
|
||||||
|
else
|
||||||
|
CFLAGS += -I$(ARCH_SRCDIR)/chip -I$(ARCH_SRCDIR)/common -I$(ARCH_SRCDIR)/cortexm3
|
||||||
|
endif
|
||||||
|
|
||||||
all: libboard$(LIBEXT)
|
all: libboard$(LIBEXT)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue