diff options
author | px4dev <px4@purgatory.org> | 2013-01-11 00:45:25 -0800 |
---|---|---|
committer | px4dev <px4@purgatory.org> | 2013-01-11 00:45:25 -0800 |
commit | ca305933a15c135b2ac82d71fec9fab5b7845b7e (patch) | |
tree | ab4cfe6beabb859b40e026fc9dea1d0a7e2caf1c /nuttx | |
parent | ccf9882dc5dbe38b621110f82c4e2ff63aef900e (diff) | |
parent | eaf1d8063cc707b1041e8583663d9edd45f42c5d (diff) | |
download | px4-firmware-ca305933a15c135b2ac82d71fec9fab5b7845b7e.tar.gz px4-firmware-ca305933a15c135b2ac82d71fec9fab5b7845b7e.tar.bz2 px4-firmware-ca305933a15c135b2ac82d71fec9fab5b7845b7e.zip |
Merge commit 'eaf1d8063cc707b1041e8583663d9edd45f42c5d' into nuttx-merge-5447
Build system updates to sync with NuttX upstream.
Diffstat (limited to 'nuttx')
-rw-r--r-- | nuttx/arch/arm/src/stm32/Make.defs | 32 | ||||
-rw-r--r-- | nuttx/configs/px4fmu/common/Make.defs | 61 | ||||
-rwxr-xr-x | nuttx/configs/px4fmu/nsh/defconfig | 2 | ||||
-rw-r--r-- | nuttx/configs/px4fmu/src/Makefile | 14 | ||||
-rw-r--r-- | nuttx/configs/px4io/common/Make.defs | 43 | ||||
-rw-r--r-- | nuttx/configs/px4io/src/Makefile | 9 | ||||
-rw-r--r-- | nuttx/drivers/serial/serial.c | 2 | ||||
-rw-r--r-- | nuttx/include/termios.h | 28 |
8 files changed, 82 insertions, 109 deletions
diff --git a/nuttx/arch/arm/src/stm32/Make.defs b/nuttx/arch/arm/src/stm32/Make.defs index 54067a168..baa751c7d 100644 --- a/nuttx/arch/arm/src/stm32/Make.defs +++ b/nuttx/arch/arm/src/stm32/Make.defs @@ -41,36 +41,40 @@ endif CMN_ASRCS = up_saveusercontext.S up_fullcontextrestore.S up_switchcontext.S CMN_CSRCS = up_assert.c up_blocktask.c up_copystate.c \ - up_createstack.c up_mdelay.c up_udelay.c up_exit.c \ - up_initialize.c up_initialstate.c up_interruptcontext.c \ - up_memfault.c up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c \ - up_releasepending.c up_releasestack.c up_reprioritizertr.c \ - up_schedulesigaction.c up_sigdeliver.c up_systemreset.c \ - up_unblocktask.c up_usestack.c up_doirq.c up_hardfault.c up_svcall.c \ - up_stackcheck.c + up_createstack.c up_mdelay.c up_udelay.c up_exit.c \ + up_initialize.c up_initialstate.c up_interruptcontext.c \ + up_memfault.c up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c \ + up_releasepending.c up_releasestack.c up_reprioritizertr.c \ + up_schedulesigaction.c up_sigdeliver.c up_systemreset.c \ + up_unblocktask.c up_usestack.c up_doirq.c up_hardfault.c up_svcall.c \ + up_stackcheck.c ifeq ($(CONFIG_ARMV7M_CMNVECTOR),y) CMN_ASRCS += up_exception.S CMN_CSRCS += up_vectors.c endif +ifeq ($(CONFIG_ARCH_MEMCPY),y) +CMN_ASRCS += up_memcpy.S +endif + ifeq ($(CONFIG_DEBUG_STACK),y) CMN_CSRCS += up_checkstack.c endif -ifeq ($(CONFIG_ARCH_FPU),y) -CMN_ASRCS += up_fpu.S +ifeq ($(CONFIG_ELF),y) +CMN_CSRCS += up_elf.c endif -ifeq ($(CONFIG_ARCH_MEMCPY),y) -CMN_ASRCS += memcpy.S +ifeq ($(CONFIG_ARCH_FPU),y) +CMN_ASRCS += up_fpu.S endif CHIP_ASRCS = CHIP_CSRCS = stm32_allocateheap.c stm32_start.c stm32_rcc.c stm32_lse.c \ - stm32_lsi.c stm32_gpio.c stm32_exti_gpio.c stm32_flash.c stm32_irq.c \ - stm32_timerisr.c stm32_dma.c stm32_lowputc.c stm32_serial.c \ - stm32_spi.c stm32_sdio.c stm32_tim.c stm32_i2c.c stm32_waste.c + stm32_lsi.c stm32_gpio.c stm32_exti_gpio.c stm32_flash.c stm32_irq.c \ + stm32_timerisr.c stm32_dma.c stm32_lowputc.c stm32_serial.c \ + stm32_spi.c stm32_sdio.c stm32_tim.c stm32_i2c.c stm32_waste.c ifeq ($(CONFIG_USBDEV),y) ifeq ($(CONFIG_STM32_USB),y) diff --git a/nuttx/configs/px4fmu/common/Make.defs b/nuttx/configs/px4fmu/common/Make.defs index 3d2df6314..b289f8960 100644 --- a/nuttx/configs/px4fmu/common/Make.defs +++ b/nuttx/configs/px4fmu/common/Make.defs @@ -39,12 +39,15 @@ # Make.defs in the per-config directories. # +include ${TOPDIR}/tools/Config.mk + # # We only support building with the ARM bare-metal toolchain from # https://launchpad.net/gcc-arm-embedded on Windows, Linux or Mac OS. # +CONFIG_ARMV7M_TOOLCHAIN := GNU_EABI -CROSSDEV = arm-none-eabi- +include ${TOPDIR}/arch/arm/src/armv7-m/Toolchain.defs CC = $(CROSSDEV)gcc CXX = $(CROSSDEV)g++ @@ -167,25 +170,34 @@ OBJEXT = .o LIBEXT = .a EXEEXT = -define PREPROCESS - @echo "CPP: $1->$2" - @$(CPP) $(CPPFLAGS) $(abspath $1) -o $2 -endef - -define COMPILE - @echo "CC: $1" - $(Q)$(CC) -c $(CFLAGS) $(abspath $1) -o $2 -endef - -define COMPILEXX - @echo "CXX: $1" - $(Q)$(CXX) -c $(CXXFLAGS) $(abspath $1) -o $2 -endef - -define ASSEMBLE - @echo "AS: $1" - $(Q)$(CC) -c $(AFLAGS) $(abspath $1) -o $2 -endef +#define PREPROCESS +# @echo "CPP: $1->$2" +# @$(CPP) $(CPPFLAGS) $(abspath $1) -o $2 +#endef +# +#define COMPILE +# @echo "CC: $1" +# $(Q)$(CC) -c $(CFLAGS) $(abspath $1) -o $2 +#endef +# +#define COMPILEXX +# @echo "CXX: $1" +# $(Q)$(CXX) -c $(CXXFLAGS) $(abspath $1) -o $2 +#endef +# +#define ASSEMBLE +# @echo "AS: $1" +# $(Q)$(CC) -c $(AFLAGS) $(abspath $1) -o $2 +#endef +# +#define ARCHIVE +# echo "AR: $2"; \ +# $(AR) $1 $2 || { echo "$(AR) $1 $2 FAILED!" ; exit 1 ; } +#endef +# +#define CLEAN +# @rm -f *.o *.a +#endef # produce partially-linked $1 from files in $2 define PRELINK @@ -193,15 +205,6 @@ define PRELINK @$(LD) -Ur -o $1 $2 && $(OBJCOPY) --localize-hidden $1 endef -define ARCHIVE - echo "AR: $2"; \ - $(AR) $1 $2 || { echo "$(AR) $1 $2 FAILED!" ; exit 1 ; } -endef - -define CLEAN - @rm -f *.o *.a -endef - HOSTCC = gcc HOSTINCLUDES = -I. HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe diff --git a/nuttx/configs/px4fmu/nsh/defconfig b/nuttx/configs/px4fmu/nsh/defconfig index 52013457e..cd86d5544 100755 --- a/nuttx/configs/px4fmu/nsh/defconfig +++ b/nuttx/configs/px4fmu/nsh/defconfig @@ -747,6 +747,8 @@ CONFIG_FS_ROMFS=y # CONFIG_MMCSD_SPICLOCK - Maximum SPI clock to drive MMC/SD card. # Default is 20MHz, current setting 24 MHz # +CONFIG_MMCSD=y +CONFIG_MMCSD_SPI=y CONFIG_MMCSD_NSLOTS=1 CONFIG_MMCSD_READONLY=n CONFIG_MMCSD_SPICLOCK=24000000 diff --git a/nuttx/configs/px4fmu/src/Makefile b/nuttx/configs/px4fmu/src/Makefile index c3d6bf543..d4276f7fc 100644 --- a/nuttx/configs/px4fmu/src/Makefile +++ b/nuttx/configs/px4fmu/src/Makefile @@ -64,23 +64,21 @@ $(COBJS) $(LINKOBJS): %$(OBJEXT): %.c $(call COMPILE, $<, $@) libboard$(LIBEXT): $(OBJS) - @( for obj in $(OBJS) ; do \ - $(call ARCHIVE, $@, $${obj}); \ - done ; ) - touch $@ + $(call ARCHIVE, $@, $(OBJS)) .depend: Makefile $(SRCS) - @$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep - @touch $@ + $(Q) $(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep + $(Q) touch $@ depend: .depend clean: - @rm -f libboard$(LIBEXT) *~ .*.swp + $(call DELFILE, libboard$(LIBEXT)) $(call CLEAN) distclean: clean - @rm -f Make.dep .depend + $(call DELFILE, Make.dep) + $(call DELFILE, .depend) -include Make.dep diff --git a/nuttx/configs/px4io/common/Make.defs b/nuttx/configs/px4io/common/Make.defs index a3996a9ed..d6d52e3d2 100644 --- a/nuttx/configs/px4io/common/Make.defs +++ b/nuttx/configs/px4io/common/Make.defs @@ -39,12 +39,15 @@ # Make.defs in the per-config directories. # +include ${TOPDIR}/tools/Config.mk + # # We only support building with the ARM bare-metal toolchain from # https://launchpad.net/gcc-arm-embedded on Windows, Linux or Mac OS. # +CONFIG_ARMV7M_TOOLCHAIN := GNU_EABI -CROSSDEV = arm-none-eabi- +include ${TOPDIR}/arch/arm/src/armv7-m/Toolchain.defs CC = $(CROSSDEV)gcc CXX = $(CROSSDEV)g++ @@ -160,46 +163,10 @@ OBJEXT = .o LIBEXT = .a EXEEXT = -# If VERBOSE is set, don't hide the compiler invocations. -ifeq ($(VERBOSE),YES) -_v = -else -_v = @ -endif - -define PREPROCESS - @echo "CPP: $1->$2" - @$(CPP) $(CPPFLAGS) $(abspath $1) -o $2 -endef - -define COMPILE - @echo "CC: $1" - $(_v)$(CC) -c $(CFLAGS) $(abspath $1) -o $2 -endef - -define COMPILEXX - @echo "CXX: $1" - $(_v)$(CXX) -c $(CXXFLAGS) $(abspath $1) -o $2 -endef - -define ASSEMBLE - @echo "AS: $1" - $(_v)$(CC) -c $(AFLAGS) $(abspath $1) -o $2 -endef - # produce partially-linked $1 from files in $2 define PRELINK @echo "PRELINK: $1" - @$(LD) -Ur -o $1 $2 && $(OBJCOPY) --localize-hidden $1 -endef - -define ARCHIVE - echo "AR: $2"; \ - $(AR) $1 $2 || { echo "$(AR) $1 $2 FAILED!" ; exit 1 ; } -endef - -define CLEAN - @rm -f *.o *.a + $(Q) $(LD) -Ur -o $1 $2 && $(OBJCOPY) --localize-hidden $1 endef HOSTCC = gcc diff --git a/nuttx/configs/px4io/src/Makefile b/nuttx/configs/px4io/src/Makefile index 144fa8549..bb9539d16 100644 --- a/nuttx/configs/px4io/src/Makefile +++ b/nuttx/configs/px4io/src/Makefile @@ -65,9 +65,7 @@ $(COBJS) $(LINKOBJS): %$(OBJEXT): %.c $(call COMPILE, $<, $@) libboard$(LIBEXT): $(OBJS) - @( for obj in $(OBJS) ; do \ - $(call ARCHIVE, $@, $${obj}); \ - done ; ) + $(call ARCHIVE, $@, $(OBJS)) .depend: Makefile $(SRCS) @$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep @@ -76,10 +74,11 @@ libboard$(LIBEXT): $(OBJS) depend: .depend clean: - @rm -f libboard$(LIBEXT) *~ .*.swp + $(call DELFILE, libboard$(LIBEXT)) $(call CLEAN) distclean: clean - @rm -f Make.dep .depend + $(call DELFILE, Make.dep) + $(call DELFILE, .depend) -include Make.dep diff --git a/nuttx/drivers/serial/serial.c b/nuttx/drivers/serial/serial.c index 30ad8ff6e..8987f01b8 100644 --- a/nuttx/drivers/serial/serial.c +++ b/nuttx/drivers/serial/serial.c @@ -254,7 +254,7 @@ static inline ssize_t uart_irqwrite(FAR uart_dev_t *dev, FAR const char *buffer, { int ch = *buffer++; - /* assume that this is console text output and always do \n -> \r\n conversion */ + /* If this is the console, then we should replace LF with CR-LF */ if (ch == '\n') { diff --git a/nuttx/include/termios.h b/nuttx/include/termios.h index c8f590a5b..537edbd8f 100644 --- a/nuttx/include/termios.h +++ b/nuttx/include/termios.h @@ -98,20 +98,20 @@ /* Control Modes (c_cflag in the termios structure) */ -#define CSIZE (3 << 0) /* Bits 0-1: Character size: */ -# define CS5 (0 << 0) /* 5 bits */ -# define CS6 (1 << 0) /* 6 bits */ -# define CS7 (2 << 0) /* 7 bits */ -# define CS8 (3 << 0) /* 8 bits */ -#define CSTOPB (1 << 2) /* Bit 2: Send two stop bits, else one */ -#define CREAD (1 << 3) /* Bit 3: Enable receiver */ -#define PARENB (1 << 4) /* Bit 4: Parity enable */ -#define PARODD (1 << 5) /* Bit 5: Odd parity, else even */ -#define HUPCL (1 << 6) /* Bit 6: Hang up on last close */ -#define CLOCAL (1 << 7) /* Bit 7: Ignore modem status lines */ -#define CCTS_OFLOW (1 << 8) /* Bit 8: CTS flow control of output */ -#define CRTSCTS CCTS_OFLOW -#define CRTS_IFLOW (1 << 9) /* Bit 9: RTS flow control of input */ +#define CSIZE (3 << 0) /* Bits 0-1: Character size: */ +# define CS5 (0 << 0) /* 5 bits */ +# define CS6 (1 << 0) /* 6 bits */ +# define CS7 (2 << 0) /* 7 bits */ +# define CS8 (3 << 0) /* 8 bits */ +#define CSTOPB (1 << 2) /* Bit 2: Send two stop bits, else one */ +#define CREAD (1 << 3) /* Bit 3: Enable receiver */ +#define PARENB (1 << 4) /* Bit 4: Parity enable */ +#define PARODD (1 << 5) /* Bit 5: Odd parity, else even */ +#define HUPCL (1 << 6) /* Bit 6: Hang up on last close */ +#define CLOCAL (1 << 7) /* Bit 7: Ignore modem status lines */ +#define CCTS_OFLOW (1 << 8) /* Bit 8: CTS flow control of output */ +#define CRTSCTS CCTS_OFLOW +#define CRTS_IFLOW (1 << 9) /* Bit 9: RTS flow control of input */ /* Local Modes (c_lflag in the termios structure) */ |