Changes to tools to support MAC OS

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4232 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo 2011-12-27 12:44:39 +00:00
parent f01e35e651
commit 50eddba2ce
5 changed files with 23 additions and 17 deletions

View File

@ -2,7 +2,7 @@
* arch/arm/src/stm32/stm32_usbdev.c
*
* Copyright (C) 2009-2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.orgr>
*
* References:
* - RM0008 Reference manual, STMicro document ID 13902
@ -148,7 +148,7 @@
#define REQRECIPIENT_MASK (USB_REQ_TYPE_MASK | USB_REQ_RECIPIENT_MASK)
/* Endpoint rister masks (handling toggle fields) */
/* Endpoint register masks (handling toggle fields) */
#define EPR_NOTOG_MASK (USB_EPR_CTR_RX | USB_EPR_SETUP | USB_EPR_EPTYPE_MASK |\
USB_EPR_EP_KIND | USB_EPR_CTR_TX | USB_EPR_EA_MASK)

View File

@ -67,5 +67,9 @@ CHIP_CSRCS = pic32mx-irq.c pic32mx-decodeirq.c pic32mx-exception.c pic32mx-gpio.
# Configuration-dependent PIC32MX files
ifeq ($(CONFIG_GPIO_IRQ),y)
CHIP_CSRCS += up_gpioirq.c
CHIP_CSRCS += pic32mx_gpioirq.c
endif
ifeq ($(CONFIG_PIC32MX_USBDEV),y)
CHIP_CSRCS += pic32mx-usbdev.c
endif

View File

@ -60,6 +60,7 @@ ifdef ARCHSCRIPT
endif
@echo "ARCHCFLAGS=\"$(ARCHCFLAGS) $(ARCHCPUFLAGS)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "ARCHCXXFLAGS=\"$(ARCHCXXFLAGS) $(ARCHCPUFLAGS)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "CROSSDEV=\"$(CROSSDEV)\"" >> $(EXPORTDIR)/makeinfo.sh
@chmod 755 $(EXPORTDIR)/makeinfo.sh
clean:

View File

@ -142,12 +142,12 @@ fi
# Okay... setup the configuration
cp -f "${configpath}/Make.defs" "${TOPDIR}/." || \
install -C "${configpath}/Make.defs" "${TOPDIR}/." || \
{ echo "Failed to copy ${configpath}/Make.defs" ; exit 7 ; }
cp -f "${configpath}/setenv.sh" "${TOPDIR}/." || \
install -C "${configpath}/setenv.sh" "${TOPDIR}/." || \
{ echo "Failed to copy ${configpath}/setenv.sh" ; exit 8 ; }
chmod 755 "${TOPDIR}/setenv.sh"
cp -f "${configpath}/defconfig" "${TOPDIR}/.config" || \
install -C "${configpath}/defconfig" "${TOPDIR}/.configX" || \
{ echo "Failed to copy ${configpath}/defconfig" ; exit 9 ; }
# Copy option appconfig
@ -156,13 +156,13 @@ if [ ! -z "${appdir}" ]; then
if [ ! -r "${configpath}/appconfig" ]; then
echo "NOTE: No readable appconfig file found in ${configpath}"
else
cp -f "${configpath}/appconfig" "${TOPDIR}/${appdir}/.config" || \
install -C "${configpath}/appconfig" "${TOPDIR}/${appdir}/.configX" || \
{ echo "Failed to copy ${configpath}/appconfig" ; exit 10 ; }
echo "" >> "${TOPDIR}/.config"
echo "# Application configuration" >> "${TOPDIR}/.config"
echo "" >> "${TOPDIR}/.config"
echo "CONFIG_APPS_DIR=\"$appdir\"" >> "${TOPDIR}/.config"
echo "" >> "${TOPDIR}/.configX"
echo "# Application configuration" >> "${TOPDIR}/.configX"
echo "" >> "${TOPDIR}/.configX"
echo "CONFIG_APPS_DIR=\"$appdir\"" >> "${TOPDIR}/.configX"
fi
fi
install -C "${TOPDIR}/.configX" "${TOPDIR}/.config"

View File

@ -169,7 +169,7 @@ if [ ! -z "${LDPATH}" ]; then
# Copy the linker script
cp --preserve=all "${LDPATH}" "${EXPORTDIR}/build/." || \
cp -p "${LDPATH}" "${EXPORTDIR}/build/." || \
{ echo "MK: cp ${LDPATH} failed"; exit 1; }
fi
@ -180,7 +180,7 @@ echo "ARCHCXXFLAGS = ${ARCHCXXFLAGS}" >>"${EXPORTDIR}/build/Make.defs"
# Copy the NuttX include directory (retaining attributes and following symbolic links)
cp -LR --preserve=all "${TOPDIR}/include" "${EXPORTDIR}/." || \
cp -LR -p "${TOPDIR}/include" "${EXPORTDIR}/." || \
{ echo "MK: 'cp ${TOPDIR}/include' failed"; exit 1; }
find "${EXPORTDIR}/include" -name .svn | xargs rm -rf
@ -251,6 +251,7 @@ fi
# Then process each library
AR=${CROSSDEV}ar
for lib in ${LIBLIST}; do
if [ ! -f "${TOPDIR}/${lib}" ]; then
echo "MK: Library ${TOPDIR}/${lib} does not exist"
@ -265,7 +266,7 @@ for lib in ${LIBLIST}; do
# Copy the application library unmodified
if [ "X${libname}" = "Xlibapps" ]; then
cp --preserve=all "${TOPDIR}/${lib}" "${EXPORTDIR}/libs/." || \
cp -p "${TOPDIR}/${lib}" "${EXPORTDIR}/libs/." || \
{ echo "MK: cp ${TOPDIR}/${lib} failed"; exit 1; }
else
@ -276,14 +277,14 @@ for lib in ${LIBLIST}; do
{ echo "MK: 'mkdir ${EXPORTDIR}/tmp' failed"; exit 1; }
cd "${EXPORTDIR}/tmp" || \
{ echo "MK: 'cd ${EXPORTDIR}/tmp' failed"; exit 1; }
ar x "${TOPDIR}/${lib}"
${AR} x "${TOPDIR}/${lib}"
# Rename each object file (to avoid collision when they are combined)
# and add the file to libnuttx
for file in `ls`; do
mv "${file}" "${shortname}-${file}"
ar rcs "${EXPORTDIR}/libs/libnuttx${LIBEXT}" "${shortname}-${file}"
${AR} rcs "${EXPORTDIR}/libs/libnuttx${LIBEXT}" "${shortname}-${file}"
done
cd "${TOPDIR}" || \