diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-06-07 23:02:34 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-06-07 23:02:34 +0000 |
commit | 34f8aab8f0e19cc5bd0dae6bf7db3eb1d164836c (patch) | |
tree | 3f168e4ef907c5b7d53e465f31849941e24c2cf3 /nuttx/configs | |
parent | cb336ef5d2995014cb4f2ab74db2756621144c74 (diff) | |
download | px4-nuttx-34f8aab8f0e19cc5bd0dae6bf7db3eb1d164836c.tar.gz px4-nuttx-34f8aab8f0e19cc5bd0dae6bf7db3eb1d164836c.tar.bz2 px4-nuttx-34f8aab8f0e19cc5bd0dae6bf7db3eb1d164836c.zip |
More AVR build fixes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3680 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs')
-rw-r--r-- | nuttx/configs/amber/README.txt | 49 | ||||
-rw-r--r-- | nuttx/configs/micropendous3/README.txt | 50 | ||||
-rw-r--r-- | nuttx/configs/micropendous3/ostest/Make.defs | 7 | ||||
-rwxr-xr-x | nuttx/configs/micropendous3/src/Makefile | 21 | ||||
-rwxr-xr-x | nuttx/configs/micropendous3/src/up_boot.c | 4 |
5 files changed, 84 insertions, 47 deletions
diff --git a/nuttx/configs/amber/README.txt b/nuttx/configs/amber/README.txt index 8227c45eb..9de006872 100644 --- a/nuttx/configs/amber/README.txt +++ b/nuttx/configs/amber/README.txt @@ -120,6 +120,11 @@ NuttX buildroot Toolchain cd tools ./configure.sh amber/<sub-dir> + NOTE: you also must copy avr-libc header files into the NuttX include + directory with command perhaps like: + + cp -a /cygdrive/c/WinAVR/include/avr include/. + 2. Download the latest buildroot package into <some-dir> 3. unpack the buildroot tarball. The resulting directory may @@ -144,17 +149,33 @@ NuttX buildroot Toolchain avr-libc ^^^^^^^^ -Build Notes: +Header Files - In any case, avr-libc is required. http://www.nongnu.org/avr-libc/. - An snapshot of avr-lib is included in the WinAVR installation. For Linux + In any case, header files from avr-libc are required: http://www.nongnu.org/avr-libc/. + A snapshot of avr-lib is included in the WinAVR installation. For Linux development platforms, avr-libc package is readily available (and would be installed in the apt-get command shown above). But if you are using the NuttX buildroot configuration on Cygwin, then you will have to build - avr-libc from binaries. + get avr-libc from binaries. + +Header File Installation - Below are instructions for building avr-lib from fresh sources (I started - this before I realized at tha avr-lib is included in the WinAVR install): + The NuttX build will required that the AVR header files be available via + the NuttX include directory. This can be accomplished by either copying + the avr-libc header files into the NuttX include directory: + + cp -a <avr-libc-path>/include/avr <nuttx-path>/include/. + + Or simply using a symbolic link: + + ln -s <avr-libc-path>/include/avr <nuttx-path>/include/. + +Build Notes: + + It may not necessary to have a built version of avr-lib; only header files + are required. Bu if you choose to use the optimized libraru functions of + the flowing point library, then you may have to build avr-lib from sources. + Below are instructions for building avr-lib from fresh sources: 1. Download the avr-libc package from: @@ -167,7 +188,7 @@ Build Notes: tar jxf avr-lib-1.7.1.tar.bz2 cd avr-lib-1.7.1 - 3. Configure avr-lib. Assuming that WinAVR is installed at + 3. Configure avr-lib. Assuming that WinAVR is installed at the following export PATH=/cygdrive/c/WinAVR/bin:$PATH ./configure --build=`./config.guess` --host=avr @@ -185,16 +206,6 @@ Build Notes: make install -Include Path: - - After configuration, the Make.def file installed in the top-level NuttX - directory will need to be modified to include the path to the where ever - the include/avr directory was installed (no other avr-libc header files - are needed). For, for example, if WinAVR is installed at C:/WinAVR, the - AVR header files will be at C:/WinAVR/avr/include/avr - - AVRLIBC_INCPATH=${cygpath -u "C:/WinAVR/avr/include/avr"} - Amber Web Server Configuration Options ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -314,6 +325,10 @@ be selected as follow: cd - . ./setenv.sh +NOTE: You must also copy avr-libc header files, perhaps like: + + cp -a /cygdrive/c/WinAVR/include/avr include/. + Where <subdir> is one of the following: ostest: diff --git a/nuttx/configs/micropendous3/README.txt b/nuttx/configs/micropendous3/README.txt index 562cf1187..89041a90f 100644 --- a/nuttx/configs/micropendous3/README.txt +++ b/nuttx/configs/micropendous3/README.txt @@ -139,6 +139,11 @@ NuttX buildroot Toolchain cd tools ./configure.sh micropendous3/<sub-dir> + NOTE: you also must copy avr-libc header files into the NuttX include + directory with command perhaps like: + + cp -a /cygdrive/c/WinAVR/include/avr include/. + 2. Download the latest buildroot package into <some-dir> 3. unpack the buildroot tarball. The resulting directory may @@ -163,17 +168,33 @@ NuttX buildroot Toolchain avr-libc ^^^^^^^^ -Build Notes: +Header Files - In any case, avr-libc is required. http://www.nongnu.org/avr-libc/. - An snapshot of avr-lib is included in the WinAVR installation. For Linux + In any case, header files from avr-libc are required: http://www.nongnu.org/avr-libc/. + A snapshot of avr-lib is included in the WinAVR installation. For Linux development platforms, avr-libc package is readily available (and would be installed in the apt-get command shown above). But if you are using the NuttX buildroot configuration on Cygwin, then you will have to build - avr-libc from binaries. + get avr-libc from binaries. + +Header File Installation - Below are instructions for building avr-lib from fresh sources (I started - this before I realized at tha avr-lib is included in the WinAVR install): + The NuttX build will required that the AVR header files be available via + the NuttX include directory. This can be accomplished by either copying + the avr-libc header files into the NuttX include directory: + + cp -a <avr-libc-path>/include/avr <nuttx-path>/include/. + + Or simply using a symbolic link: + + ln -s <avr-libc-path>/include/avr <nuttx-path>/include/. + +Build Notes: + + It may not necessary to have a built version of avr-lib; only header files + are required. Bu if you choose to use the optimized libraru functions of + the flowing point library, then you may have to build avr-lib from sources. + Below are instructions for building avr-lib from fresh sources: 1. Download the avr-libc package from: @@ -186,7 +207,8 @@ Build Notes: tar jxf avr-lib-1.7.1.tar.bz2 cd avr-lib-1.7.1 - 3. Configure avr-lib. Assuming that WinAVR is installed at + 3. Configure avr-lib. Assuming that WinAVR is installed at the following + location: export PATH=/cygdrive/c/WinAVR/bin:$PATH ./configure --build=`./config.guess` --host=avr @@ -204,16 +226,6 @@ Build Notes: make install -Include Path: - - After configuration, the Make.def file installed in the top-level NuttX - directory will need to be modified to include the path to the where ever - the include/avr directory was installed (no other avr-libc header files - are needed). For, for example, if WinAVR is installed at C:/WinAVR, the - AVR header files will be at C:/WinAVR/avr/include/avr - - AVRLIBC_INCPATH=${cygpath -u "C:/WinAVR/avr/include/avr"} - Micropendous3 Configuration Options ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -338,6 +350,10 @@ be selected as follow: cd - . ./setenv.sh +NOTE: You must also copy avr-libc header files, perhaps like: + + cp -a /cygdrive/c/WinAVR/include/avr include/. + Where <subdir> is one of the following: ostest: diff --git a/nuttx/configs/micropendous3/ostest/Make.defs b/nuttx/configs/micropendous3/ostest/Make.defs index 198cfaaef..8a5a1b0e3 100644 --- a/nuttx/configs/micropendous3/ostest/Make.defs +++ b/nuttx/configs/micropendous3/ostest/Make.defs @@ -44,7 +44,6 @@ ifeq ($(CONFIG_AVR_WINAVR),y) MAXOPTIMIZATION = -O2 ARCHCPUFLAGS = -mmcu=at90usb647 LDFLAGS += -nostartfiles -nodefaultlibs - AVRLIBC_INCPATH=${cygpath -u "C:/WinAVR/avr/include/avr"} endif ifeq ($(CONFIG_AVR_LINUXGCC),y) @@ -53,7 +52,6 @@ ifeq ($(CONFIG_AVR_LINUXGCC),y) MAXOPTIMIZATION = -O2 ARCHCPUFLAGS = -mmcu=at90usb647 LDFLAGS += -nostartfiles -nodefaultlibs - AVRLIBC_INCPATH= #Where? endif ifeq ($(CONFIG_AVR_BUILDROOT),y) @@ -62,7 +60,6 @@ ifeq ($(CONFIG_AVR_BUILDROOT),y) MAXOPTIMIZATION = -O2 ARCHCPUFLAGS = -mmcu=at90usb647 LDFLAGS += -nostartfiles -nodefaultlibs - AVRLIBC_INCPATH= #Where? endif ifeq ($(WINTOOL),y) @@ -70,13 +67,13 @@ ifeq ($(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}" -I "${shell cygpath -w $(AVRLIBC_INCPATH)}" + ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = $(ARCHINCLUDES) -w $(TOPDIR)/include/cxx}" ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script}" else # Linux/Cygwin-native toolchain MKDEP = $(TOPDIR)/tools/mkdeps.sh - ARCHINCLUDES = -I. -isystem "$(TOPDIR)/include" -I "$(AVRLIBC_INCPATH)" + ARCHINCLUDES = -I. -isystem "$(TOPDIR)/include" ARCHXXINCLUDES = $(ARCHINCLUDES) -isystem "$(TOPDIR)/include/cxx" ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script endif diff --git a/nuttx/configs/micropendous3/src/Makefile b/nuttx/configs/micropendous3/src/Makefile index 005e4767f..b027183c4 100755 --- a/nuttx/configs/micropendous3/src/Makefile +++ b/nuttx/configs/micropendous3/src/Makefile @@ -35,8 +35,6 @@ -include $(TOPDIR)/Make.defs -CFLAGS += -I$(TOPDIR)/sched - ASRCS = CSRCS = up_boot.c @@ -51,12 +49,23 @@ SRCS = $(ASRCS) $(CSRCS) OBJS = $(AOBJS) $(COBJS) ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src +ifeq ($(CONFIG_ARCH_AVR32),y) +ARCH_SUBDIR = avr32 +endif +ifeq ($(CONFIG_ARCH_AVR),y) +ARCH_SUBDIR = avr +endif + ifeq ($(WINTOOL),y) - CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/chip}" \ - -I "${shell cygpath -w $(ARCH_SRCDIR)/common}" \ - -I "${shell cygpath -w $(ARCH_SRCDIR)/mips32}" + CFLAGS += -I "${shell cygpath -w $(TOPDIR)/sched}" + CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/chip}" + CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/common}" + CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/$(ARCH_SUBDIR)}" else - CFLAGS += -I$(ARCH_SRCDIR)/chip -I$(ARCH_SRCDIR)/common -I$(ARCH_SRCDIR)/mips32 + CFLAGS += -I "$(TOPDIR)/sched" + CFLAGS += -I "$(ARCH_SRCDIR)/chip" + CFLAGS += -I "$(ARCH_SRCDIR)/common" + CFLAGS += -I "$(ARCH_SRCDIR)/$(ARCH_SUBDIR)" endif all: libboard$(LIBEXT) diff --git a/nuttx/configs/micropendous3/src/up_boot.c b/nuttx/configs/micropendous3/src/up_boot.c index 67838097a..c6e261a45 100755 --- a/nuttx/configs/micropendous3/src/up_boot.c +++ b/nuttx/configs/micropendous3/src/up_boot.c @@ -47,8 +47,8 @@ #include "up_arch.h" #include "up_internal.h" -#include "at90usb-internal.h" -#include "micropendous3-internal.h" +#include "at90usb_internal.h" +#include "micropendous3_internal.h" /************************************************************************************ * Definitions |