summaryrefslogtreecommitdiff
path: root/nuttx/configs/micropendous3/ostest
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-06-07 21:09:02 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-06-07 21:09:02 +0000
commitcb336ef5d2995014cb4f2ab74db2756621144c74 (patch)
tree43e029390e6afe43ed323c3ba799f02c10d4b6c0 /nuttx/configs/micropendous3/ostest
parentb5b4376dbc56930769ffaba4aadd987629e34c19 (diff)
downloadpx4-nuttx-cb336ef5d2995014cb4f2ab74db2756621144c74.tar.gz
px4-nuttx-cb336ef5d2995014cb4f2ab74db2756621144c74.tar.bz2
px4-nuttx-cb336ef5d2995014cb4f2ab74db2756621144c74.zip
Setting up AVR build environment
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3679 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs/micropendous3/ostest')
-rw-r--r--nuttx/configs/micropendous3/ostest/Make.defs28
-rw-r--r--nuttx/configs/micropendous3/ostest/defconfig43
-rwxr-xr-xnuttx/configs/micropendous3/ostest/setenv.sh18
3 files changed, 56 insertions, 33 deletions
diff --git a/nuttx/configs/micropendous3/ostest/Make.defs b/nuttx/configs/micropendous3/ostest/Make.defs
index 63dbe4bba..198cfaaef 100644
--- a/nuttx/configs/micropendous3/ostest/Make.defs
+++ b/nuttx/configs/micropendous3/ostest/Make.defs
@@ -38,19 +38,31 @@ include ${TOPDIR}/.config
# Setup for the selected toolchain
ifeq ($(CONFIG_AVR_WINAVR),y)
- # WinAVR toolchain under Windows
+ # WinAVR toolchain under Windows/Cygwin
CROSSDEV = avr-
WINTOOL = y
MAXOPTIMIZATION = -O2
- ARCHCPUFLAGS = -mcu=at90usb647
+ ARCHCPUFLAGS = -mmcu=at90usb647
LDFLAGS += -nostartfiles -nodefaultlibs
+ AVRLIBC_INCPATH=${cygpath -u "C:/WinAVR/avr/include/avr"}
endif
+
ifeq ($(CONFIG_AVR_LINUXGCC),y)
- # GCC toolchain under Linx
+ # GCC toolchain under Linux
CROSSDEV = avr-
MAXOPTIMIZATION = -O2
- ARCHCPUFLAGS = -mprocessor=elf32pic32mx -mno-float -mlong32 -membedded-data
+ ARCHCPUFLAGS = -mmcu=at90usb647
+ LDFLAGS += -nostartfiles -nodefaultlibs
+ AVRLIBC_INCPATH= #Where?
+endif
+
+ifeq ($(CONFIG_AVR_BUILDROOT),y)
+ # NuttX buildroot GCC toolchain under Linux or Cygwin
+ CROSSDEV = avr-elf-
+ MAXOPTIMIZATION = -O2
+ ARCHCPUFLAGS = -mmcu=at90usb647
LDFLAGS += -nostartfiles -nodefaultlibs
+ AVRLIBC_INCPATH= #Where?
endif
ifeq ($(WINTOOL),y)
@@ -58,14 +70,14 @@ 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}"
- ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}"
+ ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -I "${shell cygpath -w $(AVRLIBC_INCPATH)}"
+ 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
- ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
+ ARCHINCLUDES = -I. -isystem "$(TOPDIR)/include" -I "$(AVRLIBC_INCPATH)"
+ ARCHXXINCLUDES = $(ARCHINCLUDES) -isystem "$(TOPDIR)/include/cxx"
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script
endif
diff --git a/nuttx/configs/micropendous3/ostest/defconfig b/nuttx/configs/micropendous3/ostest/defconfig
index fc91c8f26..17d133550 100644
--- a/nuttx/configs/micropendous3/ostest/defconfig
+++ b/nuttx/configs/micropendous3/ostest/defconfig
@@ -92,33 +92,34 @@ CONFIG_ARCH_DMA=n
#
# Identify toolchain and linker options
#
-CONFIG_AVR_WINAVR=y
+CONFIG_AVR_WINAVR=n
CONFIG_AVR_LINUXGCC=n
+CONFIG_AVR_BUILDROOT=y
#
# Individual subsystems can be enabled:
#
-CONFIG_AT90USB_INT0=n
-CONFIG_AT90USB_INT1=n
-CONFIG_AT90USB_INT2=n
-CONFIG_AT90USB_INT3=n
-CONFIG_AT90USB_INT4=n
-CONFIG_AT90USB_INT5=n
-CONFIG_AT90USB_INT6=n
-CONFIG_AT90USB_INT7=n
-CONFIG_AT90USB_USBHOST=n
-CONFIG_AT90USB_USBDEV=n
-CONFIG_AT90USB_WDT=n
-CONFIG_AT90USB_TIMER0=n
-CONFIG_AT90USB_TIMER1=n
-CONFIG_AT90USB_TIMER2=n
-CONFIG_AT90USB_TIMER3=n
-CONFIG_AT90USB_SPI=n
-CONFIG_AT90USB_UART1=y
-CONFIG_AT90USB_ANACOMP=n
-CONFIG_AT90USB_ADC=n
-CONFIG_AT90USB_TWI=n
+CONFIG_AVR_INT0=n
+CONFIG_AVR_INT1=n
+CONFIG_AVR_INT2=n
+CONFIG_AVR_INT3=n
+CONFIG_AVR_INT4=n
+CONFIG_AVR_INT5=n
+CONFIG_AVR_INT6=n
+CONFIG_AVR_INT7=n
+CONFIG_AVR_USBHOST=n
+CONFIG_AVR_USBDEV=n
+CONFIG_AVR_WDT=n
+CONFIG_AVR_TIMER0=n
+CONFIG_AVR_TIMER1=n
+CONFIG_AVR_TIMER2=n
+CONFIG_AVR_TIMER3=n
+CONFIG_AVR_SPI=n
+CONFIG_AVR_UART1=y
+CONFIG_AVR_ANACOMP=n
+CONFIG_AVR_ADC=n
+CONFIG_AVR_TWI=n
#
# AT90USB specific serial device driver settings
diff --git a/nuttx/configs/micropendous3/ostest/setenv.sh b/nuttx/configs/micropendous3/ostest/setenv.sh
index 4d014aa45..6c6e52c8e 100755
--- a/nuttx/configs/micropendous3/ostest/setenv.sh
+++ b/nuttx/configs/micropendous3/ostest/setenv.sh
@@ -32,20 +32,30 @@
# POSSIBILITY OF SUCH DAMAGE.
#
-if [ "$(basename $0)" = "setenv.sh" ] ; then
+if [ "$(basename $0)" = "setenv.sh" ]; then
echo "You must source this script, not run it!" 1>&2
exit 1
fi
-if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}"; fi
-
WD=`pwd`
+if [ ! -x "setenv.sh" ]; then
+ echo "This script must be executed from the toplevel NuttX build directory"
+ exit 1
+fi
+
+if [ -z "${PATH_ORIG}" ]; then
+ export PATH_ORIG="${PATH}"
+fi
# This the Cygwin path to the location where I installed the WinAVR
# toolchain under windows. This is *not* the default install
# location so you will probably have to edit this. You will also have
# to edit this if you install the Linux AVR toolchain as well
-export TOOLCHAIN_BIN="/cygdrive/c/WinAVR/bin"
+#export TOOLCHAIN_BIN="/cygdrive/c/WinAVR/bin"
+
+# This the Cygwin path to the location where I build the buildroot
+# toolchain.
+export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_avr/staging_dir/bin"
# Add the path to the toolchain to the PATH varialble
export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"