From 2e235b9013ae7aa9bef0f04f9fe9916a0c1de770 Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Mon, 12 Dec 2016 14:10:10 -1000 Subject: [PATCH] Changes to aerocore for upstream Nuttx --- nuttx-configs/aerocore/include/board.h | 20 +- nuttx-configs/aerocore/nsh/Make.defs | 27 +- nuttx-configs/aerocore/nsh/appconfig | 42 -- nuttx-configs/aerocore/nsh/defconfig | 557 +++++++++++++++----- nuttx-configs/aerocore/nsh/setenv.sh | 2 +- nuttx-configs/aerocore/scripts/ld.script | 2 +- nuttx-configs/aerocore/src/Makefile | 5 +- src/drivers/boards/aerocore/CMakeLists.txt | 1 + src/drivers/boards/aerocore/aerocore_init.c | 155 +++--- src/drivers/boards/aerocore/aerocore_led.c | 24 +- src/drivers/boards/aerocore/aerocore_spi.c | 56 +- src/drivers/boards/aerocore/board_config.h | 23 - 12 files changed, 562 insertions(+), 352 deletions(-) delete mode 100644 nuttx-configs/aerocore/nsh/appconfig diff --git a/nuttx-configs/aerocore/include/board.h b/nuttx-configs/aerocore/include/board.h index 6dc85735a5..84b0575335 100644 --- a/nuttx-configs/aerocore/include/board.h +++ b/nuttx-configs/aerocore/include/board.h @@ -1,5 +1,5 @@ /************************************************************************************ - * configs/aerocore/include/board.h + * nuttx-configs/aerocore/include/board.h * include/arch/board/board.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. @@ -146,11 +146,23 @@ /* Timer Frequencies, if APBx is set to 1, frequency is same to APBx * otherwise frequency is 2xAPBx. - * Note: TIM1,8 are on APB2, others on APB1 + * Note: TIM1,8-11 are on APB2, others on APB1 */ -#define STM32_TIM18_FREQUENCY (2*STM32_PCLK2_FREQUENCY) -#define STM32_TIM27_FREQUENCY (2*STM32_PCLK1_FREQUENCY) +#define BOARD_TIM1_FREQUENCY STM32_APB2_TIM1_CLKIN +#define BOARD_TIM2_FREQUENCY STM32_APB1_TIM2_CLKIN +#define BOARD_TIM3_FREQUENCY STM32_APB1_TIM3_CLKIN +#define BOARD_TIM4_FREQUENCY STM32_APB1_TIM4_CLKIN +#define BOARD_TIM5_FREQUENCY STM32_APB1_TIM5_CLKIN +#define BOARD_TIM6_FREQUENCY STM32_APB1_TIM6_CLKIN +#define BOARD_TIM7_FREQUENCY STM32_APB1_TIM7_CLKIN +#define BOARD_TIM8_FREQUENCY STM32_APB2_TIM8_CLKIN +#define BOARD_TIM9_FREQUENCY STM32_APB2_TIM9_CLKIN +#define BOARD_TIM10_FREQUENCY STM32_APB2_TIM10_CLKIN +#define BOARD_TIM11_FREQUENCY STM32_APB2_TIM11_CLKIN +#define BOARD_TIM12_FREQUENCY STM32_APB1_TIM12_CLKIN +#define BOARD_TIM13_FREQUENCY STM32_APB1_TIM13_CLKIN +#define BOARD_TIM14_FREQUENCY STM32_APB1_TIM14_CLKIN /* Alternate function pin selections ************************************************/ diff --git a/nuttx-configs/aerocore/nsh/Make.defs b/nuttx-configs/aerocore/nsh/Make.defs index 96eedc3665..f19ce9734d 100644 --- a/nuttx-configs/aerocore/nsh/Make.defs +++ b/nuttx-configs/aerocore/nsh/Make.defs @@ -1,5 +1,5 @@ ############################################################################ -# configs/aerocore/nsh/Make.defs +# nuttx-configs/aerocore/nsh/Make.defs # # Copyright (C) 2011 Gregory Nutt. All rights reserved. # Author: Gregory Nutt @@ -35,6 +35,8 @@ include ${TOPDIR}/.config include ${TOPDIR}/tools/Config.mk +include $(TOPDIR)/PX4_Warnings.mk +include $(TOPDIR)/PX4_Config.mk include $(TOPDIR)/PX4_Warnings.mk @@ -42,7 +44,7 @@ include $(TOPDIR)/PX4_Warnings.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 +CONFIG_ARMV7M_TOOLCHAIN := GNU_EABI${HOST_OS_FIRST_LETTER} include ${TOPDIR}/arch/arm/src/armv7-m/Toolchain.defs @@ -62,17 +64,19 @@ ARCHCPUFLAGS = -mcpu=cortex-m4 \ -mfpu=fpv4-sp-d16 \ -mfloat-abi=hard +# Enable precise stack overflow tracking -# enable precise stack overflow tracking ifeq ($(CONFIG_ARMV7M_STACKCHECK),y) INSTRUMENTATIONDEFINES = -finstrument-functions -ffixed-r10 endif -# pull in *just* libm from the toolchain ... this is grody +# Pull in *just* libm from the toolchain ... this is grody + LIBM = "${shell $(CC) $(ARCHCPUFLAGS) -print-file-name=libm.a}" EXTRA_LIBS += $(LIBM) -# use our linker script +# Use our linker script + LDSCRIPT = ld.script ifeq ($(WINTOOL),y) @@ -94,18 +98,20 @@ else ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT) else # Linux/Cygwin-native toolchain - MKDEP = $(TOPDIR)/tools/mkdeps.sh + MKDEP = $(TOPDIR)/tools/mkdeps$(HOSTEXEEXT) ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT) endif endif -# tool versions +# Tool versions + ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'} ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} -# optimisation flags +# Optimization flags + ARCHOPTIMIZATION = $(MAXOPTIMIZATION) \ -fno-strict-aliasing \ -fno-strength-reduce \ @@ -127,7 +133,8 @@ ARCHWARNINGSXX = $(ARCHWARNINGS) $(PX4_ARCHWARNINGSXX) ARCHDEFINES = ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 -# this seems to be the only way to add linker flags +# This seems to be the only way to add linker flags + EXTRA_LIBS += --warn-common \ --gc-sections @@ -146,8 +153,8 @@ OBJEXT = .o LIBEXT = .a EXEEXT = +# Produce partially-linked $1 from files in $2 -# produce partially-linked $1 from files in $2 define PRELINK @echo "PRELINK: $1" $(Q) $(LD) -Ur -o $1 $2 && $(OBJCOPY) --localize-hidden $1 diff --git a/nuttx-configs/aerocore/nsh/appconfig b/nuttx-configs/aerocore/nsh/appconfig deleted file mode 100644 index 2850dac06e..0000000000 --- a/nuttx-configs/aerocore/nsh/appconfig +++ /dev/null @@ -1,42 +0,0 @@ -############################################################################ -# configs/aerocore/nsh/appconfig -# -# Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Path to example in apps/examples containing the user_start entry point - -CONFIGURED_APPS += examples/nsh - -# The NSH application library -CONFIGURED_APPS += nshlib -CONFIGURED_APPS += system/readline diff --git a/nuttx-configs/aerocore/nsh/defconfig b/nuttx-configs/aerocore/nsh/defconfig index 6be8f217ba..379fcc1f96 100644 --- a/nuttx-configs/aerocore/nsh/defconfig +++ b/nuttx-configs/aerocore/nsh/defconfig @@ -2,12 +2,12 @@ # Automatically generated file; DO NOT EDIT. # Nuttx/ Configuration # -CONFIG_NUTTX_NEWCONFIG=y # # Build Setup # # CONFIG_EXPERIMENTAL is not set +# CONFIG_DEFAULT_SMALL is not set CONFIG_HOST_LINUX=y # CONFIG_HOST_OSX is not set # CONFIG_HOST_WINDOWS is not set @@ -17,6 +17,7 @@ CONFIG_HOST_LINUX=y # Build Configuration # CONFIG_APPS_DIR="../apps" +CONFIG_BUILD_FLAT=y # CONFIG_BUILD_2PASS is not set # @@ -26,10 +27,12 @@ CONFIG_APPS_DIR="../apps" # CONFIG_INTELHEX_BINARY is not set # CONFIG_MOTOROLA_SREC is not set CONFIG_RAW_BINARY=y +# CONFIG_UBOOT_UIMAGE is not set # # Customize Header Files # +# CONFIG_ARCH_STDINT_H is not set # CONFIG_ARCH_STDBOOL_H is not set CONFIG_ARCH_MATH_H=y # CONFIG_ARCH_FLOAT_H is not set @@ -38,13 +41,19 @@ CONFIG_ARCH_MATH_H=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_ARCH_HAVE_STACKCHECK=y +CONFIG_STACK_COLORATION=y # CONFIG_DEBUG_SYMBOLS is not set +CONFIG_ARCH_HAVE_CUSTOMOPT=y +# CONFIG_DEBUG_NOOPT is not set +# CONFIG_DEBUG_CUSTOMOPT is not set +CONFIG_DEBUG_FULLOPT=y # # System Type # -# CONFIG_ARCH_8051 is not set CONFIG_ARCH_ARM=y # CONFIG_ARCH_AVR is not set # CONFIG_ARCH_HC is not set @@ -60,41 +69,64 @@ CONFIG_ARCH="arm" # # ARM Options # +# CONFIG_ARCH_CHIP_A1X is not set # CONFIG_ARCH_CHIP_C5471 is not set # CONFIG_ARCH_CHIP_CALYPSO is not set # CONFIG_ARCH_CHIP_DM320 is not set +# CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set +# CONFIG_ARCH_CHIP_TIVA is not set +# CONFIG_ARCH_CHIP_LPC11XX is not set # CONFIG_ARCH_CHIP_LPC17XX is not set # CONFIG_ARCH_CHIP_LPC214X is not set # CONFIG_ARCH_CHIP_LPC2378 is not set # CONFIG_ARCH_CHIP_LPC31XX is not set # CONFIG_ARCH_CHIP_LPC43XX is not set # CONFIG_ARCH_CHIP_NUC1XX is not set +# CONFIG_ARCH_CHIP_SAMA5 is not set +# CONFIG_ARCH_CHIP_SAMD is not set +# CONFIG_ARCH_CHIP_SAML is not set # CONFIG_ARCH_CHIP_SAM34 is not set +# CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STR71X is not set +# CONFIG_ARCH_ARM7TDMI is not set +# CONFIG_ARCH_ARM926EJS is not set +# CONFIG_ARCH_ARM920T is not set +# CONFIG_ARCH_CORTEXM0 is not set +# CONFIG_ARCH_CORTEXM3 is not set CONFIG_ARCH_CORTEXM4=y +# CONFIG_ARCH_CORTEXM7 is not set +# CONFIG_ARCH_CORTEXA5 is not set +# CONFIG_ARCH_CORTEXA8 is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" CONFIG_ARMV7M_USEBASEPRI=y CONFIG_ARCH_HAVE_CMNVECTOR=y CONFIG_ARMV7M_CMNVECTOR=y +# CONFIG_ARMV7M_LAZYFPU is not set CONFIG_ARCH_HAVE_FPU=y +# CONFIG_ARCH_HAVE_DPFPU is not set CONFIG_ARCH_FPU=y -CONFIG_ARCH_HAVE_MPU=y # CONFIG_ARMV7M_MPU is not set # # ARMV7M Configuration Options # +# CONFIG_ARMV7M_HAVE_ICACHE is not set +# CONFIG_ARMV7M_HAVE_DCACHE is not set +# CONFIG_ARMV7M_HAVE_ITCM is not set +# CONFIG_ARMV7M_HAVE_DTCM is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set -CONFIG_ARMV7M_TOOLCHAIN_GNU_EABI=y -CONFIG_ARMV7M_STACKCHECK=n +CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL=y +CONFIG_ARMV7M_HAVE_STACKCHECK=y +# CONFIG_ARMV7M_STACKCHECK is not set +# CONFIG_ARMV7M_ITMSYSLOG is not set CONFIG_SERIAL_TERMIOS=y # @@ -118,6 +150,8 @@ CONFIG_SERIAL_TERMIOS=y # CONFIG_ARCH_CHIP_STM32L152V6 is not set # CONFIG_ARCH_CHIP_STM32L152V8 is not set # CONFIG_ARCH_CHIP_STM32L152VB is not set +# CONFIG_ARCH_CHIP_STM32L162ZD is not set +# CONFIG_ARCH_CHIP_STM32L162VE is not set # CONFIG_ARCH_CHIP_STM32F100C8 is not set # CONFIG_ARCH_CHIP_STM32F100CB is not set # CONFIG_ARCH_CHIP_STM32F100R8 is not set @@ -130,15 +164,30 @@ CONFIG_SERIAL_TERMIOS=y # CONFIG_ARCH_CHIP_STM32F100VC is not set # CONFIG_ARCH_CHIP_STM32F100VD is not set # CONFIG_ARCH_CHIP_STM32F100VE is not set +# CONFIG_ARCH_CHIP_STM32F102CB is not set +# CONFIG_ARCH_CHIP_STM32F103T8 is not set +# CONFIG_ARCH_CHIP_STM32F103TB is not set # CONFIG_ARCH_CHIP_STM32F103C4 is not set # CONFIG_ARCH_CHIP_STM32F103C8 is not set -# CONFIG_ARCH_CHIP_STM32F103RET6 is not set -# CONFIG_ARCH_CHIP_STM32F103VCT6 is not set -# CONFIG_ARCH_CHIP_STM32F103VET6 is not set -# CONFIG_ARCH_CHIP_STM32F103ZET6 is not set -# CONFIG_ARCH_CHIP_STM32F105VBT7 is not set +# CONFIG_ARCH_CHIP_STM32F103CB is not set +# CONFIG_ARCH_CHIP_STM32F103R8 is not set +# CONFIG_ARCH_CHIP_STM32F103RB is not set +# CONFIG_ARCH_CHIP_STM32F103RC is not set +# CONFIG_ARCH_CHIP_STM32F103RD is not set +# CONFIG_ARCH_CHIP_STM32F103RE is not set +# CONFIG_ARCH_CHIP_STM32F103RG is not set +# CONFIG_ARCH_CHIP_STM32F103V8 is not set +# CONFIG_ARCH_CHIP_STM32F103VB is not set +# CONFIG_ARCH_CHIP_STM32F103VC is not set +# CONFIG_ARCH_CHIP_STM32F103VE is not set +# CONFIG_ARCH_CHIP_STM32F103ZE is not set +# CONFIG_ARCH_CHIP_STM32F105VB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set +# CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set +# CONFIG_ARCH_CHIP_STM32F207ZE is not set +# CONFIG_ARCH_CHIP_STM32F302K6 is not set +# CONFIG_ARCH_CHIP_STM32F302K8 is not set # CONFIG_ARCH_CHIP_STM32F302CB is not set # CONFIG_ARCH_CHIP_STM32F302CC is not set # CONFIG_ARCH_CHIP_STM32F302RB is not set @@ -151,6 +200,26 @@ CONFIG_SERIAL_TERMIOS=y # CONFIG_ARCH_CHIP_STM32F303RC is not set # CONFIG_ARCH_CHIP_STM32F303VB is not set # CONFIG_ARCH_CHIP_STM32F303VC is not set +# CONFIG_ARCH_CHIP_STM32F372C8 is not set +# CONFIG_ARCH_CHIP_STM32F372R8 is not set +# CONFIG_ARCH_CHIP_STM32F372V8 is not set +# CONFIG_ARCH_CHIP_STM32F372CB is not set +# CONFIG_ARCH_CHIP_STM32F372RB is not set +# CONFIG_ARCH_CHIP_STM32F372VB is not set +# CONFIG_ARCH_CHIP_STM32F372CC is not set +# CONFIG_ARCH_CHIP_STM32F372RC is not set +# CONFIG_ARCH_CHIP_STM32F372VC is not set +# CONFIG_ARCH_CHIP_STM32F373C8 is not set +# CONFIG_ARCH_CHIP_STM32F373R8 is not set +# CONFIG_ARCH_CHIP_STM32F373V8 is not set +# CONFIG_ARCH_CHIP_STM32F373CB is not set +# CONFIG_ARCH_CHIP_STM32F373RB is not set +# CONFIG_ARCH_CHIP_STM32F373VB is not set +# CONFIG_ARCH_CHIP_STM32F373CC is not set +# CONFIG_ARCH_CHIP_STM32F373RC is not set +# CONFIG_ARCH_CHIP_STM32F373VC is not set +# CONFIG_ARCH_CHIP_STM32F401RE is not set +# CONFIG_ARCH_CHIP_STM32F411RE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -163,24 +232,74 @@ CONFIG_SERIAL_TERMIOS=y CONFIG_ARCH_CHIP_STM32F427V=y # CONFIG_ARCH_CHIP_STM32F427Z is not set # CONFIG_ARCH_CHIP_STM32F427I is not set +# CONFIG_ARCH_CHIP_STM32F429V is not set +# CONFIG_ARCH_CHIP_STM32F429Z is not set +# CONFIG_ARCH_CHIP_STM32F429I is not set +# CONFIG_ARCH_CHIP_STM32F429B is not set +# CONFIG_ARCH_CHIP_STM32F429N is not set # CONFIG_STM32_STM32L15XX is not set # CONFIG_STM32_ENERGYLITE is not set # CONFIG_STM32_STM32F10XX is not set # CONFIG_STM32_VALUELINE is not set # CONFIG_STM32_CONNECTIVITYLINE is not set # CONFIG_STM32_PERFORMANCELINE is not set +# CONFIG_STM32_USBACCESSLINE is not set # CONFIG_STM32_HIGHDENSITY is not set # CONFIG_STM32_MEDIUMDENSITY is not set # CONFIG_STM32_LOWDENSITY is not set # CONFIG_STM32_STM32F20XX is not set +# CONFIG_STM32_STM32F205 is not set +# CONFIG_STM32_STM32F207 is not set # CONFIG_STM32_STM32F30XX is not set +# CONFIG_STM32_STM32F37XX is not set CONFIG_STM32_STM32F40XX=y +# CONFIG_STM32_STM32F401 is not set +# CONFIG_STM32_STM32F411 is not set +# CONFIG_STM32_STM32F405 is not set +# CONFIG_STM32_STM32F407 is not set CONFIG_STM32_STM32F427=y +# CONFIG_STM32_STM32F429 is not set # CONFIG_STM32_DFU is not set # # STM32 Peripheral Support # +CONFIG_STM32_HAVE_CCM=y +# CONFIG_STM32_HAVE_USBDEV is not set +CONFIG_STM32_HAVE_OTGFS=y +CONFIG_STM32_HAVE_FSMC=y +CONFIG_STM32_HAVE_USART3=y +CONFIG_STM32_HAVE_UART4=y +CONFIG_STM32_HAVE_UART5=y +CONFIG_STM32_HAVE_USART6=y +CONFIG_STM32_HAVE_UART7=y +CONFIG_STM32_HAVE_UART8=y +CONFIG_STM32_HAVE_TIM1=y +CONFIG_STM32_HAVE_TIM5=y +CONFIG_STM32_HAVE_TIM6=y +CONFIG_STM32_HAVE_TIM7=y +CONFIG_STM32_HAVE_TIM8=y +CONFIG_STM32_HAVE_TIM9=y +CONFIG_STM32_HAVE_TIM10=y +CONFIG_STM32_HAVE_TIM11=y +CONFIG_STM32_HAVE_TIM12=y +CONFIG_STM32_HAVE_TIM13=y +CONFIG_STM32_HAVE_TIM14=y +# CONFIG_STM32_HAVE_TIM15 is not set +# CONFIG_STM32_HAVE_TIM16 is not set +# CONFIG_STM32_HAVE_TIM17 is not set +CONFIG_STM32_HAVE_ADC2=y +CONFIG_STM32_HAVE_ADC3=y +# CONFIG_STM32_HAVE_ADC4 is not set +CONFIG_STM32_HAVE_CAN1=y +CONFIG_STM32_HAVE_CAN2=y +CONFIG_STM32_HAVE_RNG=y +CONFIG_STM32_HAVE_ETHMAC=y +CONFIG_STM32_HAVE_SPI2=y +CONFIG_STM32_HAVE_SPI3=y +CONFIG_STM32_HAVE_SPI4=y +CONFIG_STM32_HAVE_SPI5=y +CONFIG_STM32_HAVE_SPI6=y CONFIG_STM32_ADC1=y # CONFIG_STM32_ADC2 is not set # CONFIG_STM32_ADC3 is not set @@ -237,9 +356,10 @@ CONFIG_STM32_UART7=y CONFIG_STM32_UART8=y # CONFIG_STM32_IWDG is not set CONFIG_STM32_WWDG=y -CONFIG_STM32_ADC=y +# CONFIG_STM32_ADC is not set CONFIG_STM32_SPI=y CONFIG_STM32_I2C=y +# CONFIG_STM32_NOEXT_VECTORS is not set # # Alternate Pin Mapping @@ -264,6 +384,7 @@ CONFIG_STM32_DMACAPABLE=y # CONFIG_STM32_TIM4_ADC is not set # CONFIG_STM32_TIM5_ADC is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration @@ -271,17 +392,25 @@ CONFIG_STM32_USART=y # Hot fix for lost data CONFIG_STM32_RXDMA_BUFFER_SIZE_OVERRIDE=256 # CONFIG_USART1_RS485 is not set +CONFIG_STM32_USART1_SERIALDRIVER=y CONFIG_USART1_RXDMA=y # CONFIG_USART2_RS485 is not set +CONFIG_STM32_USART2_SERIALDRIVER=y CONFIG_USART2_RXDMA=y # CONFIG_USART3_RS485 is not set +CONFIG_STM32_USART3_SERIALDRIVER=y CONFIG_USART3_RXDMA=y # CONFIG_UART7_RS485 is not set +CONFIG_STM32_USART7_SERIALDRIVER=y CONFIG_UART7_RXDMA=y # CONFIG_UART8_RS485 is not set +CONFIG_STM32_USART8_SERIALDRIVER=y CONFIG_UART8_RXDMA=y CONFIG_SERIAL_DISABLE_REORDERING=y +CONFIG_STM32_FLOWCONTROL_BROKEN=y CONFIG_STM32_USART_SINGLEWIRE=y +CONFIG_STM32_USART_BREAKS=y +CONFIG_STM32_SERIALBRK_BSDCOMPAT=y # # SPI Configuration @@ -292,36 +421,55 @@ CONFIG_STM32_USART_SINGLEWIRE=y # # I2C Configuration # +# CONFIG_STM32_I2C_ALT is not set # CONFIG_STM32_I2C_DYNTIMEO is not set CONFIG_STM32_I2CTIMEOSEC=0 CONFIG_STM32_I2CTIMEOMS=10 -CONFIG_STM32_I2CTIMEOTICKS=500 +CONFIG_STM32_I2CTIMEOTICKS=10 # CONFIG_STM32_I2C_DUTY16_9 is not set +# CONFIG_STM32_BBSRAM is not set +CONFIG_STM32_BBSRAM_FILES=4 +# CONFIG_STM32_SAVE_CRASHDUMP is not set +# CONFIG_STM32_HAVE_RTC_COUNTER is not set +# CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set # -# USB Host Configuration +# USB FS Host Configuration +# + +# +# USB HS Host Configuration +# + +# +# USB Host Debug Configuration # # # USB Device Configuration # -# -# External Memory Configuration -# - # # Architecture Options # # CONFIG_ARCH_NOINTC is not set # CONFIG_ARCH_VECNOTIRQ is not set CONFIG_ARCH_DMA=y -# CONFIG_ARCH_IRQPRIO is not set -# CONFIG_CUSTOM_STACK is not set -# CONFIG_ADDRENV is not set +CONFIG_ARCH_HAVE_IRQPRIO=y +# CONFIG_ARCH_L2CACHE is not set +# CONFIG_ARCH_HAVE_COHERENT_DCACHE is not set +# CONFIG_ARCH_HAVE_ADDRENV is not set +# CONFIG_ARCH_NEED_ADDRENV_MAPPING is not set CONFIG_ARCH_HAVE_VFORK=y +# CONFIG_ARCH_HAVE_MMU is not set +CONFIG_ARCH_HAVE_MPU=y +# CONFIG_ARCH_NAND_HWECC is not set +# CONFIG_ARCH_HAVE_EXTCLK is not set +# CONFIG_ARCH_USE_MPU is not set +# CONFIG_ARCH_IRQPRIO is not set CONFIG_ARCH_STACKDUMP=y # CONFIG_ENDIAN_BIG is not set +# CONFIG_ARCH_IDLE_CUSTOM is not set # CONFIG_ARCH_HAVE_RAMFUNCS is not set CONFIG_ARCH_HAVE_RAMVECTORS=y # CONFIG_ARCH_RAMVECTORS is not set @@ -331,10 +479,14 @@ CONFIG_ARCH_HAVE_RAMVECTORS=y # CONFIG_BOARD_LOOPSPERMSEC=16717 # CONFIG_ARCH_CALIBRATION is not set -CONFIG_DRAM_START=0x20000000 -CONFIG_DRAM_SIZE=262144 + +# +# Interrupt options +# CONFIG_ARCH_HAVE_INTERRUPTSTACK=y -CONFIG_ARCH_INTERRUPTSTACK=1500 +CONFIG_ARCH_INTERRUPTSTACK=670 +CONFIG_ARCH_HAVE_HIPRI_INTERRUPT=y +# CONFIG_ARCH_HIPRI_INTERRUPT is not set # # Boot options @@ -345,12 +497,26 @@ CONFIG_BOOT_RUNFROMFLASH=y # CONFIG_BOOT_RUNFROMSDRAM is not set # CONFIG_BOOT_COPYTORAM is not set +# +# Boot Memory Configuration +# +CONFIG_RAM_START=0x20000000 +CONFIG_RAM_SIZE=262144 +# CONFIG_ARCH_HAVE_SDRAM is not set + # # Board Selection # CONFIG_ARCH_BOARD_AEROCORE=y -CONFIG_ARCH_BOARD_CUSTOM=y -CONFIG_ARCH_BOARD="" +# CONFIG_ARCH_BOARD_CUSTOM is not set +CONFIG_ARCH_BOARD="aerocore" + +# +# Custom Board Configuration +# +# CONFIG_BOARD_CRASHDUMP is not set +# CONFIG_BOARD_CUSTOM_LEDS is not set +# CONFIG_BOARD_CUSTOM_BUTTONS is not set # # Common Board Options @@ -360,35 +526,83 @@ CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options # +CONFIG_LIB_BOARDCTL=y +# CONFIG_BOARDCTL_TSCTEST is not set +# CONFIG_BOARDCTL_ADCTEST is not set +# CONFIG_BOARDCTL_PWMTEST is not set +# CONFIG_BOARDCTL_GRAPHICS is not set +# CONFIG_BOARDCTL_IOCTL is not set # # RTOS Features # -# CONFIG_BOARD_INITIALIZE is not set -CONFIG_MSEC_PER_TICK=1 -CONFIG_RR_INTERVAL=0 -CONFIG_SCHED_INSTRUMENTATION=y -CONFIG_TASK_NAME_SIZE=24 -# CONFIG_SCHED_HAVE_PARENT is not set +# CONFIG_DISABLE_OS_API is not set + +# +# Clocks and Timers +# +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set +CONFIG_USEC_PER_TICK=1000 +# CONFIG_SYSTEM_TIME64 is not set +# CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=1970 CONFIG_START_MONTH=1 CONFIG_START_DAY=1 -CONFIG_DEV_CONSOLE=y +CONFIG_MAX_WDOGPARMS=2 +CONFIG_PREALLOC_WDOGS=50 +CONFIG_WDOG_INTRESERVE=4 +CONFIG_PREALLOC_TIMERS=50 + +# +# Tasks and Scheduling +# +# CONFIG_INIT_NONE is not set +CONFIG_INIT_ENTRYPOINT=y +# CONFIG_INIT_FILEPATH is not set +CONFIG_USER_ENTRYPOINT="nsh_main" +CONFIG_RR_INTERVAL=0 +CONFIG_TASK_NAME_SIZE=24 +CONFIG_MAX_TASKS=32 +# CONFIG_SCHED_HAVE_PARENT is not set +CONFIG_SCHED_WAITPID=y + +# +# Pthread Options +# # CONFIG_MUTEX_TYPES is not set -CONFIG_PRIORITY_INHERITANCE=y -CONFIG_SEM_PREALLOCHOLDERS=0 -CONFIG_SEM_NNESTPRIO=8 +CONFIG_NPTHREAD_KEYS=4 + +# +# Performance Monitoring +# +# CONFIG_SCHED_CPULOAD is not set +CONFIG_SCHED_INSTRUMENTATION=y + +# +# Files and I/O +# +CONFIG_DEV_CONSOLE=y # CONFIG_FDCLONE_DISABLE is not set CONFIG_FDCLONE_STDIO=y CONFIG_SDCLONE_DISABLE=y -CONFIG_SCHED_WAITPID=y +CONFIG_NFILE_DESCRIPTORS=51 +CONFIG_NFILE_STREAMS=8 +CONFIG_NAME_MAX=32 +CONFIG_PRIORITY_INHERITANCE=y +CONFIG_SEM_PREALLOCHOLDERS=0 +CONFIG_SEM_NNESTPRIO=8 + +# +# RTOS hooks +# +# CONFIG_BOARD_INITIALIZE is not set # CONFIG_SCHED_STARTHOOK is not set CONFIG_SCHED_ATEXIT=y CONFIG_SCHED_ATEXIT_MAX=1 # CONFIG_SCHED_ONEXIT is not set -CONFIG_USER_ENTRYPOINT="nsh_main" -# CONFIG_DISABLE_OS_API is not set # # Signal Numbers @@ -400,27 +614,34 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 CONFIG_SIG_SIGWORK=4 # -# Sizes of configurable things (0 disables) +# POSIX Message Queue Options # -CONFIG_MAX_TASKS=32 -CONFIG_MAX_TASK_ARGS=10 -CONFIG_NPTHREAD_KEYS=4 -CONFIG_NFILE_DESCRIPTORS=42 -CONFIG_NFILE_STREAMS=8 -CONFIG_NAME_MAX=32 CONFIG_PREALLOC_MQ_MSGS=4 CONFIG_MQ_MAXMSGSIZE=32 -CONFIG_MAX_WDOGPARMS=2 -CONFIG_PREALLOC_WDOGS=50 -CONFIG_PREALLOC_TIMERS=50 + +# +# Work Queue Support +# +CONFIG_SCHED_WORKQUEUE=y +CONFIG_SCHED_HPWORK=y +CONFIG_SCHED_HPWORKPRIORITY=192 +CONFIG_SCHED_HPWORKPERIOD=5000 +CONFIG_SCHED_HPWORKSTACKSIZE=1800 +CONFIG_SCHED_LPWORK=y +CONFIG_SCHED_LPNTHREADS=1 +CONFIG_SCHED_LPWORKPRIORITY=50 +CONFIG_SCHED_LPWORKPRIOMAX=176 +CONFIG_SCHED_LPWORKPERIOD=50000 +CONFIG_SCHED_LPWORKSTACKSIZE=2000 # # Stack and heap information # -CONFIG_IDLETHREAD_STACKSIZE=1000 +CONFIG_IDLETHREAD_STACKSIZE=500 CONFIG_USERMAIN_STACKSIZE=3000 CONFIG_PTHREAD_STACK_MIN=512 CONFIG_PTHREAD_STACK_DEFAULT=2048 +# CONFIG_LIB_SYSCALL is not set # # Device Drivers @@ -429,25 +650,43 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set # CONFIG_LOOP is not set + +# +# Buffering +# +# CONFIG_DRVR_WRITEBUFFER is not set +# CONFIG_DRVR_READAHEAD is not set # CONFIG_RAMDISK is not set # CONFIG_CAN is not set +# CONFIG_ARCH_HAVE_PWM_PULSECOUNT is not set # CONFIG_PWM is not set +CONFIG_ARCH_HAVE_I2CRESET=y CONFIG_I2C=y # CONFIG_I2C_SLAVE is not set CONFIG_I2C_TRANSFER=y # CONFIG_I2C_WRITEREAD is not set # CONFIG_I2C_POLLED is not set # CONFIG_I2C_TRACE is not set -CONFIG_ARCH_HAVE_I2CRESET=y CONFIG_I2C_RESET=y CONFIG_SPI=y # CONFIG_SPI_OWNBUS is not set CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_CMDDATA is not set +# CONFIG_SPI_CALLBACK is not set +# CONFIG_SPI_BITBANG is not set +# CONFIG_I2S is not set + +# +# Timer Driver Support +# +# CONFIG_TIMER is not set # CONFIG_RTC is not set CONFIG_WATCHDOG=y +CONFIG_WATCHDOG_DEVPATH="/dev/watchdog0" +# CONFIG_TIMERS_CS2100CP is not set # CONFIG_ANALOG is not set # CONFIG_AUDIO_DEVICES is not set +# CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_LCD is not set @@ -458,41 +697,77 @@ CONFIG_MTD=y # MTD Configuration # CONFIG_MTD_PARTITION=y +# CONFIG_MTD_SECT512 is not set CONFIG_MTD_BYTE_WRITE=y +# CONFIG_MTD_CONFIG is not set # # MTD Device Drivers # +# CONFIG_MTD_NAND is not set # CONFIG_RAMMTD is not set # CONFIG_MTD_AT24XX is not set +# CONFIG_MTD_AT25 is not set # CONFIG_MTD_AT45DB is not set # CONFIG_MTD_M25P is not set # CONFIG_MTD_SMART is not set CONFIG_MTD_RAMTRON=y -CONFIG_RAMTRON_FUJITSU=y +CONFIG_RAMTRON_WRITEWAIT=y +CONFIG_RAMTRON_SETSPEED=y # CONFIG_MTD_SST25 is not set +# CONFIG_MTD_SST25XX is not set # CONFIG_MTD_SST39FV is not set # CONFIG_MTD_W25 is not set +# CONFIG_EEPROM is not set CONFIG_PIPES=y +CONFIG_DEV_PIPE_MAXSIZE=1024 +CONFIG_DEV_PIPE_SIZE=1024 +CONFIG_DEV_FIFO_SIZE=0 # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set +# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -CONFIG_ARCH_HAVE_UART7=y -CONFIG_ARCH_HAVE_UART8=y -CONFIG_ARCH_HAVE_USART1=y -CONFIG_ARCH_HAVE_USART2=y -CONFIG_ARCH_HAVE_USART3=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +CONFIG_UART7_SERIALDRIVER=y +CONFIG_UART8_SERIALDRIVER=y +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +CONFIG_USART2_SERIALDRIVER=y +CONFIG_USART3_SERIALDRIVER=y +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set + +# +# USART Configuration +# CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y CONFIG_SERIAL_NPOLLWAITERS=2 +# CONFIG_SERIAL_IFLOWCONTROL is not set +# CONFIG_SERIAL_OFLOWCONTROL is not set +CONFIG_ARCH_HAVE_SERIAL_TERMIOS=y # CONFIG_USART1_SERIAL_CONSOLE is not set # CONFIG_USART2_SERIAL_CONSOLE is not set # CONFIG_USART3_SERIAL_CONSOLE is not set # CONFIG_UART7_SERIAL_CONSOLE is not set CONFIG_UART8_SERIAL_CONSOLE=y +# CONFIG_OTHER_SERIAL_CONSOLE is not set # CONFIG_NO_SERIAL_CONSOLE is not set # @@ -554,8 +829,6 @@ CONFIG_UART8_PARITY=0 CONFIG_UART8_2STOP=0 # CONFIG_UART8_IFLOWCONTROL is not set # CONFIG_UART8_OFLOWCONTROL is not set -# CONFIG_SERIAL_IFLOWCONTROL is not set -# CONFIG_SERIAL_OFLOWCONTROL is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set # CONFIG_WIRELESS is not set @@ -568,12 +841,20 @@ CONFIG_UART8_2STOP=0 # System Logging # # CONFIG_RAMLOG is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support # +# CONFIG_ARCH_HAVE_NET is not set +# CONFIG_ARCH_HAVE_PHY is not set # CONFIG_NET is not set +# +# Crypto API +# +# CONFIG_CRYPTO is not set + # # File Systems # @@ -582,6 +863,13 @@ CONFIG_UART8_2STOP=0 # File system configuration # # CONFIG_DISABLE_MOUNTPOINT is not set +# CONFIG_FS_AUTOMOUNTER is not set +# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set +CONFIG_FS_READABLE=y +CONFIG_FS_WRITABLE=y +# CONFIG_FS_AIO is not set +# CONFIG_FS_NAMED_SEMAPHORES is not set +CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # CONFIG_FS_RAMMAP is not set CONFIG_FS_FAT=y CONFIG_FAT_LCNAMES=y @@ -593,12 +881,14 @@ CONFIG_FAT_DMAMEMORY=y CONFIG_FS_ROMFS=y # CONFIG_FS_SMARTFS is not set CONFIG_FS_BINFS=y +# CONFIG_FS_PROCFS is not set +# CONFIG_FS_UNIONFS is not set # # System Logging # -# CONFIG_SYSLOG_ENABLE is not set # CONFIG_SYSLOG is not set +# CONFIG_SYSLOG_TIMESTAMP is not set # # Graphics Support @@ -608,9 +898,9 @@ CONFIG_FS_BINFS=y # # Memory Management # -# CONFIG_MM_MULTIHEAP is not set # CONFIG_MM_SMALL is not set CONFIG_MM_REGIONS=2 +# CONFIG_ARCH_HAVE_HEAP2 is not set CONFIG_GRAN=y # CONFIG_GRAN_SINGLE is not set # CONFIG_GRAN_INTR is not set @@ -621,7 +911,7 @@ CONFIG_GRAN=y # CONFIG_AUDIO is not set # -# Binary Formats +# Binary Loader # # CONFIG_BINFMT_DISABLE is not set # CONFIG_BINFMT_EXEPATH is not set @@ -644,6 +934,8 @@ CONFIG_NUNGET_CHARS=2 CONFIG_LIB_HOMEDIR="/" # CONFIG_NOPRINTF_FIELDWIDTH is not set CONFIG_LIBC_FLOATINGPOINT=y +CONFIG_LIBC_LONG_LONG=y +# CONFIG_LIBC_IOCTL_VARIADIC is not set CONFIG_LIB_RAND_ORDER=1 # CONFIG_EOL_IS_CR is not set # CONFIG_EOL_IS_LF is not set @@ -655,7 +947,11 @@ CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048 CONFIG_LIBC_STRERROR=y # CONFIG_LIBC_STRERROR_SHORT is not set # CONFIG_LIBC_PERROR_STDOUT is not set +CONFIG_LIBC_TMPDIR="/tmp" +CONFIG_LIBC_MAX_TMPFILE=32 CONFIG_ARCH_LOWPUTC=y +# CONFIG_LIBC_LOCALTIME is not set +CONFIG_TIME_EXTENDED=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set CONFIG_ARCH_OPTIMIZED_FUNCTIONS=y @@ -675,15 +971,6 @@ CONFIG_ARCH_MEMCPY=y # # Non-standard Library Support # -CONFIG_SCHED_WORKQUEUE=y -CONFIG_SCHED_HPWORK=y -CONFIG_SCHED_WORKPRIORITY=192 -CONFIG_SCHED_WORKPERIOD=5000 -CONFIG_SCHED_WORKSTACKSIZE=2000 -CONFIG_SCHED_LPWORK=y -CONFIG_SCHED_LPWORKPRIORITY=50 -CONFIG_SCHED_LPWORKPERIOD=50000 -CONFIG_SCHED_LPWORKSTACKSIZE=2000 # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -714,7 +1001,8 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # CONFIG_EXAMPLES_BUTTONS is not set # CONFIG_EXAMPLES_CAN is not set -# CONFIG_EXAMPLES_COMPOSITE is not set +# CONFIG_EXAMPLES_CONFIGDATA is not set +# CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_CXXTEST is not set # CONFIG_EXAMPLES_DHCPD is not set # CONFIG_EXAMPLES_ELF is not set @@ -726,30 +1014,35 @@ CONFIG_EXAMPLES_HELLO=y # CONFIG_EXAMPLES_HIDKBD is not set # CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_IGMP is not set -# CONFIG_EXAMPLES_LCDRW is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set CONFIG_EXAMPLES_MOUNT=y +# CONFIG_EXAMPLES_MOUNT_BLOCKDEVICE is not set +CONFIG_EXAMPLES_MOUNT_NSECTORS=2048 +CONFIG_EXAMPLES_MOUNT_SECTORSIZE=512 +CONFIG_EXAMPLES_MOUNT_RAMDEVNO=0 # CONFIG_EXAMPLES_MTDPART is not set # CONFIG_EXAMPLES_NRF24L01TERM is not set CONFIG_EXAMPLES_NSH=y +# CONFIG_EXAMPLES_NSH_CXXINITIALIZE is not set # CONFIG_EXAMPLES_NULL is not set # CONFIG_EXAMPLES_NX is not set -# CONFIG_EXAMPLES_NXCONSOLE is not set +# CONFIG_EXAMPLES_NXTERM is not set # CONFIG_EXAMPLES_NXFFS is not set -# CONFIG_EXAMPLES_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set # CONFIG_EXAMPLES_NXTEXT is not set # CONFIG_EXAMPLES_OSTEST is not set -# CONFIG_EXAMPLES_PASHELLO is not set # CONFIG_EXAMPLES_PIPE is not set +# CONFIG_EXAMPLES_PPPD is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_QENCODER is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_ROMFS is not set # CONFIG_EXAMPLES_SENDMAIL is not set +# CONFIG_EXAMPLES_SERIALBLASTER is not set +# CONFIG_EXAMPLES_SERIALRX is not set # CONFIG_EXAMPLES_SERLOOP is not set # CONFIG_EXAMPLES_SLCD is not set # CONFIG_EXAMPLES_SMART_TEST is not set @@ -759,10 +1052,9 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_THTTPD is not set # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set -# CONFIG_EXAMPLES_UDP is not set -# CONFIG_EXAMPLES_UIP is not set +# CONFIG_EXAMPLES_WEBSERVER is not set +# CONFIG_EXAMPLES_UNIONFS is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set @@ -770,12 +1062,15 @@ CONFIG_EXAMPLES_NSH=y # Graphics Support # # CONFIG_TIFF is not set +# CONFIG_GRAPHICS_TRAVELER is not set # # Interpreters # +# CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set # CONFIG_INTERPRETERS_PCODE is not set +# CONFIG_INTERPRETERS_MICROPYTHON is not set # # Network Utilities @@ -785,18 +1080,10 @@ CONFIG_EXAMPLES_NSH=y # Networking Utilities # # CONFIG_NETUTILS_CODECS is not set -# CONFIG_NETUTILS_DHCPC is not set -# CONFIG_NETUTILS_DHCPD is not set # CONFIG_NETUTILS_FTPC is not set -# CONFIG_NETUTILS_FTPD is not set # CONFIG_NETUTILS_JSON is not set -# CONFIG_NETUTILS_RESOLV is not set # CONFIG_NETUTILS_SMTP is not set -# CONFIG_NETUTILS_TELNETD is not set -# CONFIG_NETUTILS_TFTPC is not set # CONFIG_NETUTILS_THTTPD is not set -# CONFIG_NETUTILS_UIPLIB is not set -# CONFIG_NETUTILS_WEBCLIENT is not set # # FreeModBus @@ -807,15 +1094,33 @@ CONFIG_EXAMPLES_NSH=y # NSH Library # CONFIG_NSH_LIBRARY=y + +# +# Command Line Configuration +# +CONFIG_NSH_READLINE=y +# CONFIG_NSH_CLE is not set +CONFIG_NSH_LINELEN=128 +# CONFIG_NSH_DISABLE_SEMICOLON is not set +CONFIG_NSH_CMDPARMS=y +CONFIG_NSH_MAXARGUMENTS=12 +CONFIG_NSH_ARGCAT=y +CONFIG_NSH_NESTDEPTH=8 +# CONFIG_NSH_DISABLEBG is not set CONFIG_NSH_BUILTIN_APPS=y # # Disable Individual commands # +# CONFIG_NSH_DISABLE_ADDROUTE is not set # CONFIG_NSH_DISABLE_CAT is not set # CONFIG_NSH_DISABLE_CD is not set # CONFIG_NSH_DISABLE_CP is not set +# CONFIG_NSH_DISABLE_CMP is not set +CONFIG_NSH_DISABLE_DATE=y # CONFIG_NSH_DISABLE_DD is not set +# CONFIG_NSH_DISABLE_DF is not set +# CONFIG_NSH_DISABLE_DELROUTE is not set # CONFIG_NSH_DISABLE_ECHO is not set # CONFIG_NSH_DISABLE_EXEC is not set # CONFIG_NSH_DISABLE_EXIT is not set @@ -834,10 +1139,9 @@ CONFIG_NSH_BUILTIN_APPS=y # CONFIG_NSH_DISABLE_MKRD is not set # CONFIG_NSH_DISABLE_MH is not set # CONFIG_NSH_DISABLE_MOUNT is not set +# CONFIG_NSH_DISABLE_MV is not set # CONFIG_NSH_DISABLE_MW is not set -# CONFIG_NSH_DISABLE_NSFMOUNT is not set # CONFIG_NSH_DISABLE_PS is not set -# CONFIG_NSH_DISABLE_PING is not set # CONFIG_NSH_DISABLE_PUT is not set # CONFIG_NSH_DISABLE_PWD is not set # CONFIG_NSH_DISABLE_RM is not set @@ -857,30 +1161,35 @@ CONFIG_NSH_BUILTIN_APPS=y # # CONFIG_NSH_CMDOPT_DF_H is not set CONFIG_NSH_CODECS_BUFSIZE=128 +CONFIG_NSH_CMDOPT_HEXDUMP=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_STRERROR=y -CONFIG_NSH_LINELEN=128 -CONFIG_NSH_MAXARGUMENTS=12 -CONFIG_NSH_NESTDEPTH=8 + +# +# Scripting Support +# # CONFIG_NSH_DISABLESCRIPT is not set -# CONFIG_NSH_DISABLEBG is not set +# CONFIG_NSH_DISABLE_ITEF is not set +# CONFIG_NSH_DISABLE_LOOPS is not set CONFIG_NSH_ROMFSETC=y # CONFIG_NSH_ROMFSRC is not set CONFIG_NSH_ROMFSMOUNTPT="/etc" CONFIG_NSH_INITSCRIPT="init.d/rcS" CONFIG_NSH_ROMFSDEVNO=0 CONFIG_NSH_ROMFSSECTSIZE=128 +# CONFIG_NSH_DEFAULTROMFS is not set CONFIG_NSH_ARCHROMFS=y +# CONFIG_NSH_CUSTOMROMFS is not set CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 CONFIG_NSH_FATMOUNTPT="/tmp" -CONFIG_NSH_CONSOLE=y # -# USB Trace Support +# Console Configuration # -# CONFIG_NSH_CONDEV is not set +CONFIG_NSH_CONSOLE=y +# CONFIG_NSH_ALTCONDEV is not set CONFIG_NSH_ARCHINIT=y # @@ -888,17 +1197,20 @@ CONFIG_NSH_ARCHINIT=y # # -# System NSH Add-Ons +# Platform-specific Support # +# CONFIG_PLATFORM_CONFIGDATA is not set # -# Custom Free Memory Command +# System Libraries and NSH Add-Ons # # CONFIG_SYSTEM_FREE is not set - -# -# I2C tool -# +CONFIG_SYSTEM_CLE=y +CONFIG_SYSTEM_CLE_DEBUGLEVEL=0 +# CONFIG_SYSTEM_CUTERM is not set +# CONFIG_SYSTEM_INSTALL is not set +# CONFIG_SYSTEM_FLASH_ERASEALL is not set +# CONFIG_SYSTEM_HEX2BIN is not set CONFIG_SYSTEM_I2CTOOL=y CONFIG_I2CTOOL_MINBUS=0 CONFIG_I2CTOOL_MAXBUS=3 @@ -906,43 +1218,16 @@ CONFIG_I2CTOOL_MINADDR=0x03 CONFIG_I2CTOOL_MAXADDR=0x77 CONFIG_I2CTOOL_MAXREGADDR=0xff CONFIG_I2CTOOL_DEFFREQ=4000000 - -# -# FLASH Program Installation -# -# CONFIG_SYSTEM_INSTALL is not set - -# -# FLASH Erase-all Command -# -# CONFIG_SYSTEM_FLASH_ERASEALL is not set - -# -# readline() -# +# CONFIG_SYSTEM_INIFILE is not set +# CONFIG_SYSTEM_RAMTEST is not set CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y - -# -# Power Off -# # CONFIG_SYSTEM_POWEROFF is not set - -# -# RAMTRON -# # CONFIG_SYSTEM_RAMTRON is not set - -# -# SD Card -# # CONFIG_SYSTEM_SDCARD is not set - -# -# Sysinfo -# +# CONFIG_SYSTEM_SUDOKU is not set CONFIG_SYSTEM_SYSINFO=y - -# -# USB Monitor -# +CONFIG_SYSTEM_SYSINFO_STACKSIZE=1024 +# CONFIG_SYSTEM_VI is not set +# CONFIG_SYSTEM_STACKMONITOR is not set +# CONFIG_SYSTEM_ZMODEM is not set diff --git a/nuttx-configs/aerocore/nsh/setenv.sh b/nuttx-configs/aerocore/nsh/setenv.sh index 2327f38a1b..da86cdb38f 100755 --- a/nuttx-configs/aerocore/nsh/setenv.sh +++ b/nuttx-configs/aerocore/nsh/setenv.sh @@ -1,5 +1,5 @@ #!/bin/bash -# configs/aerocore/nsh/setenv.sh +# nuttx-configs/aerocore/nsh/setenv.sh # # Copyright (C) 2011 Gregory Nutt. All rights reserved. # Author: Gregory Nutt diff --git a/nuttx-configs/aerocore/scripts/ld.script b/nuttx-configs/aerocore/scripts/ld.script index 968d3127ff..107aca6b26 100644 --- a/nuttx-configs/aerocore/scripts/ld.script +++ b/nuttx-configs/aerocore/scripts/ld.script @@ -1,5 +1,5 @@ /**************************************************************************** - * configs/aerocore/common/ld.script + * nuttx-configs/aerocore/scripts/ld.script * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/nuttx-configs/aerocore/src/Makefile b/nuttx-configs/aerocore/src/Makefile index 859ba4ab23..94393d43c5 100644 --- a/nuttx-configs/aerocore/src/Makefile +++ b/nuttx-configs/aerocore/src/Makefile @@ -1,5 +1,4 @@ ############################################################################ -# configs/aerocore/src/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. # Author: Gregory Nutt @@ -80,5 +79,9 @@ distclean: clean $(call DELFILE, Make.dep) $(call DELFILE, .depend) +ifneq ($(BOARD_CONTEXT),y) +context: +endif + -include Make.dep diff --git a/src/drivers/boards/aerocore/CMakeLists.txt b/src/drivers/boards/aerocore/CMakeLists.txt index 77e1ebf968..2933d7d016 100644 --- a/src/drivers/boards/aerocore/CMakeLists.txt +++ b/src/drivers/boards/aerocore/CMakeLists.txt @@ -35,6 +35,7 @@ px4_add_module( COMPILE_FLAGS SRCS ../common/board_name.c + ../common/board_dma_alloc.c aerocore_init.c aerocore_timer_config.c aerocore_spi.c diff --git a/src/drivers/boards/aerocore/aerocore_init.c b/src/drivers/boards/aerocore/aerocore_init.c index 0a58f4a845..26421eaa2f 100644 --- a/src/drivers/boards/aerocore/aerocore_init.c +++ b/src/drivers/boards/aerocore/aerocore_init.c @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2012 PX4 Development Team. All rights reserved. + * Copyright (c) 2012-2015 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -35,10 +35,10 @@ * @file aerocore_init.c * * AeroCore-specific early startup code. This file implements the - * nsh_archinitialize() function that is called early by nsh during startup. + * board_app_initialize() function that is called early by nsh during startup. * * Code here is run before the rcS script is invoked; it should start required - * subsystems and perform board-specific initialisation. + * subsystems and perform board-specific initialization. */ /**************************************************************************** @@ -53,11 +53,11 @@ #include #include -#include -#include +#include +#include +#include #include #include -#include #include #include "board_config.h" @@ -71,6 +71,10 @@ #include #include +#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) +#include +#endif + /**************************************************************************** * Pre-Processor Definitions ****************************************************************************/ @@ -81,13 +85,13 @@ #ifdef CONFIG_CPP_HAVE_VARARGS # ifdef CONFIG_DEBUG -# define message(...) lowsyslog(__VA_ARGS__) +# define message(...) syslog(__VA_ARGS__) # else # define message(...) printf(__VA_ARGS__) # endif #else # ifdef CONFIG_DEBUG -# define message lowsyslog +# define message syslog # else # define message printf # endif @@ -110,72 +114,10 @@ __END_DECLS * Protected Functions ****************************************************************************/ -#if defined(CONFIG_FAT_DMAMEMORY) -# if !defined(CONFIG_GRAN) || !defined(CONFIG_FAT_DMAMEMORY) -# error microSD DMA support requires CONFIG_GRAN -# endif - -static GRAN_HANDLE dma_allocator; - -/* - * The DMA heap size constrains the total number of things that can be - * ready to do DMA at a time. - * - * For example, FAT DMA depends on one sector-sized buffer per filesystem plus - * one sector-sized buffer per file. - * - * We use a fundamental alignment / granule size of 64B; this is sufficient - * to guarantee alignment for the largest STM32 DMA burst (16 beats x 32bits). - */ -static uint8_t g_dma_heap[8192] __attribute__((aligned(64))); -static perf_counter_t g_dma_perf; - -static void -dma_alloc_init(void) -{ - dma_allocator = gran_initialize(g_dma_heap, - sizeof(g_dma_heap), - 7, /* 128B granule - must be > alignment (XXX bug?) */ - 6); /* 64B alignment */ - - if (dma_allocator == NULL) { - message("DMA alloc FAILED"); - - } else { - g_dma_perf = perf_alloc(PC_COUNT, "dma_alloc"); - } -} - /**************************************************************************** * Public Functions ****************************************************************************/ -/* - * DMA-aware allocator stubs for the FAT filesystem. - */ - -__EXPORT void *fat_dma_alloc(size_t size); -__EXPORT void fat_dma_free(FAR void *memory, size_t size); - -void * -fat_dma_alloc(size_t size) -{ - perf_count(g_dma_perf); - return gran_alloc(dma_allocator, size); -} - -void -fat_dma_free(FAR void *memory, size_t size) -{ - gran_free(dma_allocator, memory, size); -} - -#else - -# define dma_alloc_init() - -#endif - /************************************************************************************ * Name: stm32_boardinitialize * @@ -189,46 +131,65 @@ fat_dma_free(FAR void *memory, size_t size) __EXPORT void stm32_boardinitialize(void) { + /* configure ADC pins */ + + stm32_configgpio(GPIO_ADC1_IN10); /* used by VBUS valid */ + stm32_configgpio(GPIO_ADC1_IN11); /* J1 breakout */ + stm32_configgpio(GPIO_ADC1_IN12); /* J1 breakout */ + stm32_configgpio(GPIO_ADC1_IN13); /* J1 breakout */ + /* configure SPI interfaces */ + stm32_spiinitialize(); /* configure LEDs */ - up_ledinit(); + + board_autoled_initialize(); } /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ static struct spi_dev_s *spi3; static struct spi_dev_s *spi4; - -#include - -#ifdef __cplusplus -__EXPORT int matherr(struct __exception *e) +__EXPORT int board_app_initialize(uintptr_t arg) { - return 1; -} +#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) + + /* run C++ ctors before we go any further */ + + up_cxxinitialize(); + +# if defined(CONFIG_EXAMPLES_NSH_CXXINITIALIZE) +# error CONFIG_EXAMPLES_NSH_CXXINITIALIZE Must not be defined! Use CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE. +# endif + #else -__EXPORT int matherr(struct exception *e) -{ - return 1; -} +# error platform is dependent on c++ both CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE must be defined. #endif -__EXPORT int nsh_archinitialize(void) -{ - - /* configure ADC pins */ - px4_arch_configgpio(GPIO_ADC1_IN10); /* used by VBUS valid */ - px4_arch_configgpio(GPIO_ADC1_IN11); /* J1 breakout */ - px4_arch_configgpio(GPIO_ADC1_IN12); /* J1 breakout */ - px4_arch_configgpio(GPIO_ADC1_IN13); /* J1 breakout */ /* configure the high-resolution time/callout interface */ hrt_init(); @@ -236,6 +197,10 @@ __EXPORT int nsh_archinitialize(void) /* configure the DMA allocator */ dma_alloc_init(); + if (board_dma_alloc_init() < 0) { + message("DMA alloc FAILED"); + } + /* configure CPU load estimation */ #ifdef CONFIG_SCHED_INSTRUMENTATION cpuload_initialize_once(); @@ -263,11 +228,12 @@ __EXPORT int nsh_archinitialize(void) led_off(LED_AMBER); /* Configure Sensors on SPI bus #3 */ + spi3 = px4_spibus_initialize(3); if (!spi3) { message("[boot] FAILED to initialize SPI port 3\n"); - up_ledon(LED_AMBER); + board_autoled_on(LED_AMBER); return -ENODEV; } @@ -282,11 +248,12 @@ __EXPORT int nsh_archinitialize(void) message("[boot] Initialized SPI port 3 (SENSORS)\n"); /* Configure FRAM on SPI bus #4 */ + spi4 = px4_spibus_initialize(4); if (!spi4) { message("[boot] FAILED to initialize SPI port 4\n"); - up_ledon(LED_AMBER); + board_autoled_on(LED_AMBER); return -ENODEV; } diff --git a/src/drivers/boards/aerocore/aerocore_led.c b/src/drivers/boards/aerocore/aerocore_led.c index 91956e420b..89c6367419 100644 --- a/src/drivers/boards/aerocore/aerocore_led.c +++ b/src/drivers/boards/aerocore/aerocore_led.c @@ -63,19 +63,19 @@ __END_DECLS __EXPORT void led_init() { - px4_arch_configgpio(GPIO_LED0); - px4_arch_configgpio(GPIO_LED1); + stm32_configgpio(GPIO_LED0); + stm32_configgpio(GPIO_LED1); } __EXPORT void led_on(int led) { switch (led) { case 0: - px4_arch_gpiowrite(GPIO_LED0, true); + stm32_gpiowrite(GPIO_LED0, true); break; case 1: - px4_arch_gpiowrite(GPIO_LED1, true); + stm32_gpiowrite(GPIO_LED1, true); break; default: @@ -87,11 +87,11 @@ __EXPORT void led_off(int led) { switch (led) { case 0: - px4_arch_gpiowrite(GPIO_LED0, false); + stm32_gpiowrite(GPIO_LED0, false); break; case 1: - px4_arch_gpiowrite(GPIO_LED1, false); + stm32_gpiowrite(GPIO_LED1, false); break; default: @@ -103,21 +103,21 @@ __EXPORT void led_toggle(int led) { switch (led) { case 0: - if (px4_arch_gpioread(GPIO_LED0)) { - px4_arch_gpiowrite(GPIO_LED0, false); + if (stm32_gpioread(GPIO_LED0)) { + stm32_gpiowrite(GPIO_LED0, false); } else { - px4_arch_gpiowrite(GPIO_LED0, true); + stm32_gpiowrite(GPIO_LED0, true); } break; case 1: - if (px4_arch_gpioread(GPIO_LED1)) { - px4_arch_gpiowrite(GPIO_LED1, false); + if (stm32_gpioread(GPIO_LED1)) { + stm32_gpiowrite(GPIO_LED1, false); } else { - px4_arch_gpiowrite(GPIO_LED1, true); + stm32_gpiowrite(GPIO_LED1, true); } break; diff --git a/src/drivers/boards/aerocore/aerocore_spi.c b/src/drivers/boards/aerocore/aerocore_spi.c index c6015689c0..5d02088ac5 100644 --- a/src/drivers/boards/aerocore/aerocore_spi.c +++ b/src/drivers/boards/aerocore/aerocore_spi.c @@ -47,7 +47,7 @@ #include #include -#include +#include #include #include @@ -70,36 +70,36 @@ __EXPORT void stm32_spiinitialize(void) { #ifdef CONFIG_STM32_SPI1 - px4_arch_configgpio(GPIO_SPI1_NSS); - px4_arch_gpiowrite(GPIO_SPI1_NSS, 1); + stm32_configgpio(GPIO_SPI1_NSS); + stm32_gpiowrite(GPIO_SPI1_NSS, 1); #endif #ifdef CONFIG_STM32_SPI2 - px4_arch_configgpio(GPIO_SPI2_NSS); - px4_arch_gpiowrite(GPIO_SPI2_NSS, 1); + stm32_configgpio(GPIO_SPI2_NSS); + stm32_gpiowrite(GPIO_SPI2_NSS, 1); #endif #ifdef CONFIG_STM32_SPI3 - px4_arch_configgpio(GPIO_SPI_CS_GYRO); - px4_arch_configgpio(GPIO_SPI_CS_ACCEL_MAG); - px4_arch_configgpio(GPIO_SPI_CS_BARO); + stm32_configgpio(GPIO_SPI_CS_GYRO); + stm32_configgpio(GPIO_SPI_CS_ACCEL_MAG); + stm32_configgpio(GPIO_SPI_CS_BARO); /* De-activate all peripherals, * required for some peripheral * state machines */ - px4_arch_gpiowrite(GPIO_SPI_CS_GYRO, 1); - px4_arch_gpiowrite(GPIO_SPI_CS_ACCEL_MAG, 1); - px4_arch_gpiowrite(GPIO_SPI_CS_BARO, 1); + stm32_gpiowrite(GPIO_SPI_CS_GYRO, 1); + stm32_gpiowrite(GPIO_SPI_CS_ACCEL_MAG, 1); + stm32_gpiowrite(GPIO_SPI_CS_BARO, 1); - px4_arch_configgpio(GPIO_EXTI_GYRO_DRDY); - px4_arch_configgpio(GPIO_EXTI_MAG_DRDY); - px4_arch_configgpio(GPIO_EXTI_ACCEL_DRDY); + stm32_configgpio(GPIO_EXTI_GYRO_DRDY); + stm32_configgpio(GPIO_EXTI_MAG_DRDY); + stm32_configgpio(GPIO_EXTI_ACCEL_DRDY); #endif #ifdef CONFIG_STM32_SPI4 - px4_arch_configgpio(GPIO_SPI4_NSS); - px4_arch_gpiowrite(GPIO_SPI4_NSS, 1); + stm32_configgpio(GPIO_SPI4_NSS); + stm32_gpiowrite(GPIO_SPI4_NSS, 1); #endif } @@ -107,7 +107,7 @@ __EXPORT void stm32_spiinitialize(void) __EXPORT void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { /* there is only one device broken-out so select it */ - px4_arch_gpiowrite(GPIO_SPI1_NSS, !selected); + stm32_gpiowrite(GPIO_SPI1_NSS, !selected); } __EXPORT uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) @@ -120,7 +120,7 @@ __EXPORT uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devi __EXPORT void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { /* there is only one device broken-out so select it */ - px4_arch_gpiowrite(GPIO_SPI2_NSS, !selected); + stm32_gpiowrite(GPIO_SPI2_NSS, !selected); } __EXPORT uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) @@ -137,23 +137,23 @@ __EXPORT void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, switch (devid) { case PX4_SPIDEV_GYRO: /* Making sure the other peripherals are not selected */ - px4_arch_gpiowrite(GPIO_SPI_CS_GYRO, !selected); - px4_arch_gpiowrite(GPIO_SPI_CS_ACCEL_MAG, 1); - px4_arch_gpiowrite(GPIO_SPI_CS_BARO, 1); + stm32_gpiowrite(GPIO_SPI_CS_GYRO, !selected); + stm32_gpiowrite(GPIO_SPI_CS_ACCEL_MAG, 1); + stm32_gpiowrite(GPIO_SPI_CS_BARO, 1); break; case PX4_SPIDEV_ACCEL_MAG: /* Making sure the other peripherals are not selected */ - px4_arch_gpiowrite(GPIO_SPI_CS_GYRO, 1); - px4_arch_gpiowrite(GPIO_SPI_CS_ACCEL_MAG, !selected); - px4_arch_gpiowrite(GPIO_SPI_CS_BARO, 1); + stm32_gpiowrite(GPIO_SPI_CS_GYRO, 1); + stm32_gpiowrite(GPIO_SPI_CS_ACCEL_MAG, !selected); + stm32_gpiowrite(GPIO_SPI_CS_BARO, 1); break; case PX4_SPIDEV_BARO: /* Making sure the other peripherals are not selected */ - px4_arch_gpiowrite(GPIO_SPI_CS_GYRO, 1); - px4_arch_gpiowrite(GPIO_SPI_CS_ACCEL_MAG, 1); - px4_arch_gpiowrite(GPIO_SPI_CS_BARO, !selected); + stm32_gpiowrite(GPIO_SPI_CS_GYRO, 1); + stm32_gpiowrite(GPIO_SPI_CS_ACCEL_MAG, 1); + stm32_gpiowrite(GPIO_SPI_CS_BARO, !selected); break; default: @@ -172,7 +172,7 @@ __EXPORT uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devi __EXPORT void stm32_spi4select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { /* there can only be one device on this bus, so always select it */ - px4_arch_gpiowrite(GPIO_SPI4_NSS, !selected); + stm32_gpiowrite(GPIO_SPI4_NSS, !selected); } __EXPORT uint8_t stm32_spi4status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) diff --git a/src/drivers/boards/aerocore/board_config.h b/src/drivers/boards/aerocore/board_config.h index 84446e575b..9b12b7419a 100644 --- a/src/drivers/boards/aerocore/board_config.h +++ b/src/drivers/boards/aerocore/board_config.h @@ -47,10 +47,6 @@ #include #include -#include -#include - -#define UDID_START 0x1FFF7A10 /**************************************************************************************************** * Definitions @@ -215,25 +211,6 @@ extern void stm32_spiinitialize(void); #define board_peripheral_reset(ms) -/**************************************************************************** - * Name: nsh_archinitialize - * - * Description: - * Perform architecture specific initialization for NSH. - * - * CONFIG_NSH_ARCHINIT=y : - * Called from the NSH library - * - * CONFIG_BOARD_INITIALIZE=y, CONFIG_NSH_LIBRARY=y, && - * CONFIG_NSH_ARCHINIT=n : - * Called from board_initialize(). - * - ****************************************************************************/ - -#ifdef CONFIG_NSH_LIBRARY -int nsh_archinitialize(void); -#endif - #include "../common/board_common.h" #endif /* __ASSEMBLY__ */