More AVR build fixes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3680 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
aeabb08460
commit
caeac3742f
@ -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.
|
||||
|
||||
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):
|
||||
Header File Installation
|
||||
|
||||
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:
|
||||
|
@ -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.
|
||||
|
||||
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):
|
||||
Header File Installation
|
||||
|
||||
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:
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user