mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-01 11:34:08 +08:00
Merge commit 'eaf1d8063cc707b1041e8583663d9edd45f42c5d' into nuttx-merge-5447
Build system updates to sync with NuttX upstream.
This commit is contained in:
commit
ca305933a1
@ -47,6 +47,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/usb/usbdev_trace.h>
|
||||
@ -215,6 +216,15 @@
|
||||
|
||||
#endif /* CONFIG_NSH_TELNET_LOGIN */
|
||||
|
||||
/* CONFIG_NSH_MAX_ROUNDTRIP - This is the maximum round trip for a response to
|
||||
* a ICMP ECHO request. It is in units of deciseconds. The default is 20
|
||||
* (2 seconds).
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_NSH_MAX_ROUNDTRIP
|
||||
# define CONFIG_NSH_MAX_ROUNDTRIP 20
|
||||
#endif
|
||||
|
||||
/* Verify support for ROMFS /etc directory support options */
|
||||
|
||||
#ifdef CONFIG_NSH_ROMFSETC
|
||||
@ -258,12 +268,36 @@
|
||||
# undef CONFIG_NSH_ROMFSSECTSIZE
|
||||
#endif
|
||||
|
||||
/* This is the maximum number of arguments that will be accepted for a command */
|
||||
#ifdef CONFIG_NSH_MAX_ARGUMENTS
|
||||
# define NSH_MAX_ARGUMENTS CONFIG_NSH_MAX_ARGUMENTS
|
||||
#else
|
||||
# define NSH_MAX_ARGUMENTS 10
|
||||
/* This is the maximum number of arguments that will be accepted for a
|
||||
* command. Here we attempt to select the smallest number possible depending
|
||||
* upon the of commands that are available. Most commands use six or fewer
|
||||
* arguments, but there are a few that require more.
|
||||
*
|
||||
* This value is also configurable with CONFIG_NSH_MAXARGUMENTS. This
|
||||
* configurability is necessary since there may also be external, "built-in"
|
||||
* commands that require more commands than NSH is aware of.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_NSH_MAXARGUMENTS
|
||||
# define CONFIG_NSH_MAXARGUMENTS 6
|
||||
#endif
|
||||
|
||||
#if CONFIG_NSH_MAXARGUMENTS < 11
|
||||
# if defined(CONFIG_NET) && !defined(CONFIG_NSH_DISABLE_IFCONFIG)
|
||||
# undef CONFIG_NSH_MAXARGUMENTS
|
||||
# define CONFIG_NSH_MAXARGUMENTS 11
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if CONFIG_NSH_MAXARGUMENTS < 7
|
||||
# if defined(CONFIG_NET_UDP) && CONFIG_NFILE_DESCRIPTORS > 0
|
||||
# if !defined(CONFIG_NSH_DISABLE_GET) || !defined(CONFIG_NSH_DISABLE_PUT)
|
||||
# undef CONFIG_NSH_MAXARGUMENTS
|
||||
# define CONFIG_NSH_MAXARGUMENTS 7
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* strerror() produces much nicer output but is, however, quite large and
|
||||
* will only be used if CONFIG_NSH_STRERROR is defined. Note that the strerror
|
||||
* interface must also have been enabled with CONFIG_LIBC_STRERROR.
|
||||
@ -507,7 +541,7 @@ void nsh_usbtrace(void);
|
||||
#ifndef CONFIG_NSH_DISABLE_XD
|
||||
int cmd_xd(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
|
||||
#endif
|
||||
|
||||
|
||||
#if !defined(CONFIG_NSH_DISABLESCRIPT) && !defined(CONFIG_NSH_DISABLE_TEST)
|
||||
int cmd_test(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
|
||||
int cmd_lbracket(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
|
||||
@ -529,6 +563,9 @@ void nsh_usbtrace(void);
|
||||
# ifndef CONFIG_NSH_DISABLE_DD
|
||||
int cmd_dd(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
|
||||
# endif
|
||||
# ifndef CONFIG_NSH_DISABLE_HEXDUMP
|
||||
int cmd_hexdump(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
|
||||
# endif
|
||||
# ifndef CONFIG_NSH_DISABLE_LS
|
||||
int cmd_ls(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
|
||||
# endif
|
||||
@ -595,6 +632,10 @@ void nsh_usbtrace(void);
|
||||
# ifndef CONFIG_NSH_DISABLE_IFCONFIG
|
||||
int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
|
||||
# endif
|
||||
# ifndef CONFIG_NSH_DISABLE_IFUPDOWN
|
||||
int cmd_ifup(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
|
||||
int cmd_ifdown(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
|
||||
# endif
|
||||
#if defined(CONFIG_NET_UDP) && CONFIG_NFILE_DESCRIPTORS > 0
|
||||
# ifndef CONFIG_NSH_DISABLE_GET
|
||||
int cmd_get(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
|
||||
@ -643,4 +684,28 @@ void nsh_usbtrace(void);
|
||||
# endif
|
||||
#endif /* CONFIG_DISABLE_SIGNALS */
|
||||
|
||||
#if defined(CONFIG_NETUTILS_CODECS) && defined(CONFIG_CODECS_BASE64)
|
||||
# ifndef CONFIG_NSH_DISABLE_BASE64DEC
|
||||
int cmd_base64decode(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
|
||||
# endif
|
||||
# ifndef CONFIG_NSH_DISABLE_BASE64ENC
|
||||
int cmd_base64encode(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_NETUTILS_CODECS) && defined(CONFIG_CODECS_HASH_MD5)
|
||||
# ifndef CONFIG_NSH_DISABLE_MD5
|
||||
int cmd_md5(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_NETUTILS_CODECS) && defined(CONFIG_CODECS_URLCODE)
|
||||
# ifndef CONFIG_NSH_DISABLE_URLDECODE
|
||||
int cmd_urlencode(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
|
||||
# endif
|
||||
# ifndef CONFIG_NSH_DISABLE_URLENCODE
|
||||
int cmd_urldecode(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif /* __APPS_NSHLIB_NSH_H */
|
||||
|
||||
@ -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_ELF),y)
|
||||
CMN_CSRCS += up_elf.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_FPU),y)
|
||||
CMN_ASRCS += up_fpu.S
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_MEMCPY),y)
|
||||
CMN_ASRCS += memcpy.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)
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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')
|
||||
{
|
||||
|
||||
@ -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) */
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user