From cd0a7c7294b4f2bfd1263374513a4e4fc3fcea36 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 30 Mar 2016 17:58:52 -0600 Subject: [PATCH] Remove the VSN configuration --- configs/Kconfig | 15 - configs/README.txt | 5 - configs/vsn/Kconfig | 4 - configs/vsn/README.txt | 308 ------- configs/vsn/include/board.h | 234 ------ configs/vsn/include/muxbus.h | 84 -- configs/vsn/include/nsh_romfsimg.h | 89 -- configs/vsn/include/rcS.template | 14 - configs/vsn/nsh/Make.defs | 121 --- configs/vsn/nsh/defconfig | 1259 ---------------------------- configs/vsn/nsh/setenv.sh | 46 - configs/vsn/scripts/ld.script | 117 --- configs/vsn/scripts/ld.script.dfu | 116 --- configs/vsn/src/.gitignore | 2 - configs/vsn/src/Makefile | 113 --- configs/vsn/src/README.txt | 58 -- configs/vsn/src/boot.c | 97 --- configs/vsn/src/buttons.c | 92 -- configs/vsn/src/chipcon.c | 79 -- configs/vsn/src/leds.c | 111 --- configs/vsn/src/muxbus.c | 198 ----- configs/vsn/src/power.c | 117 --- configs/vsn/src/rtac.c | 106 --- configs/vsn/src/sif.c | 690 --------------- configs/vsn/src/spi.c | 191 ----- configs/vsn/src/sysclock.c | 194 ----- configs/vsn/src/usbdev.c | 123 --- configs/vsn/src/usbmsc.c | 134 --- configs/vsn/src/vsn.h | 219 ----- 29 files changed, 4936 deletions(-) delete mode 100644 configs/vsn/Kconfig delete mode 100644 configs/vsn/README.txt delete mode 100644 configs/vsn/include/board.h delete mode 100644 configs/vsn/include/muxbus.h delete mode 100644 configs/vsn/include/nsh_romfsimg.h delete mode 100755 configs/vsn/include/rcS.template delete mode 100644 configs/vsn/nsh/Make.defs delete mode 100644 configs/vsn/nsh/defconfig delete mode 100755 configs/vsn/nsh/setenv.sh delete mode 100755 configs/vsn/scripts/ld.script delete mode 100755 configs/vsn/scripts/ld.script.dfu delete mode 100644 configs/vsn/src/.gitignore delete mode 100644 configs/vsn/src/Makefile delete mode 100644 configs/vsn/src/README.txt delete mode 100644 configs/vsn/src/boot.c delete mode 100644 configs/vsn/src/buttons.c delete mode 100644 configs/vsn/src/chipcon.c delete mode 100644 configs/vsn/src/leds.c delete mode 100644 configs/vsn/src/muxbus.c delete mode 100644 configs/vsn/src/power.c delete mode 100644 configs/vsn/src/rtac.c delete mode 100644 configs/vsn/src/sif.c delete mode 100644 configs/vsn/src/spi.c delete mode 100644 configs/vsn/src/sysclock.c delete mode 100644 configs/vsn/src/usbdev.c delete mode 100644 configs/vsn/src/usbmsc.c delete mode 100644 configs/vsn/src/vsn.h diff --git a/configs/Kconfig b/configs/Kconfig index ab82cc6ffb..f69f0055ea 100644 --- a/configs/Kconfig +++ b/configs/Kconfig @@ -1141,17 +1141,6 @@ config ARCH_BOARD_VIEWTOOL_STM32F107 board may be fitted with either: (1) STM32F107VCT6 or (2) STM32F103VCT6. See http://www.viewtool.com/ for further information. -config ARCH_BOARD_VSN - bool "SOTEL NetClamps VSN sensor network platform" - depends on ARCH_CHIP_STM32F103RE - select ARCH_HAVE_LEDS - select ARCH_HAVE_BUTTONS - select ARCH_HAVE_POWEROFF - ---help--- - ISOTEL NetClamps VSN V1.2 ready2go sensor network platform based on the - STMicro STM32F103RET6. Contributed by Uros Platise. See - http://isotel.eu/NetClamps/ - config ARCH_BOARD_XTRS bool "XTRS TRS80 Model 3 emulation" depends on ARCH_CHIP_Z80 @@ -1432,7 +1421,6 @@ config ARCH_BOARD default "ubw32" if ARCH_BOARD_UBW32 default "us7032evb1" if ARCH_BOARD_US7032EVB1 default "viewtool-stm32f107" if ARCH_BOARD_VIEWTOOL_STM32F107 - default "vsn" if ARCH_BOARD_VSN default "xtrs" if ARCH_BOARD_XTRS default "z16f2800100zcog" if ARCH_BOARD_Z16F2800100ZCOG default "z80sim" if ARCH_BOARD_Z80SIM @@ -1830,9 +1818,6 @@ endif if ARCH_BOARD_VIEWTOOL_STM32F107 source "configs/viewtool-stm32f107/Kconfig" endif -if ARCH_BOARD_VSN -source "configs/vsn/Kconfig" -endif if ARCH_BOARD_XTRS source "configs/xtrs/Kconfig" endif diff --git a/configs/README.txt b/configs/README.txt index 35f038a7d2..ebd2a78bb5 100644 --- a/configs/README.txt +++ b/configs/README.txt @@ -724,11 +724,6 @@ configs/viewtool-stm32f107 board may be fitted with either: (1) STM32F107VCT6 or (2) STM32F103VCT6. See http://www.viewtool.com/ for further information. -configs/vsn - ISOTEL NetClamps VSN V1.2 ready2go sensor network platform based on the - STMicro STM32F103RET6. Contributed by Uros Platise. See - http://isotel.eu/NetClamps/ - configs/xtrs TRS80 Model 3. This port uses a vintage computer based on the Z80. An emulator for this computer is available to run TRS80 programs on a diff --git a/configs/vsn/Kconfig b/configs/vsn/Kconfig deleted file mode 100644 index f72f3c094c..0000000000 --- a/configs/vsn/Kconfig +++ /dev/null @@ -1,4 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# diff --git a/configs/vsn/README.txt b/configs/vsn/README.txt deleted file mode 100644 index ffb33a708f..0000000000 --- a/configs/vsn/README.txt +++ /dev/null @@ -1,308 +0,0 @@ -README -^^^^^^ - -This README discusses issues unique to NuttX configurations for the -ISOTEL NetClamps VSN V1.2 ready2go sensor network platform. -More information can be found at http://www.netclamps.com - -Contents -^^^^^^^^ - - - Development Environment - - GNU Toolchain Options - - IDEs - - NuttX EABI "buildroot" Toolchain - - NuttX OABI "buildroot" Toolchain - - NXFLAT Toolchain - - DFU - - LEDs - - VSN-specific Configuration Options - - Configurations - -Development Environment -^^^^^^^^^^^^^^^^^^^^^^^ - - Either Linux or Cygwin on Windows can be used for the development environment. - The source has been built only using the GNU toolchain (see below). Other - toolchains will likely cause problems. Testing was performed using the Cygwin - environment. - -GNU Toolchain Options -^^^^^^^^^^^^^^^^^^^^^ - - The NuttX make system has been modified to support the following different - toolchain options. - - 1. The CodeSourcery GNU toolchain, - 2. The devkitARM GNU toolchain, - 3. Raisonance GNU toolchain, or - 4. The NuttX buildroot Toolchain (see below). - - All testing has been conducted using the NuttX buildroot toolchain. However, - the make system is setup to default to use the devkitARM toolchain. To use - the CodeSourcery, devkitARM or Raisonance GNU toolchain, you simply need to - add one of the following configuration options to your .config (or defconfig) - file: - - CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW=y : CodeSourcery under Windows - CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL=y : CodeSourcery under Linux - CONFIG_ARMV7M_TOOLCHAIN_DEVKITARM=y : devkitARM under Windows - CONFIG_ARMV7M_TOOLCHAIN_RAISONANCE=y : Raisonance RIDE7 under Windows - CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=y : NuttX buildroot under Linux or Cygwin (default) - - If you are not using CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT, then you may also have to modify - the PATH in the setenv.h file if your make cannot find the tools. - - NOTE: the CodeSourcery (for Windows), devkitARM, and Raisonance toolchains are - Windows native toolchains. The CodeSourcey (for Linux) and NuttX buildroot - toolchains are Cygwin and/or Linux native toolchains. There are several limitations - to using a Windows based toolchain in a Cygwin environment. The three biggest are: - - 1. The Windows toolchain cannot follow Cygwin paths. Path conversions are - performed automatically in the Cygwin makefiles using the 'cygpath' utility - but you might easily find some new path problems. If so, check out 'cygpath -w' - - 2. Windows toolchains cannot follow Cygwin symbolic links. Many symbolic links - are used in Nuttx (e.g., include/arch). The make system works around these - problems for the Windows tools by copying directories instead of linking them. - But this can also cause some confusion for you: For example, you may edit - a file in a "linked" directory and find that your changes had no effect. - That is because you are building the copy of the file in the "fake" symbolic - directory. If you use a Windows toolchain, you should get in the habit of - making like this: - - make clean_context all - - An alias in your .bashrc file might make that less painful. - - NOTE 1: The CodeSourcery toolchain (2009q1) does not work with default optimization - level of -Os (See Make.defs). It will work with -O0, -O1, or -O2, but not with - -Os. - - NOTE 2: The devkitARM toolchain includes a version of MSYS make. Make sure that - the paths to Cygwin's /bin and /usr/bin directories appear BEFORE the devkitARM - path or will get the wrong version of make. - -IDEs -^^^^ - - NuttX is built using command-line make. It can be used with an IDE, but some - effort will be required to create the project. - - Makefile Build - -------------- - Under Eclipse, it is pretty easy to set up an "empty makefile project" and - simply use the NuttX makefile to build the system. That is almost for free - under Linux. Under Windows, you will need to set up the "Cygwin GCC" empty - makefile project in order to work with Windows (Google for "Eclipse Cygwin" - - there is a lot of help on the internet). - - Native Build - ------------ - Here are a few tips before you start that effort: - - 1) Select the toolchain that you will be using in your .config file - 2) Start the NuttX build at least one time from the Cygwin command line - before trying to create your project. This is necessary to create - certain auto-generated files and directories that will be needed. - 3) Set up include pathes: You will need include/, arch/arm/src/stm32, - arch/arm/src/common, arch/arm/src/armv7-m, and sched/. - 4) All assembly files need to have the definition option -D __ASSEMBLY__ - on the command line. - - Startup files will probably cause you some headaches. The NuttX startup file - is arch/arm/src/stm32/stm32_vectors.S. You may have to build NuttX - one time from the Cygwin command line in order to obtain the pre-built - startup object needed by an IDE. - -NuttX EABI "buildroot" Toolchain -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - A GNU GCC-based toolchain is assumed. The files */setenv.sh should - be modified to point to the correct path to the Cortex-M3 GCC toolchain (if - different from the default in your PATH variable). - - If you have no Cortex-M3 toolchain, one can be downloaded from the NuttX - Bitbucket download site (https://bitbucket.org/nuttx/buildroot/downloads/). - This GNU toolchain builds and executes in the Linux or Cygwin environment. - - 1. You must have already configured Nuttx in /nuttx. - - cd tools - ./configure.sh vsn/ - - 2. Download the latest buildroot package into - - 3. unpack the buildroot tarball. The resulting directory may - have versioning information on it like buildroot-x.y.z. If so, - rename /buildroot-x.y.z to /buildroot. - - 4. cd /buildroot - - 5. cp configs/cortexm3-eabi-defconfig-4.6.3 .config - - 6. make oldconfig - - 7. make - - 8. Edit setenv.h, if necessary, so that the PATH variable includes - the path to the newly built binaries. - - See the file configs/README.txt in the buildroot source tree. That has more - details PLUS some special instructions that you will need to follow if you are - building a Cortex-M3 toolchain for Cygwin under Windows. - - NOTE: Unfortunately, the 4.6.3 EABI toolchain is not compatible with the - the NXFLAT tools. See the top-level TODO file (under "Binary loaders") for - more information about this problem. If you plan to use NXFLAT, please do not - use the GCC 4.6.3 EABI toochain; instead use the GCC 4.3.3 OABI toolchain. - See instructions below. - -NuttX OABI "buildroot" Toolchain -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - The older, OABI buildroot toolchain is also available. To use the OABI - toolchain: - - 1. When building the buildroot toolchain, either (1) modify the cortexm3-eabi-defconfig-4.6.3 - configuration to use EABI (using 'make menuconfig'), or (2) use an exising OABI - configuration such as cortexm3-defconfig-4.3.3 - - 2. Modify the Make.defs file to use the OABI conventions: - - +CROSSDEV = arm-nuttx-elf- - +ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft - +NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-gotoff.ld -no-check-sections - -CROSSDEV = arm-nuttx-eabi- - -ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft - -NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections - -NXFLAT Toolchain -^^^^^^^^^^^^^^^^ - - If you are *not* using the NuttX buildroot toolchain and you want to use - the NXFLAT tools, then you will still have to build a portion of the buildroot - tools -- just the NXFLAT tools. The buildroot with the NXFLAT tools can - be downloaded from the NuttX Bitbucket download site - (https://bitbucket.org/patacongo/nuttx/downloads/). - - This GNU toolchain builds and executes in the Linux or Cygwin environment. - - 1. You must have already configured Nuttx in /nuttx. - - cd tools - ./configure.sh lpcxpresso-lpc1768/ - - 2. Download the latest buildroot package into - - 3. unpack the buildroot tarball. The resulting directory may - have versioning information on it like buildroot-x.y.z. If so, - rename /buildroot-x.y.z to /buildroot. - - 4. cd /buildroot - - 5. cp configs/cortexm3-defconfig-nxflat .config - - 6. make oldconfig - - 7. make - - 8. Edit setenv.h, if necessary, so that the PATH variable includes - the path to the newly builtNXFLAT binaries. - -VSN-specific Configuration Options -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - CONFIG_ARCH - Identifies the arch/ subdirectory. This should - be set to: - - CONFIG_ARCH=arm - - CONFIG_ARCH_family - For use in C code: - - CONFIG_ARCH_ARM=y - - CONFIG_ARCH_architecture - For use in C code: - - CONFIG_ARCH_CORTEXM3=y - - CONFIG_ARCH_CHIP - Identifies the arch/*/chip subdirectory - - CONFIG_ARCH_CHIP=stm32 - - CONFIG_ARCH_CHIP_name - For use in C code to identify the exact - chip: - - CONFIG_ARCH_CHIP_STM32F103RE - - CONFIG_ARCH_BOARD - Identifies the configs subdirectory and - hence, the board that supports the particular chip or SoC. - - CONFIG_ARCH_BOARD=vsn (for the VSN development board) - - CONFIG_ARCH_BOARD_name - For use in C code - - CONFIG_ARCH_BOARD_VSN=y - - CONFIG_ARCH_LOOPSPERMSEC - Must be calibrated for correct operation - of delay loops - - CONFIG_ENDIAN_BIG - define if big endian (default is little - endian) - - CONFIG_RAM_SIZE - Describes the installed DRAM (SRAM in this case): - - CONFIG_RAM_SIZE=0x00010000 (64Kb) - - CONFIG_RAM_START - The start address of installed DRAM - - CONFIG_RAM_START=0x20000000 - - CONFIG_ARCH_INTERRUPTSTACK - This architecture supports an interrupt - stack. If defined, this symbol is the size of the interrupt - stack in bytes. If not defined, the user task stacks will be - used during interrupt handling. - - CONFIG_ARCH_STACKDUMP - Do stack dumps after assertions - - CONFIG_ARCH_LEDS - Use LEDs to show state. Unique to board architecture. - - CONFIG_ARCH_CALIBRATION - Enables some build in instrumentation that - cause a 100 second delay during boot-up. This 100 second delay - serves no purpose other than it allows you to calibratre - CONFIG_ARCH_LOOPSPERMSEC. You simply use a stop watch to measure - the 100 second delay then adjust CONFIG_ARCH_LOOPSPERMSEC until - the delay actually is 100 seconds. - - -Configurations -^^^^^^^^^^^^^^ - -Each VSN configuration is maintained in a sub-directory and -can be selected as follow: - - cd tools - ./configure.sh vsn/ - cd - - . ./setenv.sh - -Where is one of the following: - - nsh: - Configures the NuttShell (nsh) located at examples/nsh. The - Configuration enables both the serial and telnetd NSH interfaces. - - The default configuration sets up a console on front-panel RS-232 - interface, sets up device driver of all supported equipment and - links in VSN default applications. - - NOTES: - - 1. This configuration uses the mconf-based configuration tool. To - change this configurations using that tool, you should: - - a. Build and install the kconfig-mconf tool. See nuttx/README.txt - see additional README.txt files in the NuttX tools repository. - - b. Execute 'make menuconfig' in nuttx/ in order to start the - reconfiguration process. diff --git a/configs/vsn/include/board.h b/configs/vsn/include/board.h deleted file mode 100644 index bfaaf46510..0000000000 --- a/configs/vsn/include/board.h +++ /dev/null @@ -1,234 +0,0 @@ -/************************************************************************************ - * configs/vsn/include/board.h - * include/arch/board/board.h - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Copyright (C) 2011 Uros Platise. All rights reserved - * - * Authors: Gregory Nutt - * Uros Platise - * - * 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. - * - ************************************************************************************/ - -#ifndef __ARCH_BOARD_BOARD_H -#define __ARCH_BOARD_BOARD_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#ifndef __ASSEMBLY__ -# include -#endif -#include "stm32_rcc.h" -#include "stm32_sdio.h" -#include "stm32.h" - -#include "muxbus.h" - -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Clocking *************************************************************************/ - -/* On-board external frequency source is 9MHz (HSE) provided by the CC1101, so it is - * not available on power-up. Instead we are about to run on HSI*9 = 36 MHz, see - * up_sysclock.c for details. - */ - -#define STM32_BOARD_XTAL 9000000UL -#define STM32_BOARD_HCLK 36000000UL - -/* PLL source is either HSI or HSE - * When HSI: PLL multiplier is 9, out frequency 36 MHz - * When HSE: PLL multiplier is 8: out frequency is 9 MHz x 8 = 72MHz - */ - -#define STM32_CFGR_PLLSRC_HSI 0 -#define STM32_CFGR_PLLMUL_HSI RCC_CFGR_PLLMUL_CLKx9 - -#define STM32_CFGR_PLLXTPRE_HSE 0 -#define STM32_CFGR_PLLSRC_HSE RCC_CFGR_PLLSRC -#define STM32_CFGR_PLLMUL_HSE RCC_CFGR_PLLMUL_CLKx8 - -/* Use the PLL and set the SYSCLK source to be the PLL */ - -#define STM32_SYSCLK_SW RCC_CFGR_SW_PLL -#define STM32_SYSCLK_SWS RCC_CFGR_SWS_PLL - -/* AHB clock (HCLK, 36 MHz) is SYSCLK on HSI or SYSCLK/2 on HSE */ - -#define STM32_RCC_CFGR_HPRE_HSI RCC_CFGR_HPRE_SYSCLK -#define STM32_RCC_CFGR_HPRE_HSE RCC_CFGR_HPRE_SYSCLKd2 -#define STM32_HCLK_FREQUENCY STM32_BOARD_HCLK - -/* APB2 clock (PCLK2) is HCLK (36MHz) */ - -#define STM32_RCC_CFGR_PPRE2 RCC_CFGR_PPRE2_HCLK -#define STM32_PCLK2_FREQUENCY STM32_BOARD_HCLK - -/* APB2 timers 1 and 8 will receive PCLK2. */ - -#define STM32_APB2_TIM1_CLKIN (STM32_PCLK2_FREQUENCY) -#define STM32_APB2_TIM8_CLKIN (STM32_PCLK2_FREQUENCY) - -/* APB1 clock (PCLK1) is HCLK (36MHz) */ - -#define STM32_RCC_CFGR_PPRE1 RCC_CFGR_PPRE1_HCLK -#define STM32_PCLK1_FREQUENCY STM32_BOARD_HCLK - -/* APB1 timers 2-4 will receive PCLK1. */ - -#define STM32_APB1_TIM2_CLKIN (STM32_PCLK1_FREQUENCY) -#define STM32_APB1_TIM3_CLKIN (STM32_PCLK1_FREQUENCY) -#define STM32_APB1_TIM4_CLKIN (STM32_PCLK1_FREQUENCY) -#define STM32_APB1_TIM5_CLKIN (STM32_PCLK1_FREQUENCY) -#define STM32_APB1_TIM6_CLKIN (STM32_PCLK1_FREQUENCY) -#define STM32_APB1_TIM7_CLKIN (STM32_PCLK1_FREQUENCY) - -/* Timer 1..8 Frequencies */ - -#define STM32_TIM27_FREQUENCY (STM32_BOARD_HCLK) -#define STM32_TIM18_FREQUENCY (STM32_BOARD_HCLK) - -/* USB divider -- Divide PLL clock by 1.5 */ - -#define STM32_CFGR_USBPRE 0 - -/* SDIO dividers. Note that slower clocking is required when DMA is disabled - * in order to avoid RX overrun/TX underrun errors due to delayed responses - * to service FIFOs in interrupt driven mode. - * - * SDcard default speed has max SDIO_CK freq of 25 MHz (12.5 Mbps) - * After selection of high speed freq may be 50 MHz (25 Mbps) - * Recommended default voltage: 3.3 V - * - * HCLK=36MHz, SDIOCLK=36 MHz, SDIO_CK=HCLK/(88+2)=400 KHz - */ - -#define SDIO_INIT_CLKDIV (88 << SDIO_CLKCR_CLKDIV_SHIFT) - -/* DMA ON: HCLK=36 MHz, SDIOCLK=36MHz, SDIO_CK=HCLK/(0+2)=18 MHz - * DMA OFF: HCLK=36 MHz, SDIOCLK=36MHz, SDIO_CK=HCLK/(1+2)=12 MHz - */ - -#ifdef CONFIG_SDIO_DMA -# define SDIO_MMCXFR_CLKDIV (0 << SDIO_CLKCR_CLKDIV_SHIFT) -#else -# ifndef CONFIG_DEBUG -# define SDIO_MMCXFR_CLKDIV (1 << SDIO_CLKCR_CLKDIV_SHIFT) -# else -# define SDIO_MMCXFR_CLKDIV (10 << SDIO_CLKCR_CLKDIV_SHIFT) -# endif -#endif - -/* DMA ON: HCLK=72 MHz, SDIOCLK=72MHz, SDIO_CK=HCLK/(0+2)=18 MHz - * DMA OFF: HCLK=72 MHz, SDIOCLK=72MHz, SDIO_CK=HCLK/(1+2)=12 MHz - * Extra slow down in debug mode to get rid of underruns. - */ - -#ifdef CONFIG_SDIO_DMA -# define SDIO_SDXFR_CLKDIV (0 << SDIO_CLKCR_CLKDIV_SHIFT) -#else -# ifndef CONFIG_DEBUG -# define SDIO_SDXFR_CLKDIV (1 << SDIO_CLKCR_CLKDIV_SHIFT) -# else -# define SDIO_SDXFR_CLKDIV (10 << SDIO_CLKCR_CLKDIV_SHIFT) -# endif -#endif - -/* LED definitions ******************************************************************/ - -/* The VSN has one LED that we will encode as: */ - -#define LED_STARTED 0 /* ... */ -#define LED_HEAPALLOCATE 1 /* ... */ -#define LED_IRQSENABLED 2 /* ... */ -#define LED_STACKCREATED 3 /* ... */ -#define LED_INIRQ 4 /* ... */ -#define LED_SIGNAL 5 /* ... */ -#define LED_ASSERTION 6 /* ... */ -#define LED_PANIC 7 /* ... */ -#define LED_IDLE 8 /* shows idle state */ - - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -#ifndef __ASSEMBLY__ - -#undef EXTERN -#if defined(__cplusplus) -#define EXTERN extern "C" -extern "C" { -#else -#define EXTERN extern -#endif - -/************************************************************************************ - * Board Clock Configuration, called immediatelly after boot - ************************************************************************************/ - -/************************************************************************************ - * Name: stm32_boardinitialize - * - * Description: - * All STM32 architectures must provide the following entry point. This entry point - * is called early in the intitialization -- after all memory has been configured - * and mapped but before any devices have been initialized. - * - ************************************************************************************/ - -EXTERN void stm32_boardinitialize(void); - -/************************************************************************************ - * Name: stm32_board_clockconfig - * - * Description: - * Any STM32 board may replace the "standard" board clock configuration logic with - * its own, custom clock cofiguration logic. - * - ************************************************************************************/ - -#ifdef CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG -EXTERN void stm32_board_clockconfig(void); -#endif - -#undef EXTERN -#if defined(__cplusplus) -} -#endif - -#endif /* __ASSEMBLY__ */ -#endif /* __ARCH_BOARD_BOARD_H */ diff --git a/configs/vsn/include/muxbus.h b/configs/vsn/include/muxbus.h deleted file mode 100644 index ba22f84263..0000000000 --- a/configs/vsn/include/muxbus.h +++ /dev/null @@ -1,84 +0,0 @@ -/************************************************************************************ - * configs/vsn/include/muxbus.h - * include/arch/board/muxbus.h - * - * Copyright (C) 2011 Uros Platise. All rights reserved - * - * Authors: Uros Platise - * - * 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. - * - ************************************************************************************/ - -#ifndef __ARCH_BOARD_MUXBUS_H -#define __ARCH_BOARD_MUXBUS_H - -#ifndef __ASSEMBLY__ -#undef EXTERN -#if defined(__cplusplus) -#define EXTERN extern "C" -extern "C" { -#else -#define EXTERN extern -#endif - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -/** - * Initialization of the semaphore and initial bus state. - */ -void vsn_muxbus_init(void); - -/** - * Simple Lock / Unlock Mechanism for the SDIO Interface - * - * NOTE: This function is provided for the stm32_sdio driver. - */ -extern void stm32_muxbus_sdio_lock(bool lock); - -/** - * Set PGA Gain of the Analog Devices AD8231 on bus shared with the - * SDIO interface - * - * \param gain sets the front-end gain as 2^{gain}, where gain = 0..7. - * Setting gain outside that range shutdowns the front-end. - * - * \return gain set or -1 if front end is put into shutdown. - */ -extern int vsn_muxbus_setpgagain(int gain); - - -#undef EXTERN -#if defined(__cplusplus) -} -#endif - -#endif /* __ASSEMBLY__ */ -#endif /* __ARCH_BOARD_MUXBUS_H */ diff --git a/configs/vsn/include/nsh_romfsimg.h b/configs/vsn/include/nsh_romfsimg.h deleted file mode 100644 index b3e894a5b7..0000000000 --- a/configs/vsn/include/nsh_romfsimg.h +++ /dev/null @@ -1,89 +0,0 @@ -unsigned char romfs_img[] = { - 0x2d, 0x72, 0x6f, 0x6d, 0x31, 0x66, 0x73, 0x2d, 0x00, 0x00, 0x02, 0x10, - 0xad, 0x5b, 0x65, 0xae, 0x4e, 0x53, 0x48, 0x49, 0x6e, 0x69, 0x74, 0x56, - 0x6f, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, - 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0xd1, 0xff, 0xff, 0x97, - 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x20, - 0x00, 0x00, 0x00, 0x00, 0xd1, 0xd1, 0xff, 0x80, 0x2e, 0x2e, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x68, 0x2d, 0x96, 0x03, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x64, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0xd1, 0xd1, 0xff, 0x40, - 0x2e, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x60, - 0x00, 0x00, 0x00, 0x00, 0xd1, 0xff, 0xfe, 0xe0, 0x2e, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x29, - 0x8d, 0x9c, 0xab, 0xcd, 0x72, 0x63, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x63, 0x68, 0x6f, - 0x20, 0x22, 0x56, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6c, 0x65, 0x20, - 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x20, - 0x56, 0x31, 0x2e, 0x32, 0x2c, 0x20, 0x77, 0x77, 0x77, 0x2e, 0x6e, 0x65, - 0x74, 0x43, 0x6c, 0x61, 0x6d, 0x70, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x22, - 0x0a, 0x0a, 0x23, 0x20, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x61, - 0x20, 0x52, 0x41, 0x4d, 0x44, 0x49, 0x53, 0x4b, 0x20, 0x61, 0x6e, 0x64, - 0x20, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x69, 0x74, 0x20, 0x61, 0x74, - 0x20, 0x2f, 0x74, 0x6d, 0x70, 0x0a, 0x23, 0x6d, 0x6b, 0x72, 0x64, 0x20, - 0x2d, 0x6d, 0x20, 0x31, 0x20, 0x2d, 0x73, 0x20, 0x35, 0x31, 0x32, 0x20, - 0x34, 0x30, 0x0a, 0x23, 0x6d, 0x6b, 0x66, 0x61, 0x74, 0x66, 0x73, 0x20, - 0x2f, 0x64, 0x65, 0x76, 0x2f, 0x72, 0x61, 0x6d, 0x31, 0x0a, 0x23, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x2d, 0x74, 0x20, 0x76, 0x66, 0x61, 0x74, - 0x20, 0x2f, 0x64, 0x65, 0x76, 0x2f, 0x72, 0x61, 0x6d, 0x31, 0x20, 0x2f, - 0x74, 0x6d, 0x70, 0x0a, 0x0a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x2d, - 0x74, 0x20, 0x62, 0x69, 0x6e, 0x66, 0x73, 0x20, 0x2f, 0x64, 0x65, 0x76, - 0x2f, 0x72, 0x61, 0x6d, 0x30, 0x20, 0x2f, 0x73, 0x62, 0x69, 0x6e, 0x0a, - 0x0a, 0x72, 0x61, 0x6d, 0x74, 0x72, 0x6f, 0x6e, 0x20, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x20, 0x33, 0x0a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x2d, - 0x74, 0x20, 0x76, 0x66, 0x61, 0x74, 0x20, 0x2f, 0x64, 0x65, 0x76, 0x2f, - 0x6d, 0x74, 0x64, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x30, 0x20, 0x2f, 0x75, - 0x73, 0x72, 0x0a, 0x0a, 0x73, 0x64, 0x63, 0x61, 0x72, 0x64, 0x20, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x20, 0x30, 0x0a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x20, 0x2d, 0x74, 0x20, 0x76, 0x66, 0x61, 0x74, 0x20, 0x2f, 0x64, 0x65, - 0x76, 0x2f, 0x6d, 0x6d, 0x63, 0x73, 0x64, 0x30, 0x20, 0x2f, 0x73, 0x64, - 0x63, 0x61, 0x72, 0x64, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00 -}; -unsigned int romfs_img_len = 1024; diff --git a/configs/vsn/include/rcS.template b/configs/vsn/include/rcS.template deleted file mode 100755 index 4860195bdc..0000000000 --- a/configs/vsn/include/rcS.template +++ /dev/null @@ -1,14 +0,0 @@ -echo "Versatile Sensor Node V1.2, www.netClamps.com" - -# Create a RAMDISK and mount it at XXXRDMOUNTPOINTXXX -#mkrd -m XXXMKRDMINORXXX -s XXMKRDSECTORSIZEXXX XXMKRDBLOCKSXXX -#mkfatfs /dev/ramXXXMKRDMINORXXX -#mount -t vfat /dev/ramXXXMKRDMINORXXX XXXRDMOUNTPOINTXXX - -mount -t binfs /dev/ram0 /sbin - -ramtron start 3 -mount -t vfat /dev/mtdblock0 /usr - -sdcard start 0 -mount -t vfat /dev/mmcsd0 /sdcard diff --git a/configs/vsn/nsh/Make.defs b/configs/vsn/nsh/Make.defs deleted file mode 100644 index e3e8c44337..0000000000 --- a/configs/vsn/nsh/Make.defs +++ /dev/null @@ -1,121 +0,0 @@ -############################################################################ -# configs/stm3210e-eval/nsh/Make.defs -# -# Copyright (C) 2009 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. -# -############################################################################ - -include ${TOPDIR}/.config -include ${TOPDIR}/tools/Config.mk -include ${TOPDIR}/arch/arm/src/armv7-m/Toolchain.defs - -ifeq ($(CONFIG_STM32_DFU),y) - LDSCRIPT = ld.script.dfu -else - LDSCRIPT = ld.script -endif - -ifeq ($(WINTOOL),y) - # Windows-native toolchains - DIRLINK = $(TOPDIR)/tools/copydir.sh - DIRUNLINK = $(TOPDIR)/tools/unlink.sh - MKDEP = $(TOPDIR)/tools/mkwindeps.sh - ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" - ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}" -else - # Linux/Cygwin-native toolchain - 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 - -CC = $(CROSSDEV)gcc -CXX = $(CROSSDEV)g++ -CPP = $(CROSSDEV)gcc -E -LD = $(CROSSDEV)ld -AR = $(CROSSDEV)ar rcs -NM = $(CROSSDEV)nm -OBJCOPY = $(CROSSDEV)objcopy -OBJDUMP = $(CROSSDEV)objdump - -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} - -ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - ARCHOPTIMIZATION = -g -endif - -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer -endif - -ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -ARCHWARNINGSXX = -Wall -Wshadow -Wundef -ARCHDEFINES = -ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 - -CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe -CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS) -CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe -CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS) -CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -AFLAGS = $(CFLAGS) -D__ASSEMBLY__ - -NXFLATLDFLAGS1 = -r -d -warn-common -NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections -LDNXFLATFLAGS = -e main -s 2048 - -ASMEXT = .S -OBJEXT = .o -LIBEXT = .a -EXEEXT = - -ifneq ($(CROSSDEV),arm-nuttx-elf-) - LDFLAGS += -nostartfiles -nodefaultlibs -endif -ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - LDFLAGS += -g -endif - - -define DOWNLOAD - @armst /dev/ttyUSB0 nuttx.srec -endef - -HOSTCC = gcc -HOSTINCLUDES = -I. -HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -g -pipe -HOSTLDFLAGS = - diff --git a/configs/vsn/nsh/defconfig b/configs/vsn/nsh/defconfig deleted file mode 100644 index 9b4c4f44bb..0000000000 --- a/configs/vsn/nsh/defconfig +++ /dev/null @@ -1,1259 +0,0 @@ -# -# Automatically generated file; DO NOT EDIT. -# Nuttx/ Configuration -# - -# -# Build Setup -# -# CONFIG_EXPERIMENTAL is not set -# CONFIG_DEFAULT_SMALL is not set -# CONFIG_HOST_LINUX is not set -# CONFIG_HOST_OSX is not set -CONFIG_HOST_WINDOWS=y -# CONFIG_HOST_OTHER is not set -# CONFIG_WINDOWS_NATIVE is not set -CONFIG_WINDOWS_CYGWIN=y -# CONFIG_WINDOWS_MSYS is not set -# CONFIG_WINDOWS_OTHER is not set - -# -# Build Configuration -# -# CONFIG_APPS_DIR="../apps" -CONFIG_BUILD_FLAT=y -# CONFIG_BUILD_2PASS is not set - -# -# Binary Output Formats -# -# CONFIG_RRLOAD_BINARY is not set -# CONFIG_INTELHEX_BINARY is not set -CONFIG_MOTOROLA_SREC=y -# CONFIG_RAW_BINARY is not set -# 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 is not set -# CONFIG_ARCH_FLOAT_H is not set -# CONFIG_ARCH_STDARG_H is not set -# CONFIG_ARCH_DEBUG_H is not set - -# -# Debug Options -# -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y -CONFIG_ARCH_HAVE_STACKCHECK=y -# CONFIG_STACK_COLORATION is not set -# 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_ARM=y -# CONFIG_ARCH_AVR is not set -# CONFIG_ARCH_HC is not set -# CONFIG_ARCH_MIPS is not set -# CONFIG_ARCH_RGMP is not set -# CONFIG_ARCH_SH is not set -# CONFIG_ARCH_SIM is not set -# CONFIG_ARCH_X86 is not set -# CONFIG_ARCH_Z16 is not set -# CONFIG_ARCH_Z80 is not set -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_IMX1 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_STM32F7 is not set -# CONFIG_ARCH_CHIP_STR71X is not set -# CONFIG_ARCH_CHIP_TMS570 is not set -# CONFIG_ARCH_CHIP_MOXART 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=y -# CONFIG_ARCH_CORTEXM4 is not set -# CONFIG_ARCH_CORTEXM7 is not set -# CONFIG_ARCH_CORTEXA5 is not set -# CONFIG_ARCH_CORTEXA8 is not set -# CONFIG_ARCH_CORTEXA9 is not set -# CONFIG_ARCH_CORTEXR4 is not set -# CONFIG_ARCH_CORTEXR4F is not set -# CONFIG_ARCH_CORTEXR5 is not set -# CONFIG_ARCH_CORTEX5F is not set -# CONFIG_ARCH_CORTEXR7 is not set -# CONFIG_ARCH_CORTEXR7F is not set -CONFIG_ARCH_FAMILY="armv7-m" -CONFIG_ARCH_CHIP="stm32" -# CONFIG_ARMV7M_USEBASEPRI is not set -CONFIG_ARCH_HAVE_CMNVECTOR=y -# CONFIG_ARMV7M_CMNVECTOR is not set -# CONFIG_ARMV7M_LAZYFPU is not set -# CONFIG_ARCH_HAVE_FPU is not set -# CONFIG_ARCH_HAVE_DPFPU is not set -CONFIG_ARM_HAVE_MPU_UNIFIED=y -# CONFIG_ARM_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_ATOLLIC is not set -CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=y -# CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set -# CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW is not set -# CONFIG_ARMV7M_TOOLCHAIN_DEVKITARM is not set -# CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL is not set -# CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIW is not set -# CONFIG_ARMV7M_TOOLCHAIN_RAISONANCE is not set -# CONFIG_ARMV7M_OABI_TOOLCHAIN is not set -CONFIG_ARMV7M_HAVE_STACKCHECK=y -# CONFIG_ARMV7M_STACKCHECK is not set -# CONFIG_ARMV7M_ITMSYSLOG is not set -# CONFIG_SERIAL_TERMIOS is not set -# CONFIG_SDIO_DMA is not set -CONFIG_SDIO_WIDTH_D1_ONLY=y - -# -# STM32 Configuration Options -# -# CONFIG_ARCH_CHIP_STM32L151C6 is not set -# CONFIG_ARCH_CHIP_STM32L151C8 is not set -# CONFIG_ARCH_CHIP_STM32L151CB is not set -# CONFIG_ARCH_CHIP_STM32L151R6 is not set -# CONFIG_ARCH_CHIP_STM32L151R8 is not set -# CONFIG_ARCH_CHIP_STM32L151RB is not set -# CONFIG_ARCH_CHIP_STM32L151V6 is not set -# CONFIG_ARCH_CHIP_STM32L151V8 is not set -# CONFIG_ARCH_CHIP_STM32L151VB is not set -# CONFIG_ARCH_CHIP_STM32L152C6 is not set -# CONFIG_ARCH_CHIP_STM32L152C8 is not set -# CONFIG_ARCH_CHIP_STM32L152CB is not set -# CONFIG_ARCH_CHIP_STM32L152R6 is not set -# CONFIG_ARCH_CHIP_STM32L152R8 is not set -# CONFIG_ARCH_CHIP_STM32L152RB is not set -# 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 -# CONFIG_ARCH_CHIP_STM32F100RB is not set -# CONFIG_ARCH_CHIP_STM32F100RC is not set -# CONFIG_ARCH_CHIP_STM32F100RD is not set -# CONFIG_ARCH_CHIP_STM32F100RE is not set -# CONFIG_ARCH_CHIP_STM32F100V8 is not set -# CONFIG_ARCH_CHIP_STM32F100VB is not set -# 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_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=y -# 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 -# CONFIG_ARCH_CHIP_STM32F302RC is not set -# CONFIG_ARCH_CHIP_STM32F302VB is not set -# CONFIG_ARCH_CHIP_STM32F302VC is not set -# CONFIG_ARCH_CHIP_STM32F303K6 is not set -# CONFIG_ARCH_CHIP_STM32F303K8 is not set -# CONFIG_ARCH_CHIP_STM32F303C6 is not set -# CONFIG_ARCH_CHIP_STM32F303C8 is not set -# CONFIG_ARCH_CHIP_STM32F303CB is not set -# CONFIG_ARCH_CHIP_STM32F303CC is not set -# CONFIG_ARCH_CHIP_STM32F303RB is not set -# CONFIG_ARCH_CHIP_STM32F303RC is not set -# CONFIG_ARCH_CHIP_STM32F303RD is not set -# CONFIG_ARCH_CHIP_STM32F303RE 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 -# CONFIG_ARCH_CHIP_STM32F407VE is not set -# CONFIG_ARCH_CHIP_STM32F407VG is not set -# CONFIG_ARCH_CHIP_STM32F407ZE is not set -# CONFIG_ARCH_CHIP_STM32F407ZG is not set -# CONFIG_ARCH_CHIP_STM32F407IE is not set -# CONFIG_ARCH_CHIP_STM32F407IG is not set -# CONFIG_ARCH_CHIP_STM32F427V is not set -# 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_ARCH_CHIP_STM32F446M is not set -# CONFIG_ARCH_CHIP_STM32F446R is not set -# CONFIG_ARCH_CHIP_STM32F446V is not set -# CONFIG_ARCH_CHIP_STM32F446Z is not set -# CONFIG_ARCH_CHIP_STM32F469A is not set -# CONFIG_ARCH_CHIP_STM32F469I is not set -# CONFIG_ARCH_CHIP_STM32F469B is not set -# CONFIG_ARCH_CHIP_STM32F469N is not set -CONFIG_STM32_FLASH_CONFIG_DEFAULT=y -# CONFIG_STM32_FLASH_CONFIG_4 is not set -# CONFIG_STM32_FLASH_CONFIG_6 is not set -# CONFIG_STM32_FLASH_CONFIG_8 is not set -# CONFIG_STM32_FLASH_CONFIG_B is not set -# CONFIG_STM32_FLASH_CONFIG_C is not set -# CONFIG_STM32_FLASH_CONFIG_D is not set -# CONFIG_STM32_FLASH_CONFIG_E is not set -# CONFIG_STM32_FLASH_CONFIG_F is not set -# CONFIG_STM32_FLASH_CONFIG_G is not set -# CONFIG_STM32_FLASH_CONFIG_I is not set -# CONFIG_STM32_STM32L15XX is not set -# CONFIG_STM32_ENERGYLITE is not set -CONFIG_STM32_STM32F10XX=y -# CONFIG_STM32_VALUELINE is not set -# CONFIG_STM32_CONNECTIVITYLINE is not set -CONFIG_STM32_PERFORMANCELINE=y -# CONFIG_STM32_USBACCESSLINE is not set -CONFIG_STM32_HIGHDENSITY=y -# 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_STM32F302 is not set -# CONFIG_STM32_STM32F303 is not set -# CONFIG_STM32_STM32F37XX is not set -# CONFIG_STM32_STM32F40XX is not set -# 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 is not set -# CONFIG_STM32_STM32F429 is not set -# CONFIG_STM32_STM32F446 is not set -# CONFIG_STM32_STM32F469 is not set -# CONFIG_STM32_DFU is not set - -# -# STM32 Peripheral Support -# -# CONFIG_STM32_HAVE_CCM is not set -CONFIG_STM32_HAVE_USBDEV=y -# CONFIG_STM32_HAVE_OTGFS is not set -CONFIG_STM32_HAVE_FSMC=y -# CONFIG_STM32_HAVE_LTDC is not set -CONFIG_STM32_HAVE_USART3=y -CONFIG_STM32_HAVE_UART4=y -CONFIG_STM32_HAVE_UART5=y -# CONFIG_STM32_HAVE_USART6 is not set -# CONFIG_STM32_HAVE_UART7 is not set -# CONFIG_STM32_HAVE_UART8 is not set -CONFIG_STM32_HAVE_TIM1=y -# CONFIG_STM32_HAVE_TIM2 is not set -CONFIG_STM32_HAVE_TIM3=y -CONFIG_STM32_HAVE_TIM4=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 is not set -# CONFIG_STM32_HAVE_TIM10 is not set -# CONFIG_STM32_HAVE_TIM11 is not set -# CONFIG_STM32_HAVE_TIM12 is not set -# CONFIG_STM32_HAVE_TIM13 is not set -# CONFIG_STM32_HAVE_TIM14 is not set -# 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_ADC1_DMA is not set -# CONFIG_STM32_HAVE_ADC2_DMA is not set -# CONFIG_STM32_HAVE_ADC3_DMA is not set -# CONFIG_STM32_HAVE_ADC4_DMA is not set -CONFIG_STM32_HAVE_CAN1=y -# CONFIG_STM32_HAVE_CAN2 is not set -CONFIG_STM32_HAVE_DAC1=y -CONFIG_STM32_HAVE_DAC2=y -# CONFIG_STM32_HAVE_RNG is not set -# CONFIG_STM32_HAVE_ETHMAC is not set -CONFIG_STM32_HAVE_I2C2=y -# CONFIG_STM32_HAVE_I2C3 is not set -CONFIG_STM32_HAVE_SPI2=y -CONFIG_STM32_HAVE_SPI3=y -# CONFIG_STM32_HAVE_SPI4 is not set -# CONFIG_STM32_HAVE_SPI5 is not set -# CONFIG_STM32_HAVE_SPI6 is not set -# CONFIG_STM32_HAVE_SAIPLL is not set -# CONFIG_STM32_HAVE_I2SPLL is not set -# CONFIG_STM32_ADC1 is not set -# CONFIG_STM32_ADC2 is not set -# CONFIG_STM32_ADC3 is not set -CONFIG_STM32_BKP=y -# CONFIG_STM32_CAN1 is not set -# CONFIG_STM32_CRC is not set -# CONFIG_STM32_DMA1 is not set -# CONFIG_STM32_DMA2 is not set -# CONFIG_STM32_DAC1 is not set -# CONFIG_STM32_DAC2 is not set -# CONFIG_STM32_FSMC is not set -CONFIG_STM32_I2C1=y -CONFIG_STM32_I2C2=y -CONFIG_STM32_PWR=y -CONFIG_STM32_SDIO=y -# CONFIG_STM32_SPI1 is not set -CONFIG_STM32_SPI2=y -CONFIG_STM32_SPI3=y -# CONFIG_STM32_TIM1 is not set -# CONFIG_STM32_TIM2 is not set -CONFIG_STM32_TIM3=y -# CONFIG_STM32_TIM4 is not set -# CONFIG_STM32_TIM5 is not set -# CONFIG_STM32_TIM6 is not set -# CONFIG_STM32_TIM7 is not set -CONFIG_STM32_TIM8=y -CONFIG_STM32_USART1=y -# CONFIG_STM32_USART2 is not set -# CONFIG_STM32_USART3 is not set -# CONFIG_STM32_UART4 is not set -# CONFIG_STM32_UART5 is not set -# CONFIG_STM32_USB is not set -# CONFIG_STM32_IWDG is not set -# CONFIG_STM32_WWDG is not set -CONFIG_STM32_SPI=y -CONFIG_STM32_I2C=y -# CONFIG_STM32_NOEXT_VECTORS is not set - -# -# Alternate Pin Mapping -# -CONFIG_STM32_I2C1_REMAP=y -# CONFIG_STM32_SPI3_REMAP is not set -CONFIG_STM32_TIM3_NO_REMAP=y -# CONFIG_STM32_TIM3_FULL_REMAP is not set -# CONFIG_STM32_TIM3_PARTIAL_REMAP is not set -# CONFIG_STM32_USART1_REMAP is not set -CONFIG_STM32_JTAG_DISABLE=y -# CONFIG_STM32_JTAG_FULL_ENABLE is not set -# CONFIG_STM32_JTAG_NOJNTRST_ENABLE is not set -# CONFIG_STM32_JTAG_SW_ENABLE is not set -# CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG is not set -# CONFIG_STM32_FORCEPOWER is not set -CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG=y -# CONFIG_STM32_TIM3_PWM is not set -# CONFIG_STM32_TIM8_PWM is not set -# CONFIG_STM32_TIM1_CAP is not set -# CONFIG_STM32_TIM3_CAP is not set -# CONFIG_STM32_TIM4_CAP is not set -# CONFIG_STM32_TIM5_CAP is not set -# CONFIG_STM32_TIM8_CAP is not set -CONFIG_STM32_USART=y - -# -# U[S]ART Configuration -# -# CONFIG_USART1_RS485 is not set -# CONFIG_SERIAL_DISABLE_REORDERING is not set -# CONFIG_STM32_FLOWCONTROL_BROKEN is not set -# CONFIG_STM32_USART_SINGLEWIRE is not set - -# -# SPI Configuration -# -# CONFIG_STM32_SPI_INTERRUPTS is not set -# CONFIG_STM32_SPI_DMA is not set - -# -# I2C Configuration -# -CONFIG_STM32_I2C_ALT=y -# CONFIG_STM32_I2C_DYNTIMEO is not set -CONFIG_STM32_I2CTIMEOSEC=0 -CONFIG_STM32_I2CTIMEOMS=500 -CONFIG_STM32_I2CTIMEOTICKS=500 -# CONFIG_STM32_I2C_DUTY16_9 is not set - -# -# SDIO Configuration -# -CONFIG_SDIO_DMAPRIO=0x00001000 -CONFIG_STM32_HAVE_RTC_COUNTER=y -# CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set -CONFIG_RTC_LSECLOCK=y -# CONFIG_RTC_LSICLOCK is not set -# CONFIG_RTC_HSECLOCK is not set - -# -# USB FS Host Configuration -# - -# -# USB HS Host Configuration -# - -# -# USB Host Debug Configuration -# - -# -# USB Device Configuration -# - -# -# Architecture Options -# -# CONFIG_ARCH_NOINTC is not set -# CONFIG_ARCH_VECNOTIRQ is not set -# CONFIG_ARCH_DMA 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_MULTICPU 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_HAVE_POWEROFF=y -CONFIG_ARCH_HAVE_RESET=y -# 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 - -# -# Board Settings -# -CONFIG_BOARD_LOOPSPERMSEC=5483 -# CONFIG_ARCH_CALIBRATION is not set - -# -# Interrupt options -# -CONFIG_ARCH_HAVE_INTERRUPTSTACK=y -CONFIG_ARCH_INTERRUPTSTACK=0 -CONFIG_ARCH_HAVE_HIPRI_INTERRUPT=y -# CONFIG_ARCH_HIPRI_INTERRUPT is not set - -# -# Boot options -# -# CONFIG_BOOT_RUNFROMEXTSRAM is not set -CONFIG_BOOT_RUNFROMFLASH=y -# CONFIG_BOOT_RUNFROMISRAM is not set -# CONFIG_BOOT_RUNFROMSDRAM is not set -# CONFIG_BOOT_COPYTORAM is not set - -# -# Boot Memory Configuration -# -CONFIG_RAM_START=0x20000000 -CONFIG_RAM_SIZE=65536 -# CONFIG_ARCH_HAVE_SDRAM is not set - -# -# Board Selection -# -CONFIG_ARCH_BOARD_VSN=y -# CONFIG_ARCH_BOARD_CUSTOM is not set -CONFIG_ARCH_BOARD="vsn" - -# -# Common Board Options -# -CONFIG_ARCH_HAVE_LEDS=y -CONFIG_ARCH_LEDS=y -CONFIG_ARCH_HAVE_BUTTONS=y -CONFIG_ARCH_BUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 -CONFIG_NSH_MMCSDSLOTNO=0 - -# -# Board-Specific Options -# -CONFIG_LIB_BOARDCTL=y -CONFIG_BOARDCTL_POWEROFF=y -# CONFIG_BOARDCTL_RESET is not set -# CONFIG_BOARDCTL_UNIQUEID is not set -# 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_DISABLE_OS_API=y -# CONFIG_DISABLE_POSIX_TIMERS is not set -# CONFIG_DISABLE_PTHREAD is not set -# CONFIG_DISABLE_SIGNALS is not set -# CONFIG_DISABLE_MQUEUE is not set -# CONFIG_DISABLE_ENVIRON is not set - -# -# Clocks and Timers -# -CONFIG_USEC_PER_TICK=10000 -# CONFIG_SYSTEM_TIME64 is not set -# CONFIG_CLOCK_MONOTONIC is not set -# CONFIG_JULIAN_TIME is not set -CONFIG_MAX_WDOGPARMS=2 -CONFIG_PREALLOC_WDOGS=4 -CONFIG_WDOG_INTRESERVE=0 -CONFIG_PREALLOC_TIMERS=4 - -# -# 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=200 -# CONFIG_SCHED_SPORADIC is not set -CONFIG_TASK_NAME_SIZE=15 -CONFIG_MAX_TASKS=16 -# CONFIG_SCHED_HAVE_PARENT is not set -CONFIG_SCHED_WAITPID=y - -# -# Pthread Options -# -# CONFIG_MUTEX_TYPES is not set -CONFIG_NPTHREAD_KEYS=4 - -# -# Performance Monitoring -# -# CONFIG_SCHED_CPULOAD is not set -# CONFIG_SCHED_INSTRUMENTATION is not set - -# -# Files and I/O -# -CONFIG_DEV_CONSOLE=y -# CONFIG_FDCLONE_DISABLE is not set -# CONFIG_FDCLONE_STDIO is not set -CONFIG_SDCLONE_DISABLE=y -CONFIG_NFILE_DESCRIPTORS=8 -CONFIG_NFILE_STREAMS=8 -CONFIG_NAME_MAX=32 -CONFIG_PRIORITY_INHERITANCE=y -CONFIG_SEM_PREALLOCHOLDERS=0 -CONFIG_SEM_NNESTPRIO=0 - -# -# RTOS hooks -# -# CONFIG_BOARD_INITIALIZE is not set -# CONFIG_SCHED_STARTHOOK is not set -# CONFIG_SCHED_ATEXIT is not set -# CONFIG_SCHED_ONEXIT is not set -# CONFIG_SIG_EVTHREAD is not set - -# -# Signal Numbers -# -CONFIG_SIG_SIGUSR1=1 -CONFIG_SIG_SIGUSR2=2 -CONFIG_SIG_SIGALARM=3 -CONFIG_SIG_SIGCONDTIMEDOUT=16 -CONFIG_SIG_SIGWORK=17 - -# -# POSIX Message Queue Options -# -CONFIG_PREALLOC_MQ_MSGS=4 -CONFIG_MQ_MAXMSGSIZE=32 -# CONFIG_MODULE is not set - -# -# Work queue support -# -CONFIG_SCHED_WORKQUEUE=y -CONFIG_SCHED_HPWORK=y -CONFIG_SCHED_HPWORKPRIORITY=192 -CONFIG_SCHED_HPWORKPERIOD=50000 -CONFIG_SCHED_HPWORKSTACKSIZE=1024 -# CONFIG_SCHED_LPWORK is not set - -# -# Stack and heap information -# -CONFIG_IDLETHREAD_STACKSIZE=1024 -CONFIG_USERMAIN_STACKSIZE=2048 -CONFIG_PTHREAD_STACK_MIN=256 -CONFIG_PTHREAD_STACK_DEFAULT=2048 -# CONFIG_LIB_SYSCALL is not set - -# -# Device Drivers -# -CONFIG_DISABLE_POLL=y -CONFIG_DEV_NULL=y -# CONFIG_DEV_ZERO is not set -# CONFIG_DEV_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_ARCH_HAVE_PWM_MULTICHAN is not set -# CONFIG_PWM is not set -CONFIG_ARCH_HAVE_I2CRESET=y -CONFIG_I2C=y -# CONFIG_I2C_SLAVE is not set -# CONFIG_I2C_POLLED is not set -# CONFIG_I2C_RESET is not set -# CONFIG_I2C_TRACE is not set -# CONFIG_I2C_DRIVER is not set -CONFIG_SPI=y -# CONFIG_SPI_SLAVE 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_SPI_HWFEATURES is not set -# CONFIG_SPI_CRCGENERATION is not set -# CONFIG_I2S is not set - -# -# Timer Driver Support -# -# CONFIG_TIMER is not set -CONFIG_RTC=y -# CONFIG_RTC_DATETIME is not set -CONFIG_RTC_HIRES=y -CONFIG_RTC_FREQUENCY=16384 -# CONFIG_RTC_ALARM is not set -# CONFIG_RTC_DRIVER is not set -# CONFIG_RTC_EXTERNAL is not set -# CONFIG_WATCHDOG is not set -# 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_IOEXPANDER is not set -# CONFIG_LCD is not set - -# -# LED Support -# -# CONFIG_USERLED is not set -# CONFIG_RGBLED is not set -# CONFIG_PCA9635PW is not set -CONFIG_MMCSD=y -CONFIG_MMCSD_NSLOTS=0 -CONFIG_MMCSD_READONLY=y -# CONFIG_MMCSD_MULTIBLOCK_DISABLE is not set -CONFIG_MMCSD_MMCSUPPORT=y -# CONFIG_MMCSD_HAVECARDDETECT is not set -# CONFIG_MMCSD_SPI is not set -CONFIG_ARCH_HAVE_SDIO=y -CONFIG_ARCH_HAVE_SDIOWAIT_WRCOMPLETE=y -CONFIG_MMCSD_SDIO=y -CONFIG_SDIO_PREFLIGHT=y -# CONFIG_SDIO_MUXBUS is not set -# CONFIG_MMCSD_SDIOWAIT_WRCOMPLETE is not set -# CONFIG_SDIO_BLOCKSETUP is not set -# CONFIG_MODEM is not set -CONFIG_MTD=y - -# -# MTD Configuration -# -# CONFIG_MTD_PARTITION is not set -# CONFIG_MTD_SECT512 is not set -# CONFIG_MTD_BYTE_WRITE is not set -# CONFIG_MTD_PROGMEM is not set -# CONFIG_MTD_CONFIG is not set - -# -# MTD Device Drivers -# -# CONFIG_MTD_NAND is not set -# CONFIG_RAMMTD is not set -# CONFIG_FILEMTD 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_S25FL1 is not set -# CONFIG_MTD_SMART is not set -# CONFIG_MTD_RAMTRON is not set -# 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 is not set -# CONFIG_PM is not set -# CONFIG_POWER is not set -CONFIG_SENSORS=y -# CONFIG_AS5048B is not set -# CONFIG_BMP180 is not set -CONFIG_LIS331DL=y -CONFIG_LIS331DL_I2C_FREQUENCY=100000 -# CONFIG_SN_LSM9DS1 is not set -# CONFIG_MB7040 is not set -# CONFIG_MCP9844 is not set -# CONFIG_MS58XX is not set -CONFIG_MS58XX_VDD=30 -# CONFIG_MPL115A is not set -# CONFIG_SENSORS_ADXL345 is not set -# CONFIG_MAX31855 is not set -# CONFIG_MAX6675 is not set -# CONFIG_LM75 is not set -# CONFIG_LM92 is not set -# CONFIG_QENCODER is not set -# CONFIG_ZEROCROSS 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_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y -CONFIG_MCU_SERIAL=y -CONFIG_STANDARD_SERIAL=y -# CONFIG_SERIAL_IFLOWCONTROL is not set -# CONFIG_SERIAL_OFLOWCONTROL is not set -# CONFIG_SERIAL_DMA is not set -CONFIG_ARCH_HAVE_SERIAL_TERMIOS=y -CONFIG_USART1_SERIAL_CONSOLE=y -# CONFIG_OTHER_SERIAL_CONSOLE is not set -# CONFIG_NO_SERIAL_CONSOLE is not set - -# -# USART1 Configuration -# -CONFIG_USART1_RXBUFSIZE=256 -CONFIG_USART1_TXBUFSIZE=256 -CONFIG_USART1_BAUD=115200 -CONFIG_USART1_BITS=8 -CONFIG_USART1_PARITY=0 -CONFIG_USART1_2STOP=0 -# CONFIG_USART1_IFLOWCONTROL is not set -# CONFIG_USART1_OFLOWCONTROL is not set -# CONFIG_USART1_DMA is not set -# CONFIG_USBDEV is not set -# CONFIG_USBHOST is not set -CONFIG_DRIVERS_WIRELESS=y -CONFIG_WL_CC1101=y -# CONFIG_WL_CC3000 is not set -# CONFIG_WL_NRF24L01 is not set -# CONFIG_WL_PN532 is not set - -# -# System Logging Device Options -# - -# -# System Logging -# -# CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE 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 -# - -# -# 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_NAMED_SEMAPHORES is not set -CONFIG_FS_MQUEUE_MPATH="/var/mqueue" -# CONFIG_FS_RAMMAP is not set -CONFIG_FS_FAT=y -# CONFIG_FAT_LCNAMES is not set -# CONFIG_FAT_LFN is not set -# CONFIG_FS_FATTIME is not set -# CONFIG_FAT_FORCE_INDIRECT is not set -# CONFIG_FAT_DMAMEMORY is not set -# CONFIG_FAT_DIRECT_RETRY is not set -CONFIG_FS_NXFFS=y -# CONFIG_NXFFS_SCAN_VOLUME is not set -CONFIG_NXFFS_PREALLOCATED=y -CONFIG_NXFFS_ERASEDSTATE=0xff -CONFIG_NXFFS_PACKTHRESHOLD=32 -CONFIG_NXFFS_MAXNAMLEN=255 -CONFIG_NXFFS_TAILTHRESHOLD=8192 -CONFIG_FS_ROMFS=y -# CONFIG_FS_TMPFS is not set -# 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 is not set -# CONFIG_SYSLOG_TIMESTAMP is not set - -# -# Graphics Support -# -# CONFIG_NX is not set - -# -# Memory Management -# -# CONFIG_MM_SMALL is not set -CONFIG_MM_REGIONS=1 -# CONFIG_ARCH_HAVE_HEAP2 is not set -# CONFIG_GRAN is not set - -# -# Audio Support -# -# CONFIG_AUDIO is not set - -# -# Wireless Support -# - -# -# Binary Loader -# -# CONFIG_BINFMT_DISABLE is not set -# CONFIG_BINFMT_EXEPATH is not set -# CONFIG_NXFLAT is not set -# CONFIG_ELF is not set -CONFIG_BUILTIN=y -# CONFIG_PIC is not set -# CONFIG_SYMTAB_ORDEREDBYNAME is not set - -# -# Library Routines -# - -# -# Standard C Library Options -# -CONFIG_STDIO_BUFFER_SIZE=64 -CONFIG_STDIO_LINEBUFFER=y -CONFIG_NUNGET_CHARS=2 -CONFIG_LIB_HOMEDIR="/" -# CONFIG_LIBM is not set -# CONFIG_NOPRINTF_FIELDWIDTH is not set -# CONFIG_LIBC_FLOATINGPOINT is not set -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 -# CONFIG_EOL_IS_BOTH_CRLF is not set -CONFIG_EOL_IS_EITHER_CRLF=y -# CONFIG_LIBC_EXECFUNCS is not set -CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=1024 -CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048 -# CONFIG_LIBC_STRERROR 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 is not set -CONFIG_LIB_SENDFILE_BUFSIZE=512 -# CONFIG_ARCH_ROMGETC is not set -# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set -# CONFIG_LIBC_NETDB is not set -# CONFIG_NETDB_HOSTFILE is not set - -# -# Non-standard Library Support -# -# CONFIG_LIB_KBDCODEC is not set -# CONFIG_LIB_SLCDCODEC is not set - -# -# Basic CXX Support -# -# CONFIG_C99_BOOL8 is not set -# CONFIG_HAVE_CXX is not set - -# -# Application Configuration -# - -# -# Built-In Applications -# -CONFIG_BUILTIN_PROXY_STACKSIZE=1024 - -# -# CAN Utilities -# - -# -# Examples -# -# CONFIG_EXAMPLES_BUTTONS is not set -# CONFIG_EXAMPLES_CHAT is not set -# CONFIG_EXAMPLES_CONFIGDATA is not set -# CONFIG_EXAMPLES_CPUHOG is not set -# CONFIG_EXAMPLES_DHCPD is not set -# CONFIG_EXAMPLES_ELF is not set -# CONFIG_EXAMPLES_FSTEST is not set -# CONFIG_EXAMPLES_FTPC is not set -# CONFIG_EXAMPLES_FTPD is not set -# CONFIG_EXAMPLES_HELLO is not set -# CONFIG_EXAMPLES_JSON is not set -# CONFIG_EXAMPLES_HIDKBD is not set -# CONFIG_EXAMPLES_KEYPADTEST is not set -# CONFIG_EXAMPLES_IGMP is not set -# CONFIG_EXAMPLES_MEDIA is not set -# CONFIG_EXAMPLES_MM is not set -# CONFIG_EXAMPLES_MODBUS is not set -# CONFIG_EXAMPLES_MOUNT is not set -# CONFIG_EXAMPLES_NRF24L01TERM is not set -CONFIG_EXAMPLES_NSH=y -# CONFIG_EXAMPLES_NULL is not set -# CONFIG_EXAMPLES_NX is not set -# CONFIG_EXAMPLES_NXTERM is not set -# CONFIG_EXAMPLES_NXFFS 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_PCA9635 is not set -# CONFIG_EXAMPLES_PIPE is not set -# CONFIG_EXAMPLES_PPPD is not set -# CONFIG_EXAMPLES_POSIXSPAWN is not set -# CONFIG_EXAMPLES_RGBLED 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 -# CONFIG_EXAMPLES_SMART is not set -# CONFIG_EXAMPLES_SMP is not set -# CONFIG_EXAMPLES_TCPECHO is not set -# CONFIG_EXAMPLES_TELNETD is not set -# CONFIG_EXAMPLES_THTTPD is not set -# CONFIG_EXAMPLES_TIFF is not set -# CONFIG_EXAMPLES_TOUCHSCREEN is not set -# CONFIG_EXAMPLES_WEBSERVER is not set -# CONFIG_EXAMPLES_UNIONFS is not set -# CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBTERM is not set -# CONFIG_EXAMPLES_WATCHDOG is not set - -# -# File System Utilities -# -# CONFIG_FSUTILS_INIFILE is not set -# CONFIG_FSUTILS_PASSWD is not set - -# -# GPS Utilities -# -# CONFIG_GPSUTILS_MINMEA_LIB is not set - -# -# 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 - -# -# FreeModBus -# -# CONFIG_MODBUS is not set - -# -# Network Utilities -# -# CONFIG_NETUTILS_CODECS is not set -# CONFIG_NETUTILS_FTPC is not set -# CONFIG_NETUTILS_JSON is not set -# CONFIG_NETUTILS_SMTP is not set - -# -# NSH Library -# -CONFIG_NSH_LIBRARY=y -# CONFIG_NSH_MOTD is not set - -# -# Command Line Configuration -# -CONFIG_NSH_READLINE=y -# CONFIG_NSH_CLE is not set -CONFIG_NSH_LINELEN=64 -# CONFIG_NSH_DISABLE_SEMICOLON is not set -CONFIG_NSH_CMDPARMS=y -CONFIG_NSH_MAXARGUMENTS=6 -CONFIG_NSH_ARGCAT=y -CONFIG_NSH_NESTDEPTH=3 -# CONFIG_NSH_DISABLEBG is not set -CONFIG_NSH_BUILTIN_APPS=y - -# -# Disable Individual commands -# -# CONFIG_NSH_DISABLE_ADDROUTE is not set -# CONFIG_NSH_DISABLE_BASENAME 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 is not set -# CONFIG_NSH_DISABLE_DD is not set -# CONFIG_NSH_DISABLE_DF is not set -# CONFIG_NSH_DISABLE_DELROUTE is not set -# CONFIG_NSH_DISABLE_DIRNAME is not set -# CONFIG_NSH_DISABLE_ECHO is not set -# CONFIG_NSH_DISABLE_EXEC is not set -# CONFIG_NSH_DISABLE_EXIT is not set -# CONFIG_NSH_DISABLE_FREE is not set -# CONFIG_NSH_DISABLE_GET is not set -# CONFIG_NSH_DISABLE_HELP is not set -# CONFIG_NSH_DISABLE_HEXDUMP is not set -# CONFIG_NSH_DISABLE_IFCONFIG is not set -CONFIG_NSH_DISABLE_IFUPDOWN=y -# CONFIG_NSH_DISABLE_KILL is not set -# CONFIG_NSH_DISABLE_LOSETUP is not set -CONFIG_NSH_DISABLE_LOSMART=y -# CONFIG_NSH_DISABLE_LS is not set -# CONFIG_NSH_DISABLE_MB is not set -# CONFIG_NSH_DISABLE_MKDIR is not set -# CONFIG_NSH_DISABLE_MKFATFS is not set -# CONFIG_NSH_DISABLE_MKFIFO is not set -# 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_POWEROFF is not set -# CONFIG_NSH_DISABLE_PS is not set -# CONFIG_NSH_DISABLE_PUT is not set -# CONFIG_NSH_DISABLE_PWD is not set -# CONFIG_NSH_DISABLE_RM is not set -# CONFIG_NSH_DISABLE_RMDIR is not set -# CONFIG_NSH_DISABLE_SET is not set -# CONFIG_NSH_DISABLE_SH is not set -CONFIG_NSH_DISABLE_SHUTDOWN=y -# CONFIG_NSH_DISABLE_SLEEP is not set -# CONFIG_NSH_DISABLE_TIME is not set -# CONFIG_NSH_DISABLE_TEST is not set -# CONFIG_NSH_DISABLE_UMOUNT is not set -# CONFIG_NSH_DISABLE_UNAME is not set -# CONFIG_NSH_DISABLE_UNSET is not set -# CONFIG_NSH_DISABLE_USLEEP is not set -# CONFIG_NSH_DISABLE_WGET is not set -# CONFIG_NSH_DISABLE_XD is not set - -# -# Configure Command Options -# -CONFIG_NSH_CMDOPT_DF_H=y -CONFIG_NSH_CODECS_BUFSIZE=128 -CONFIG_NSH_CMDOPT_HEXDUMP=y -CONFIG_NSH_FILEIOSIZE=512 - -# -# Scripting Support -# -# CONFIG_NSH_DISABLESCRIPT 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=64 -# 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=40 -CONFIG_NSH_FATMOUNTPT="/tmp" - -# -# Console Configuration -# -CONFIG_NSH_CONSOLE=y -# CONFIG_NSH_ALTCONDEV is not set -# CONFIG_NSH_ARCHINIT is not set -# CONFIG_NSH_LOGIN is not set -# CONFIG_NSH_CONSOLE_LOGIN is not set - -# -# NxWidgets/NxWM -# - -# -# Platform-specific Support -# -# CONFIG_PLATFORM_CONFIGDATA is not set - -# -# System Libraries and NSH Add-Ons -# -CONFIG_SYSTEM_FREE=y -# CONFIG_SYSTEM_CLE is not set -# CONFIG_SYSTEM_CUTERM is not set -CONFIG_SYSTEM_INSTALL=y -# CONFIG_SYSTEM_FLASH_ERASEALL is not set -# CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_SYSTEM_I2CTOOL is not set -# CONFIG_SYSTEM_HEXED is not set -# CONFIG_SYSTEM_RAMTEST is not set -CONFIG_READLINE_HAVE_EXTMATCH=y -CONFIG_SYSTEM_READLINE=y -CONFIG_READLINE_ECHO=y -# CONFIG_READLINE_TABCOMPLETION is not set -# CONFIG_READLINE_CMD_HISTORY is not set -# CONFIG_SYSTEM_SUDOKU is not set -# CONFIG_SYSTEM_VI is not set -# CONFIG_SYSTEM_UBLOXMODEM is not set -# CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/vsn/nsh/setenv.sh b/configs/vsn/nsh/setenv.sh deleted file mode 100755 index 3b9f7f8967..0000000000 --- a/configs/vsn/nsh/setenv.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -# configs/stm3210e-eval/dfu/setenv.sh -# -# Copyright (C) 2009 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. -# - -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` -export BUILDROOT_BIN="${WD}/../buildroot/build_arm_nofpu/staging_dir/bin" -export PATH="${BUILDROOT_BIN}:/sbin:/usr/sbin:${PATH_ORIG}" - -echo "PATH : ${PATH}" diff --git a/configs/vsn/scripts/ld.script b/configs/vsn/scripts/ld.script deleted file mode 100755 index 1ee155fb59..0000000000 --- a/configs/vsn/scripts/ld.script +++ /dev/null @@ -1,117 +0,0 @@ -/**************************************************************************** - * configs/stm3210e-eval/scripts/ld.script - * - * Copyright (C) 2009 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. - * - ****************************************************************************/ - -/* The STM32F103ZET6 has 512Kb of FLASH beginning at address 0x0800:0000 and - * 64Kb of SRAM beginning at address 0x2000:0000. When booting from FLASH, - * FLASH memory is aliased to address 0x0000:0000 where the code expects to - * begin execution by jumping to the entry point in the 0x0800:0000 address - * range. - */ - -MEMORY -{ - flash (rx) : ORIGIN = 0x08000000, LENGTH = 512K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K -} - -OUTPUT_ARCH(arm) -ENTRY(_stext) -SECTIONS -{ - .text : { - _stext = ABSOLUTE(.); - *(.vectors) - *(.text .text.*) - *(.fixup) - *(.gnu.warning) - *(.rodata .rodata.*) - *(.gnu.linkonce.t.*) - *(.glue_7) - *(.glue_7t) - *(.got) - *(.gcc_except_table) - *(.gnu.linkonce.r.*) - _etext = ABSOLUTE(.); - } > flash - - .init_section : { - _sinit = ABSOLUTE(.); - *(.init_array .init_array.*) - _einit = ABSOLUTE(.); - } > flash - - .ARM.extab : { - *(.ARM.extab*) - } > flash - - __exidx_start = ABSOLUTE(.); - .ARM.exidx : { - *(.ARM.exidx*) - } > flash - __exidx_end = ABSOLUTE(.); - - _eronly = ABSOLUTE(.); - - /* The STM32F103Z has 64Kb of SRAM beginning at the following address */ - - .data : { - _sdata = ABSOLUTE(.); - *(.data .data.*) - *(.gnu.linkonce.d.*) - CONSTRUCTORS - _edata = ABSOLUTE(.); - } > sram AT > flash - - .bss : { /* BSS */ - _sbss = ABSOLUTE(.); - *(.bss .bss.*) - *(.gnu.linkonce.b.*) - *(COMMON) - _ebss = ABSOLUTE(.); - } > sram - /* Stabs debugging sections. */ - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - .stab.excl 0 : { *(.stab.excl) } - .stab.exclstr 0 : { *(.stab.exclstr) } - .stab.index 0 : { *(.stab.index) } - .stab.indexstr 0 : { *(.stab.indexstr) } - .comment 0 : { *(.comment) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_info 0 : { *(.debug_info) } - .debug_line 0 : { *(.debug_line) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } -} diff --git a/configs/vsn/scripts/ld.script.dfu b/configs/vsn/scripts/ld.script.dfu deleted file mode 100755 index 3f5e2a06a6..0000000000 --- a/configs/vsn/scripts/ld.script.dfu +++ /dev/null @@ -1,116 +0,0 @@ -/**************************************************************************** - * configs/stm3210e-eval/scripts/ld.script.dfu - * - * Copyright (C) 2009 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. - * - ****************************************************************************/ - -/* The STM32F103ZET6 has 512Kb of FLASH beginning at address 0x0800:0000 and - * 64Kb of SRAM beginning at address 0x2000:0000. Here we assume that the - * STM3210E-EVAL's DFU bootloader is being used. In that case, the corrct - * load .text load address is 0x08003000 (leaving 464Kb). - */ - -MEMORY -{ - flash (rx) : ORIGIN = 0x08003000, LENGTH = 464K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K -} - -OUTPUT_ARCH(arm) -ENTRY(_stext) -SECTIONS -{ - .text : { - _stext = ABSOLUTE(.); - *(.vectors) - *(.text .text.*) - *(.fixup) - *(.gnu.warning) - *(.rodata .rodata.*) - *(.gnu.linkonce.t.*) - *(.glue_7) - *(.glue_7t) - *(.got) - *(.gcc_except_table) - *(.gnu.linkonce.r.*) - _etext = ABSOLUTE(.); - } > flash - - .init_section : { - _sinit = ABSOLUTE(.); - *(.init_array .init_array.*) - _einit = ABSOLUTE(.); - } > flash - - .ARM.extab : { - *(.ARM.extab*) - } > flash - - __exidx_start = ABSOLUTE(.); - .ARM.exidx : { - *(.ARM.exidx*) - } > flash - __exidx_end = ABSOLUTE(.); - - _eronly = ABSOLUTE(.); - - /* The STM32F103Z has 64Kb of SRAM beginning at the following address */ - - .data : { - _sdata = ABSOLUTE(.); - *(.data .data.*) - *(.gnu.linkonce.d.*) - CONSTRUCTORS - _edata = ABSOLUTE(.); - } > sram AT > flash - - .bss : { /* BSS */ - _sbss = ABSOLUTE(.); - *(.bss .bss.*) - *(.gnu.linkonce.b.*) - *(COMMON) - _ebss = ABSOLUTE(.); - } > sram - /* Stabs debugging sections. */ - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - .stab.excl 0 : { *(.stab.excl) } - .stab.exclstr 0 : { *(.stab.exclstr) } - .stab.index 0 : { *(.stab.index) } - .stab.indexstr 0 : { *(.stab.indexstr) } - .comment 0 : { *(.comment) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_info 0 : { *(.debug_info) } - .debug_line 0 : { *(.debug_line) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } -} diff --git a/configs/vsn/src/.gitignore b/configs/vsn/src/.gitignore deleted file mode 100644 index 726d936e1e..0000000000 --- a/configs/vsn/src/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/.depend -/Make.dep diff --git a/configs/vsn/src/Makefile b/configs/vsn/src/Makefile deleted file mode 100644 index 6ee2760000..0000000000 --- a/configs/vsn/src/Makefile +++ /dev/null @@ -1,113 +0,0 @@ -############################################################################ -# configs/vsn/src/Makefile -# -# Copyright (C) 2009-2010, 2012 Gregory Nutt. All rights reserved. -# Copyright (c) 2011 Uros Platise. All rights reserved. -# -# Authors: Gregory Nutt -# Uros Platise -# -# 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. -# -############################################################################ - --include $(TOPDIR)/Make.defs - -#$(TOPDIR)/$(CONFIG_APPS_DIR) -APPDIR = $(TOPDIR)/../apps/ - --include $(APPDIR)/Make.defs - -APPNAME = sif -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 4096 - -CFLAGS += -I$(TOPDIR)/sched - -ASRCS = -AOBJS = $(ASRCS:.S=$(OBJEXT)) - -CSRCS = sysclock.c boot.c leds.c buttons.c spi.c \ - usbdev.c power.c muxbus.c sif.c - -ifeq ($(CONFIG_USBMSC),y) -CSRCS += usbmsc.c -endif -COBJS = $(CSRCS:.c=$(OBJEXT)) - -SRCS = $(ASRCS) $(CSRCS) -OBJS = $(AOBJS) $(COBJS) - -ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src -ifeq ($(WINTOOL),y) - CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/chip}" \ - -I "${shell cygpath -w $(ARCH_SRCDIR)/common}" \ - -I "${shell cygpath -w $(ARCH_SRCDIR)/armv7-m}" -else - CFLAGS += -I$(ARCH_SRCDIR)/chip -I$(ARCH_SRCDIR)/common -I$(ARCH_SRCDIR)/armv7-m -endif - -all: libboard$(LIBEXT) - -$(AOBJS): %$(OBJEXT): %.S - $(call ASSEMBLE, $<, $@) - -$(COBJS) $(LINKOBJS): %$(OBJEXT): %.c - $(call COMPILE, $<, $@) - -libboard$(LIBEXT): $(OBJS) - $(call ARCHIVE, $@, $(OBJS)) - -# Register application - -ifeq ($(CONFIG_NSH_BUILTIN_APPS),y) -$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile - $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) - -context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat -else -context: -endif - -# Create dependencies - -.depend: Makefile $(SRCS) - $(Q) $(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep - $(Q) touch $@ - -depend: .depend - -clean: - $(call DELFILE, libboard$(LIBEXT)) - $(call CLEAN) - -distclean: clean - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - --include Make.dep diff --git a/configs/vsn/src/README.txt b/configs/vsn/src/README.txt deleted file mode 100644 index 3760d55b37..0000000000 --- a/configs/vsn/src/README.txt +++ /dev/null @@ -1,58 +0,0 @@ - -VSN Board Support Package, for the NuttX, Uros Platise -=============================================================================== -http://www.netClamps.com - -The directory contains start-up and board level functions. -Execution starts in the following order: - - - sysclock, immediately after reset stm32_rcc calls external - clock configuration when - CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG=y - is set. It must be set for the VSN board. - - - boot, performs initial chip and board initialization - - sched/os_bringup.c then calls user entry defined in the .config file. - - -Naming throughout the code -========================== - - - _init(): used to be called once only, after powerup, to perform board - initialization - - _start() or called via FS _open(): starts peripheral power, puts it - into operation - - _stop() or called via FS _close(): opposite to _start() - - -System notifications (a sort of run-levels) -=========================================== - -On the VSN, NSH represents the core application as it supports scripts -easily adaptable for any custom application configuration. NSH is -invoked as follows (argument runs a script from the /etc/init.d directory): - - - nsh init: on system powerup called by the NuttX APP_START - -TODOs: - - - nsh xpowerup: run on external power used to: - - try to setup an USB serial connection - - configure SLIP mode, internet - - start other internet services, such as telnetd, ftpd, httpd - - - nsh xpowerdown: run whenever USB recevied suspend signal or - external power has been removed. - - used to stop internet services - - - nsh batdown: whenever battery is completely discharged - - -Compile notes -=============================== - -To link-in the sif_main() utility do, in this folder: - - make context TOPDIR= - -This will result in registering the application into the builtin application -registry. diff --git a/configs/vsn/src/boot.c b/configs/vsn/src/boot.c deleted file mode 100644 index ce56d5bf90..0000000000 --- a/configs/vsn/src/boot.c +++ /dev/null @@ -1,97 +0,0 @@ -/************************************************************************************ - * configs/vsn/src/boot.c - * arch/arm/src/board/boot.c - * - * Copyright (C) 2009, 2015 Gregory Nutt. All rights reserved. - * Copyright (c) 2011 Uros Platise. All rights reserved. - * - * Authors: Gregory Nutt - * Uros Platise - * - * 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. - * - ************************************************************************************/ - -#include - -#include - -#include - -#include "vsn.h" - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -/* Initialize Board - * - * All STM32 architectures must provide the following entry point. This entry point - * is called early in the initialization -- after all memory has been configured - * and mapped but before any devices have been initialized. - */ - -void stm32_boardinitialize(void) -{ - /* Set start-up board voltage */ - - board_power_init(); - vsn_muxbus_init(); - - /* Configure SPI chip selects if 1) SPI is not disabled, and 2) the weak function - * stm32_spidev_initialize() has been brought into the link. - */ - -#if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) || defined(CONFIG_STM32_SPI3) - if (stm32_spidev_initialize) stm32_spidev_initialize(); -#endif - - /* Initialize USB is 1) USBDEV is selected, 2) the USB controller is not - * disabled, and 3) the weak function stm32_usbinitialize() has been brought - * into the build. - */ - -#if defined(CONFIG_USBDEV) && defined(CONFIG_STM32_USB) - if (stm32_usbinitialize) stm32_usbinitialize(); -#endif - - /* Configure on-board LEDs if LED support has been selected. */ - -#ifdef CONFIG_ARCH_LEDS - board_autoled_initialize(); -#endif -} - -/* Application initialization stub for boardctl() */ - -#ifdef CONFIG_LIB_BOARDCTL -int board_app_initialize(void) -{ - return OK; -} -#endif /* CONFIG_LIB_BOARDCTL */ diff --git a/configs/vsn/src/buttons.c b/configs/vsn/src/buttons.c deleted file mode 100644 index 1df2e44d6d..0000000000 --- a/configs/vsn/src/buttons.c +++ /dev/null @@ -1,92 +0,0 @@ -/**************************************************************************** - * configs/vsn/src/buttons.c - * - * Copyright (C) 2011 Uros Platise. All rights reserved. - * - * Authors: Uros Platise - * - * 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. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include -#include -#include - -#include "vsn.h" - -#ifdef CONFIG_ARCH_BUTTONS - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/** Called from an interrupt - * - * \todo Measure the time button is being pressed, and then: - * - if short signal all processes (tasks and threads) with 'button user request': SIGUSR1 - * - if long (>0.5 s) signal all with 'power-off request': SIGTERM - **/ -void buttons_callback(void) -{ -} - - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -void board_button_initialize(void) -{ - stm32_configgpio(GPIO_PUSHBUTTON); -} - - -uint8_t board_buttons(void) -{ - return stm32_gpioread(GPIO_PUSHBUTTON); -} - - -#endif /* CONFIG_ARCH_BUTTONS */ diff --git a/configs/vsn/src/chipcon.c b/configs/vsn/src/chipcon.c deleted file mode 100644 index 32432b34a7..0000000000 --- a/configs/vsn/src/chipcon.c +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** - * configs/vsn/src/chipcon.c - * - * Copyright (C) 2011 Uros Platise. All rights reserved. - * - * Author: Uros Platise - * - * 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. - * - ****************************************************************************/ - -/** \file - * \author Uros Platise - * \brief Chipcon CC1101 Interface - */ - - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/* Set external clock frequency, or disable it */ - -int chipcon_setXclock(int prescaler) -{ - // check present state, if it is enabled (in the chip!) - - // change state and with OK if everything is OK. - - return ERROR; -} - -int chipcon_setchannel(uint16_t channel) -{ -} - -void chipcon_init(int spino) -{ - // create stream driver, where STDIN is packet oriented - // means that two messages received are kept separated - // in internal buffers. - - // default mode is AUTO, RX enabled and auto TX on writes and - // when chipcon is IDLE. -} - -void chipcon_open(void) -{ -} - -void chipcon_ioctl(void) -{ - // access to setXclock -} diff --git a/configs/vsn/src/leds.c b/configs/vsn/src/leds.c deleted file mode 100644 index 7fbd4bf8bd..0000000000 --- a/configs/vsn/src/leds.c +++ /dev/null @@ -1,111 +0,0 @@ -/**************************************************************************** - * configs/vsn/src/leds.c - * arch/arm/src/board/leds.c - * - * Copyright (C) 2011 Uros Platise. All rights reserved. - * - * Authors: Uros Platise - * - * 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. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include - -#include -#include -#include - -#include - -#include "vsn.h" - -#ifdef CONFIG_ARCH_LEDS - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* CONFIG_DEBUG_LEDS enables debug output from this file (needs CONFIG_DEBUG - * with CONFIG_DEBUG_VERBOSE too) - */ - -#ifdef CONFIG_DEBUG_LEDS -# define leddbg lldbg -# define ledvdbg llvdbg -#else -# define leddbg(x...) -# define ledvdbg(x...) -#endif - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -irqstate_t flags; - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -void board_autoled_initialize(void) -{ - stm32_configgpio(GPIO_LED); -} - -void board_autoled_on(int led) -{ - if (led == LED_IDLE) - { - flags = enter_critical_section(); - stm32_gpiowrite(GPIO_LED, true); - } -} - -void board_autoled_off(int led) -{ - if (led == LED_IDLE) - { - stm32_gpiowrite(GPIO_LED, false); - leave_critical_section(flags); - } -} - -#endif /* CONFIG_ARCH_LEDS */ diff --git a/configs/vsn/src/muxbus.c b/configs/vsn/src/muxbus.c deleted file mode 100644 index 1a1ba02c28..0000000000 --- a/configs/vsn/src/muxbus.c +++ /dev/null @@ -1,198 +0,0 @@ -/**************************************************************************** - * config/vsn/src/muxbus.c - * arch/arm/src/board/muxbus.c - * - * Copyright (C) 2011 Uros Platise. All rights reserved. - * - * Authors: Uros Platise - * - * 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. - * - ****************************************************************************/ - -/** \file - * \author Uros Platise - * \brief VSN Multiplexed Bus, SDIO Interface and the Analog Front-End - */ - -#include -#include -#include - -#include "vsn.h" -#include "stm32_gpio.h" - - -/**************************************************************************** - * Private data - ****************************************************************************/ - -/** Set true when the bus has been locked by the SDIO interface */ -bool vsn_muxbus_ownedbysdio; - -/** Semaphore to resolve conflicts between muxbus locks */ -sem_t vsn_muxbus_sem; - - -/**************************************************************************** - * Private functions - ****************************************************************************/ - -void vsn_muxbus_takeownership(void) -{ - while (sem_wait(&vsn_muxbus_sem) != 0) { - - /* The only case that an error should occr here is if the wait was - * awakened by a signal. - */ - - ASSERT(errno == EINTR); - } -} - - -void vsn_muxbus_sdio_release(void) -{ - stm32_unconfiggpio(GPIO_SDIO_D0); - stm32_unconfiggpio(GPIO_SDIO_CK); - stm32_unconfiggpio(GPIO_SDIO_CMD); - - vsn_muxbus_ownedbysdio = FALSE; -} - - -void vsn_muxbus_sdio_access(void) -{ - stm32_configgpio(GPIO_SDIO_D0); - stm32_configgpio(GPIO_SDIO_CK); - stm32_configgpio(GPIO_SDIO_CMD); - - vsn_muxbus_ownedbysdio = TRUE; -} - - -/**************************************************************************** - * Public functions - ****************************************************************************/ - - -void vsn_muxbus_init(void) -{ - /* Put the PGA in default shut-down state */ - - stm32_configgpio(GPIO_PGIA_AEN); - - /* setup semaphore in non-locked condition */ - - sem_init(&vsn_muxbus_sem, 0, 1); - - /* by default give the bus to the SDIO */ - - vsn_muxbus_sdio_access(); -} - - -/** - * We could do extra checks: who is the owner to prevent - * unlocking from SDIO side eventhough it was not locked - * by him, but temporarily by the PGA - */ -void stm32_muxbus_sdio_lock(bool lock) -{ - if ( lock ) - vsn_muxbus_takeownership(); - else - sem_post(&vsn_muxbus_sem); -} - - -/** - * The following rules apply for the SDcard: - * - * - CMD serial line always starts with 0 (start-bit) and ends with 1 (stop-bit) - * The total length is always 48 bits protected by CRCs. When changing the - * gain, CMD must be seen as 1 on CK changes. - * - * - An alternative mechanism would be to use suspend/resume commands - * - * - If SDcard internal shift-register is 8-bit oriented there might be a need - * to shift 7 dummy bits to properly detect invalid start of packet - * (with start bit set as 1) to invalidate bus transitions (in case CK - * is changing). - * - * SDIO returns the bus in HiZ states, where CLK = 0, D = CMD = external pull-up - */ -int vsn_muxbus_setpgagain(int gain) -{ - /* Shutdown the Analog Devices AD8231 and exit if gain is invalid */ - - stm32_gpiowrite(GPIO_PGIA_AEN, FALSE); - - if (gain < 0 || gain > 7) - return -1; - - vsn_muxbus_takeownership(); - vsn_muxbus_sdio_release(); - - /* If we have to set CLK = 1, made that first as D, CMD are 1 by pull-ups */ - - if (gain & 2) - stm32_configgpio(GPIO_PGIA_A1_H); - else stm32_configgpio(GPIO_PGIA_A1_L); - - /* Set the D and CMD bits */ - - if (gain & 1) - stm32_configgpio(GPIO_PGIA_A0_H); - else stm32_configgpio(GPIO_PGIA_A0_L); - - if (gain & 4) - stm32_configgpio(GPIO_PGIA_A2_H); - else stm32_configgpio(GPIO_PGIA_A2_L); - - /* Sample GAIN on rising edge */ - - stm32_gpiowrite(GPIO_PGIA_AEN, TRUE); - - /* Release D and CMD pins to 1; however shorten rising edge actively */ - - stm32_gpiowrite(GPIO_PGIA_A0_H, TRUE); - stm32_gpiowrite(GPIO_PGIA_A2_H, TRUE); - - stm32_unconfiggpio(GPIO_PGIA_A0_H); - stm32_unconfiggpio(GPIO_PGIA_A2_H); - - /* Release CLK by going down and return the bus */ - - stm32_unconfiggpio(GPIO_PGIA_A1_L); - - vsn_muxbus_sdio_access(); - sem_post(&vsn_muxbus_sem); - - return gain; -} diff --git a/configs/vsn/src/power.c b/configs/vsn/src/power.c deleted file mode 100644 index 82fde3f0a9..0000000000 --- a/configs/vsn/src/power.c +++ /dev/null @@ -1,117 +0,0 @@ -/**************************************************************************** - * config/vsn/src/power.c - * arch/arm/src/board/power.c - * - * Copyright (C) 2011 Uros Platise. All rights reserved. - * - * Authors: Uros Platise - * - * 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. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include - -#include - -#include -#include -#include - -#include "vsn.h" - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -void board_power_register(void); -void board_power_adjust(void); -void board_power_status(void); - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -void board_power_init(void) -{ - stm32_configgpio(GPIO_PVS); - stm32_configgpio(GPIO_PST); - stm32_configgpio(GPIO_XPWR); - stm32_configgpio(GPIO_SCTC); - stm32_configgpio(GPIO_PCLR); -} - -/**************************************************************************** - * Name: board_power_off - * - * Description: - * Power off the board. - * - * If this function returns, then it was not possible to power-off the - * board due to some other constraints. - * - * Input Parameters: - * status - Status information provided with the power off event. - * - * Returned Value: - * If this function returns, then it was not possible to power-off the - * board due to some constraints. The return value int this case is a - * board-specific reason for the failure to shutdown. - * - ****************************************************************************/ - -#ifdef CONFIG_BOARDCTL_POWEROFF -int board_power_off(int status) -{ - /* Check if external supply is not present, otherwise return - * notifying that it is not possible to power-off the board - * REVISIT - */ - - /* stop background processes */ - - (void)up_irq_save(); - - /* switch to internal HSI and get the PD0 and PD1 as GPIO */ - - sysclock_select_hsi(); - - /* trigger shutdown with pull-up resistor (not push-pull!) and wait. */ - - stm32_gpiowrite(GPIO_PCLR, true); - for (;;); -} -#endif diff --git a/configs/vsn/src/rtac.c b/configs/vsn/src/rtac.c deleted file mode 100644 index 1b4c67e74d..0000000000 --- a/configs/vsn/src/rtac.c +++ /dev/null @@ -1,106 +0,0 @@ -/**************************************************************************** - * config/vsn/src/rtac.c - * arch/arm/src/board/rtac.c - * - * Copyright (C) 2011 Uros Platise. All rights reserved. - * - * Authors: Uros Platise - * - * 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. - * - ****************************************************************************/ - -/** \file - * \author Uros Platise - * \brief Real Time Alarm Clock - * - * Implementation of the Real-Time Alarm Clock as per SNP Specifications. - * It provides real-time and phase controlled timer module while it - * cooperates with hardware RTC for low-power operation. - * - * It provides a replacement for a system 32-bit UTC time/date counter. - * - * It runs at maximum STM32 allowed precision of 16384 Hz, providing - * resolution of 61 us, required by the Sensor Network Protocol. - */ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/** Execute from a group of events - **/ -int rtac_execg(int group) -{ - // called by each thread to spawn its apps given by its ID or group ID of - // multiple threads, when group parameter is set. -} - - -/** Wait and execute from a group of events - **/ -int rtac_waitg(int group, int time) -{ - // blocking variant of rtac_exec with timeout if specified -} - - -/** Power optimization of base systick timer - * - * 1. Simple method to skip wake-ups: - * - ask timers about the min. period, which is Ns * systick - * - set the preload register with floor(Ns) * DEFAULT_PRELOAD - * - on wake-up call routines Ns times. - * - * 2. If intermediate ISR occuried then: - * - check how many periods have passed by reading the counter: Np - * - set the new counter value as (counter % DEFAULT_PRELOAD) - * - call timer routines Np times; the next call is as usual, starting - * at 1. point above - * - * This is okay if ISR's do not read timers, if they read timers then: - * - on ISR wake-up the code described under 2. must be called first - * (on wake-up from IDLE) - * - * BUT: the problem is that SYSTICK does not run in Stop mode but RTC - * only, so it might be better to replace SYSTICK with RTAC (this - * module) and do the job above, permitting ultra low power modes of - * 25 uA or further down to 5 uA. - */ diff --git a/configs/vsn/src/sif.c b/configs/vsn/src/sif.c deleted file mode 100644 index 7a490c70c7..0000000000 --- a/configs/vsn/src/sif.c +++ /dev/null @@ -1,690 +0,0 @@ -/**************************************************************************** - * config/vsn/src/sif.c - * - * Copyright (C) 2011 Uros Platise. All rights reserved. - * - * Authors: Uros Platise - * - * 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. - * - ****************************************************************************/ - -/* Public interface: - * - sif_init(): should be called just once after system starts, to - * initialize internal data structures, device driver and hardware - * - individual starts() and stops() that control gpio, usart, i2c, ... - * are wrapped throu open() and close() - * - read() and write() are used for streaming - * - ioctl() for configuration - * - * STDOUT Coding 16-bit (little endian): - * - MSB = 0 GPIOs, followed by the both GPIO config bytes - * - MSB = 1 Input AD, centered around 0x4000 - * - * STDIN Coding 16-bit (little endian): - * - MSB = 0 GPIOs, followed by the both GPIO config bytes - * - MSB-1 = 0 Analog Output (PWM or Power) - * - MSB-1 = 1 Analog Reference Tap - * - * GPIO Update cycle: - * - if they follow the Analog Output, they are synced with them - * - if they follow the Analog Reference Tap, they are synced with them - * - if either is configured without sample rate value, they are updated - * immediately, same as them - * - * Implementation: - * - Complete internal states and updateing is made via the struct - * vsn_sif_s, which is also accessible thru the ioctl() with - * SNP Message descriptor. - */ - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "stm32_gpio.h" -#include "stm32_spi.h" -#include "stm32_i2c.h" - -#include "vsn.h" - -/**************************************************************************** - * Declarations and Structures - ****************************************************************************/ - -#define VSN_SIF_READ_BUFSIZE 128 -#define VSN_SIF_WRITE_BUFSIZE 128 - - -typedef unsigned char vsn_sif_state_t; - -# define VSN_SIF_STATE_POWERDOWN 0x00 ///< power-down - -# define VSN_SIF_STATE_ACT_GPIO 0x01 ///< gpio is active -# define VSN_SIF_STATE_ACT_USART 0x02 ///< usart is active -# define VSN_SIF_STATE_ACT_I2C 0x04 ///< i2c is active -# define VSN_SIF_STATE_ACT_OWIR1 0x08 ///< 1-wire is active on first GPIO -# define VSN_SIF_STATE_ACT_OWIR2 0x10 ///< 1-wire is active on second GPIO - -# define VSN_SIF_STATE_ACT_ANOUT 0x20 ///< analog output is active -# define VSN_SIF_STATE_ACT_ANIN 0x40 ///< analog input is active - - -typedef unsigned char vsn_sif_gpio_t; - -# define VSN_SIF_GPIO_STATE_MASK 7 -# define VSN_SIF_GPIO_HIGHZ 0 ///< High-Z -# define VSN_SIF_GPIO_PULLUP 1 ///< Pull-Up -# define VSN_SIF_GPIO_PULLDOWN 2 ///< Pull-Down -# define VSN_SIF_GPIO_OUTLOW 3 ///< Set Low -# define VSN_SIF_GPIO_OUTHIGH 4 ///< Set High - -# define VSN_SIF_GPIO_DISALT_MASK 0x10 ///< Disable Alternate Function, Mask Bit -# define VSN_SIF_GPIO_TRIG_MASK 0x20 ///< Send data change to the stdout -# define VSN_SIF_GPIO_READ_MASK 0x40 ///< Readout mask - - -#define VSN_SIF_ANOUT_LOW 0 // Pseudo Analog Output acts as GPIO -#define VSN_SIF_ANOUT_HIGH 1 // Pseudo Analog Output acts as GPIO high -#define VSN_SIF_ANOUT_HIGHPWR 2 // ... acts as high power output -#define VSN_SIF_ANOUT_PWM 3 // ... acts as PWM output -#define VSN_SIF_ANOUT_PWMPWR 4 // acts as power PWM output - -#define VSN_SIF_ANIN_GAINMASK 7 -#define VSN_SIF_ANIN_GAIN1 0 -#define VSN_SIF_ANIN_GAIN2 1 -#define VSN_SIF_ANIN_GAIN4 2 -#define VSN_SIF_ANIN_GAIN8 3 -#define VSN_SIF_ANIN_GAIN16 4 -#define VSN_SIF_ANIN_GAIN32 5 -#define VSN_SIF_ANIN_GAIN64 6 -#define VSN_SIF_ANIN_GAIN128 7 - -#define VSN_SIF_ANIN_BITS8 -#define VSN_SIF_ANIN_BITS9 -#define VSN_SIF_ANIN_BITS10 -#define VSN_SIF_ANIN_BITS11 -#define VSN_SIF_ANIN_BITS12 -#define VSN_SIF_ANIN_BITS13 -#define VSN_SIF_ANIN_BITS14 - -#define VSN_SIF_ANIN_OVERSMP1 -#define VSN_SIF_ANIN_OVERSMP2 -#define VSN_SIF_ANIN_OVERSMP4 -#define VSN_SIF_ANIN_OVERSMP8 -#define VSN_SIF_ANIN_OVERSMP16 - - -struct vsn_sif_s -{ - vsn_sif_state_t state; /* Activity */ - unsigned char opencnt; /* Open count */ - - vsn_sif_gpio_t gpio[2]; - - unsigned char anout_opts; - unsigned short int anout_width; - unsigned short int anout_period; /* Setting it to 0, disables PWM */ - unsigned short int anout_samplerate; /* As written by write() */ - - unsigned short int anref_width; - unsigned short int anref_period; /* Setting it to 0, disables PWM */ - unsigned short int anref_samplerate; /* As written by write() */ - - unsigned char anin_opts; - unsigned int anin_samplerate; /* Returned on read() as 16-bit results */ - - /*--- Private Data ---*/ - - struct stm32_tim_dev_s *tim3; /* Timer3 is used for PWM, and Analog RefTap */ - struct stm32_tim_dev_s *tim8; /* Timer8 is used for Power Switch */ - - struct i2c_master_s *i2c1; - struct i2c_master_s *i2c2; - - struct spi_dev_s *spi2; - - sem_t exclusive_access; -}; - -/**************************************************************************** - * Private data - ****************************************************************************/ - -struct vsn_sif_s vsn_sif; - -/**************************************************************************** - * Semaphores - ****************************************************************************/ - -void sif_sem_wait(void) -{ - while (sem_wait(&vsn_sif.exclusive_access) != 0) - { - ASSERT(errno == EINTR); - } -} - -void inline sif_sem_post(void) -{ - sem_post(&vsn_sif.exclusive_access); -} - -/**************************************************************************** - * GPIOs and Alternative Functions - ****************************************************************************/ - -void sif_gpios_reset(void) -{ - vsn_sif.gpio[0] = vsn_sif.gpio[1] = VSN_SIF_GPIO_HIGHZ; - - stm32_configgpio(GPIO_GP1_HIZ); - stm32_configgpio(GPIO_GP2_HIZ); -} - -void sif_gpio1_update(void) -{ - uint32_t val; - - switch(vsn_sif.gpio[0] & VSN_SIF_GPIO_STATE_MASK) { - case VSN_SIF_GPIO_HIGHZ: val = GPIO_GP1_HIZ; break; - case VSN_SIF_GPIO_PULLUP: val = GPIO_GP1_PUP; break; - case VSN_SIF_GPIO_PULLDOWN: val = GPIO_GP1_PDN; break; - case VSN_SIF_GPIO_OUTLOW: val = GPIO_GP1_LOW; break; - case VSN_SIF_GPIO_OUTHIGH: val = GPIO_GP1_HIGH;break; - default: return; - } - if (stm32_configgpio(val) == ERROR) - printf("Error updating1\n"); - - if (stm32_gpioread(val)) - vsn_sif.gpio[0] |= VSN_SIF_GPIO_READ_MASK; - else vsn_sif.gpio[0] &= ~VSN_SIF_GPIO_READ_MASK; -} - -void sif_gpio2_update(void) -{ - uint32_t val; - - switch(vsn_sif.gpio[1]) { - case VSN_SIF_GPIO_HIGHZ: val = GPIO_GP2_HIZ; break; - case VSN_SIF_GPIO_PULLUP: val = GPIO_GP2_PUP; break; - case VSN_SIF_GPIO_PULLDOWN: val = GPIO_GP2_PDN; break; - case VSN_SIF_GPIO_OUTLOW: val = GPIO_GP2_LOW; break; - case VSN_SIF_GPIO_OUTHIGH: val = GPIO_GP2_HIGH;break; - default: return; - } - if (stm32_configgpio(val) == ERROR) - printf("Error updating2\n"); - - if (stm32_gpioread(val)) - vsn_sif.gpio[1] |= VSN_SIF_GPIO_READ_MASK; - else vsn_sif.gpio[1] &= ~VSN_SIF_GPIO_READ_MASK; -} - -int sif_gpios_lock(vsn_sif_state_t peripheral) -{ - return ERROR; -} - - -int sif_gpios_unlock(vsn_sif_state_t peripheral) -{ - return ERROR; -} - -/**************************************************************************** - * Analog Outputs - ****************************************************************************/ - -static volatile int test = 0, teirq; - -static int sif_anout_isr(int irq, void *context) -{ - STM32_TIM_ACKINT(vsn_sif.tim8, 0); - - test++; - teirq = irq; - - return OK; -} - -int sif_anout_init(void) -{ - vsn_sif.tim3 = stm32_tim_init(3); - vsn_sif.tim8 = stm32_tim_init(8); - - if (!vsn_sif.tim3 || !vsn_sif.tim8) return ERROR; - - // Use the TIM3 as PWM modulated analogue output - - STM32_TIM_SETPERIOD(vsn_sif.tim3, 5); - STM32_TIM_SETCOMPARE(vsn_sif.tim3, GPIO_OUT_PWM_TIM3_CH, 3); - - STM32_TIM_SETCLOCK(vsn_sif.tim3, 36e6); - STM32_TIM_SETMODE(vsn_sif.tim3, STM32_TIM_MODE_UP); - STM32_TIM_SETCHANNEL(vsn_sif.tim3, GPIO_OUT_PWM_TIM3_CH, STM32_TIM_CH_OUTPWM | STM32_TIM_CH_POLARITY_NEG); - - // Use the TIM8 to drive the upper power mosfet - - STM32_TIM_SETISR(vsn_sif.tim8, sif_anout_isr, 0); - STM32_TIM_ENABLEINT(vsn_sif.tim8, 0); - - STM32_TIM_SETPERIOD(vsn_sif.tim8, 4096); - STM32_TIM_SETCOMPARE(vsn_sif.tim8, GPIO_OUT_PWRPWM_TIM8_CH, 5000); - - STM32_TIM_SETCLOCK(vsn_sif.tim8, 36e6); - STM32_TIM_SETMODE(vsn_sif.tim8, STM32_TIM_MODE_UP); - //STM32_TIM_SETCHANNEL(vsn_sif.tim8, GPIO_OUT_PWRPWM_TIM8_CH, STM32_TIM_CH_OUTPWM | STM32_TIM_CH_POLARITY_NEG); - - vsn_sif.i2c1 = stm32_i2cbus_initialize(1); - vsn_sif.i2c2 = stm32_i2cbus_initialize(2); - - vsn_sif.spi2 = stm32_spibus_initialize(2); - - return OK; -} - - -void sif_anout_update(void) -{ -} - -void sif_anout_callback(void) -{ - // called at rate of PWM interrupt -} - -/**************************************************************************** - * Analog Input Reference Tap - ****************************************************************************/ - -void sif_anref_init(void) -{ -} - -/**************************************************************************** - * Analog Input Sampler Unit - ****************************************************************************/ - -#if 0 -/** - * Gain is set using the shared multiplexed bus with the SDIO card. - * The following rules apply for the SDcard: - * - * - CMD serial line always starts with 0 (start-bit) and ends with 1 (stop-bit) - * The total length is always 48 bits protected by CRCs. When changing the - * gain, CMD must be seen as 1 on CK changes. - * - * - An alternative mechanism would be to use suspend/resume commands - * - * - If SDcard internal shift-register is 8-bit oriented there might be a need - * to shift 7 dummy bits to properly detect invalid start of packet - * (with start bit set as 1) to invalidate bus transitions (in case CK - * is changing). - * - * SDIO returns the bus in HiZ states, where CLK = 0, D = CMD = external pull-up - */ -int sif_anin_setgain(int gain) -{ - /* Shutdown the PGA and exit if gain is invalid */ - - stm32_gpiowrite(GPIO_PGIA_AEN, FALSE); - - if (gain < 0 || gain > 7) - return -1; - - sdio_gpio_request(); - - /* If we have to set CLK = 1, made that first as D, CMD are 1 by pull-ups */ - - if (gain & 2) - stm32_configgpio(GPIO_PGIA_A1_H); - else stm32_configgpio(GPIO_PGIA_A1_L); - - /* Set the D and CMD bits */ - - if (gain & 1) - stm32_configgpio(GPIO_PGIA_A0_H); - else stm32_configgpio(GPIO_PGIA_A0_L); - - if (gain & 4) - stm32_configgpio(GPIO_PGIA_A2_H); - else stm32_configgpio(GPIO_PGIA_A2_L); - - /* Sample GAIN on rising edge */ - - stm32_gpiowrite(GPIO_PGIA_AEN, TRUE); - - /* Release D and CMD pins to 1; however shorten rising edge actively */ - - stm32_gpiowrite(GPIO_PGIA_A0_H, TRUE); - stm32_gpiowrite(GPIO_PGIA_A2_H, TRUE); - - stm32_unconfiggpio(GPIO_PGIA_A0_H); - stm32_unconfiggpio(GPIO_PGIA_A2_H); - - /* Release CLK by going down */ - - stm32_unconfiggpio(GPIO_PGIA_A1_L); - - sdio_gpio_release(); - - return gain; -} -#endif - -int sif_anin_reset(void) -{ - return OK; -} - -/**************************************************************************** - * Device driver functions - ****************************************************************************/ - -int devsif_open(FAR struct file *filep) -{ - sif_sem_wait(); - vsn_sif.opencnt++; - - // Start Hardware - - sif_sem_post(); - return 0; -} - -int devsif_close(FAR struct file *filep) -{ - sif_sem_wait(); - - if (--vsn_sif.opencnt) { - - // suspend (powerdown) hardware - - sif_gpios_reset(); - - //STM32_TIM_SETCLOCK(vsn_sif.tim3, 0); - //STM32_TIM_SETCLOCK(vsn_sif.tim8, 0); - } - - sif_sem_post(); - return 0; -} - -static ssize_t devsif_read(FAR struct file *filep, FAR char *buffer, size_t len) -{ - sif_sem_wait(); - memset(buffer, 0, len); - sif_sem_post(); - return len; -} - -static ssize_t devsif_write(FAR struct file *filep, FAR const char *buffer, size_t len) -{ - sif_sem_wait(); - printf("getpid: %d\n", getpid()); - sif_sem_post(); - return len; -} - -#ifndef CONFIG_DISABLE_POLL -static int devsif_poll(FAR struct file *filep, FAR struct pollfd *fds, - bool setup) -{ - if (setup) { - fds->revents |= (fds->events & (POLLIN|POLLOUT)); - - if (fds->revents != 0) { - sem_post(fds->sem); - } - } - return OK; -} -#endif - -int devsif_ioctl(FAR struct file *filep, int cmd, unsigned long arg) -{ - sif_sem_wait(); - sif_sem_post(); - return 0; -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -static const struct file_operations devsif_fops = { - devsif_open, /* open */ - devsif_close, /* close */ - devsif_read, /* read */ - devsif_write, /* write */ - 0, /* seek */ - devsif_ioctl /* ioctl */ -#ifndef CONFIG_DISABLE_POLL - , devsif_poll /* poll */ -#endif -}; - -/** Bring up the Sensor Interface by initializing all of the desired - * hardware components. - **/ - -int sif_init(void) -{ - /* Initialize data-structure */ - - vsn_sif.state = VSN_SIF_STATE_POWERDOWN; - vsn_sif.opencnt = 0; - sem_init(&vsn_sif.exclusive_access, 0, 1); - - /* Initialize hardware */ - - sif_gpios_reset(); - if (sif_anout_init() != OK) return -1; - if (sif_anin_reset() != OK) return -1; - - /* If everything is okay, register the driver */ - - (void)register_driver("/dev/sif0", &devsif_fops, 0666, NULL); - return OK; -} - -/** SIF Utility - * - * Provides direct access to the sensor connector, readings, and diagnostic. - **/ - -extern int cc1101_eventcb(int irq, FAR void *context); - -int sif_main(int argc, char *argv[]) -{ - if (argc >= 2) { - if (!strcmp(argv[1], "init")) { - return sif_init(); - } - else if (!strcmp(argv[1], "gpio") && argc == 4) { - vsn_sif.gpio[0] = atoi(argv[2]); - vsn_sif.gpio[1] = atoi(argv[3]); - sif_gpio1_update(); - sif_gpio2_update(); - printf("GPIO States: %2x %2x\n", vsn_sif.gpio[0], vsn_sif.gpio[1]); - return 0; - } - else if (!strcmp(argv[1], "pwr") && argc == 3) { - int val = atoi(argv[2]); - //STM32_TIM_SETCOMPARE(vsn_sif.tim8, GPIO_OUT_PWRPWM_TIM8_CH, val); - STM32_TIM_SETCOMPARE(vsn_sif.tim3, GPIO_OUT_PWM_TIM3_CH, val); - return 0; - } - else if (!strcmp(argv[1], "time") && argc == 3) { - struct timespec t_set; - t_set.tv_sec = atoi(argv[2]); - clock_settime(CLOCK_REALTIME, &t_set); - } - else if (!strcmp(argv[1], "free")) { - size_t page = 0, stpage = 0xFFFF; - ssize_t status; - do { - status = up_progmem_ispageerased(page++); - - /* Is this beginning of new free space section */ - if (status == 0) { - if (stpage == 0xFFFF) stpage = page-1; - } - else if (status != 0) { - if (stpage != 0xFFFF) { - printf("Free Range:\t%lu\t-\t%lu\n", - (unsigned long)stpage, (unsigned long)(page-2)); - stpage = 0xFFFF; - } - } - } - while (status >= 0); - return 0; - } - else if (!strcmp(argv[1], "erase") && argc == 3) { - size_t page = atoi(argv[2]); - printf("Erase result: %d\n", up_progmem_erasepage(page)); - return 0; - } - else if (!strcmp(argv[1], "flash") && argc == 3) { - size_t page = atoi(argv[2]); - size_t addr = page * up_progmem_pagesize(page); - - printf("Write result: %d (writing to address %lxh)\n", - up_progmem_write(addr, "Test", 4), (unsigned long)addr); - return 0; - } - else if (!strcmp(argv[1], "i2c") && argc == 3) { - int val = atoi(argv[2]); - struct lis331dl_dev_s * lis = lis331dl_init(vsn_sif.i2c1, val); - - if (lis) { - const struct lis331dl_vector_s * a; - systime_t time_stamp = clock_systimer(); - int i; - - /* Set to 400 Hz : 3 = 133 Hz/axis */ - - lis331dl_setconversion(lis, false, true); - - /* Sample some values */ - - for (i=0; i<1000;) { - if ((a = lis331dl_getreadings(lis))) { - i++; - printf("%d %d %d\n", a->x, a->y, a->z); - } - else if (errno != 11) { - printf("Readings errno %d\n", errno); - break; - } - } - - printf("Time diff = %ld\n", - (long)(clock_systimer() - time_stamp)); - - lis331dl_deinit(lis); - } - else printf("Exit point: errno=%d\n", errno); - - return 0; - } - else if (!strcmp(argv[1], "pga")) { - int gain = atoi(argv[2]); - - gain = vsn_muxbus_setpgagain(gain); - - printf("Gain changed: %d\n", gain); - return 0; - } - else if (!strcmp(argv[1], "cc")) { - struct cc1101_dev_s * cc; - uint8_t buf[64]; - int sta; - - cc = cc1101_init(vsn_sif.spi2, CC1101_PIN_GDO0, GPIO_CC1101_GDO0, - &cc1101_rfsettings_ISM1_868MHzGFSK100kbps); - - if (cc) { - - /* Work-around: enable falling edge, event and interrupt */ - stm32_gpiosetevent(GPIO_CC1101_GDO0, false, true, true, cc1101_eventcb); - - /* Enable clock to ARM PLL, allowing to speed-up to 72 MHz */ - cc1101_setgdo(cc, CC1101_PIN_GDO2, CC1101_GDO_CLK_XOSC3); - - cc1101_setchannel(cc, 0); /* AV Test Hex, receive on that channel */ - cc1101_receive(cc); /* Enter RX mode */ - while (1) - { - fflush(stdout); - sta = cc1101_read(cc, buf, 64); - if (sta > 0) { - printf("Received %d bytes: rssi=%d [dBm], LQI=%d (CRC %s)\n", - sta, cc1101_calcRSSIdBm(buf[sta-2]), buf[sta-1]&0x7F, - (buf[sta-1]&0x80)?"OK":"BAD"); - - cc1101_write(cc, buf, 61); - cc1101_send(cc); - - printf("Packet send back\n"); - - cc1101_receive(cc); - } - } - } - } - } - - fprintf(stderr, "%s:\tinit\n\tgpio\tA B\n\tpwr\tval\n", argv[0]); - - fprintf(stderr, "rtc time = %u, time / systick = %u / %u\n", - up_rtc_time(), time(NULL), clock_systimer()); - return -1; -} diff --git a/configs/vsn/src/spi.c b/configs/vsn/src/spi.c deleted file mode 100644 index 5f237cac85..0000000000 --- a/configs/vsn/src/spi.c +++ /dev/null @@ -1,191 +0,0 @@ -/************************************************************************************ - * configs/vsn/src/spi.c - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Copyright (C) 2011 Uros Platise. All rights reserved. - * - * Authors: Gregory Nutt - * Uros Platise - * - * 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. - * - ************************************************************************************/ - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include -#include - -#if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) || defined(CONFIG_STM32_SPI3) - -#include - -#include -#include -#include - -#include "up_arch.h" -#include "chip.h" -#include "stm32_gpio.h" -#include "stm32.h" -#include "stm32_waste.h" -#include "vsn.h" - -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SPI_DEBUG /* Define to enable debug */ -#undef SPI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SPI_DEBUG -# define spidbg lldbg -# ifdef SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - - -/** Called to configure SPI chip select GPIO pins for the VSN board. - */ - -void weak_function stm32_spidev_initialize(void) -{ - /* NOTE: Clocking for SPI1 and/or SPI2 and SPI3 was already provided in stm32_rcc.c. - * Configurations of SPI pins is performed in stm32_spi.c. - * Here, we only initialize chip select pins unique to the board architecture. - */ - -#ifdef CONFIG_STM32_SPI2 - stm32_configgpio(GPIO_CC1101_CS); -#endif - -#ifdef CONFIG_STM32_SPI3 - stm32_configgpio(GPIO_FRAM_CS); -#endif -} - -/** Selects: stm32_spi1/2/3select and stm32_spi1/2/3status - * - * The external functions, stm32_spi1/2/3select and stm32_spi1/2/3status must be - * provided by board-specific logic. They are implementations of the select - * and status methods of the SPI interface defined by struct spi_ops_s (see - * include/nuttx/spi/spi.h). All other methods (including stm32_spibus_initialize()) - * are provided by common STM32 logic. To use this common SPI logic on your - * board: - * - * 1. Provide logic in stm32_boardinitialize() to configure SPI chip select - * pins. - * 2. Provide stm32_spi1/2/3select() and stm32_spi1/2/3status() functions in your - * board-specific logic. These functions will perform chip selection and - * status operations using GPIOs in the way your board is configured. - * 3. Add a calls to stm32_spibus_initialize() in your low level application - * initialization logic - * 4. The handle returned by stm32_spibus_initialize() may then be used to bind the - * SPI driver to higher level logic (e.g., calling - * mmcsd_spislotinitialize(), for example, will bind the SPI driver to - * the SPI MMC/SD driver). - * - **/ - -#ifdef CONFIG_STM32_SPI1 - -void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) -{ - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); -} - -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) -{ - return SPI_STATUS_PRESENT; -} - -#endif - -#ifdef CONFIG_STM32_SPI2 - -void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) -{ - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); - - if (devid == SPIDEV_WIRELESS) { - - stm32_gpiowrite(GPIO_CC1101_CS, !selected); - - /* Wait for MISO to go low, indicates that Quart has stabilized */ - - if (selected) - { - while (stm32_gpioread(GPIO_SPI2_MISO) ) up_waste(); - } - - } -} - -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) -{ - return SPI_STATUS_PRESENT; -} - -#endif - -#ifdef CONFIG_STM32_SPI3 - -void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) -{ - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); - if (devid == SPIDEV_FLASH) - { - /* Set the GPIO low to select and high to de-select */ - stm32_gpiowrite(GPIO_FRAM_CS, !selected); - } -} - -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) -{ - return SPI_STATUS_PRESENT; -} - -#endif - -#endif /* CONFIG_STM32_SPI1 || CONFIG_STM32_SPI2 */ diff --git a/configs/vsn/src/sysclock.c b/configs/vsn/src/sysclock.c deleted file mode 100644 index abb05e613f..0000000000 --- a/configs/vsn/src/sysclock.c +++ /dev/null @@ -1,194 +0,0 @@ -/**************************************************************************** - * configs/vsn/src/sysclock.c - * - * Copyright (C) 2011 Uros Platise. All rights reserved. - * - * Author: Uros Platise - * - * 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. - * - ****************************************************************************/ - -/** \file - * \author Uros Platise - * \brief VSN System Clock Configuration - */ - -#include "vsn.h" - - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/** Selects internal HSI Clock, SYSCLK = 36 MHz, HCLK = 36 MHz - * - HSI at 8 MHz, :2 enters DPLL * 9, to get 36 MHz - * - AHB prescaler is set to 1 for maximum performance of all peripherals and FRAM (18 Mbps) - * - Suitable for start-up and lower power operation - * - Flash Wait State = 1, since it is 64-bit prefetch, it satisfies two 32-bit instructions - * (and branch losses a single cycle only, I found this as the best performance vs. frequency) - * - Sleep with peripherals disabled is about 2.5 mA @ 36 MHz, HSI - * - * \todo: - * - dynamic clock scalling according to cross-peripheral requirements, AHB prescaler could - * change if all other prescalers increase, to maintain the ratio and to have min. HCLK - * possible; This is of interest when peripherals consume 50% of all power, as for instance - * in sleep mode @ 36 MHz, HSI with all peripherals enabled, i = 7 mA, on 24 Mhz 4.8 mA and - * on 16 MHz 3.2 mA only. - * - * \return Nothing, operation is always successful. - */ -void sysclock_select_hsi(void) -{ - uint32_t regval; - - // Are we running on HSE? - regval = getreg32(STM32_RCC_CR); - if (regval & RCC_CR_HSEON) { - - // \todo: check is if we are running on HSE, we need the step down sequenuce from HSE -> HSI - - return; // do nothing at this time - } - - // Set FLASH prefetch buffer and 1 wait state - regval = getreg32(STM32_FLASH_ACR); - regval &= ~FLASH_ACR_LATENCY_MASK; - regval |= (FLASH_ACR_LATENCY_1|FLASH_ACR_PRTFBE); - putreg32(regval, STM32_FLASH_ACR); - - // Set the HCLK source/divider - regval = getreg32(STM32_RCC_CFGR); - regval &= ~RCC_CFGR_HPRE_MASK; - regval |= STM32_RCC_CFGR_HPRE_HSI; - putreg32(regval, STM32_RCC_CFGR); - - // Set the PCLK2 divider - regval = getreg32(STM32_RCC_CFGR); - regval &= ~RCC_CFGR_PPRE2_MASK; - regval |= STM32_RCC_CFGR_PPRE2; - putreg32(regval, STM32_RCC_CFGR); - - // Set the PCLK1 divider - regval = getreg32(STM32_RCC_CFGR); - regval &= ~RCC_CFGR_PPRE1_MASK; - regval |= STM32_RCC_CFGR_PPRE1; - putreg32(regval, STM32_RCC_CFGR); - - // Set the TIM1..8 clock multipliers -#ifdef STM32_TIM27_FREQMUL2 -#endif - -#ifdef STM32_TIM18_FREQMUL2 -#endif - - // Set the PLL source = HSI, divider (/2) and multipler (*9) - regval = getreg32(STM32_RCC_CFGR); - regval &= ~(RCC_CFGR_PLLSRC|RCC_CFGR_PLLXTPRE|RCC_CFGR_PLLMUL_MASK); - regval |= (STM32_CFGR_PLLSRC_HSI|STM32_CFGR_PLLMUL_HSI); - putreg32(regval, STM32_RCC_CFGR); - - // Enable the PLL - regval = getreg32(STM32_RCC_CR); - regval |= RCC_CR_PLLON; - putreg32(regval, STM32_RCC_CR); - - // Wait until the PLL is ready - while ((getreg32(STM32_RCC_CR) & RCC_CR_PLLRDY) == 0); - - // Select the system clock source (probably the PLL) - regval = getreg32(STM32_RCC_CFGR); - regval &= ~RCC_CFGR_SW_MASK; - regval |= STM32_SYSCLK_SW; - putreg32(regval, STM32_RCC_CFGR); - - // Wait until the selected source is used as the system clock source - while ((getreg32(STM32_RCC_CFGR) & RCC_CFGR_SWS_MASK) != STM32_SYSCLK_SWS); - - // map port PD0 and PD1 on OSC pins - regval = getreg32(STM32_AFIO_MAPR); - regval |= AFIO_MAPR_PD01_REMAP; - putreg32(regval, STM32_AFIO_MAPR); -} - - -/** Selects external HSE Clock, SYSCLK = 72 MHz, HCLK = 36/72 MHz - * - HSE at 9 MHz, DPLL * 8, to get 72 MHz - * - Suitable for maximum performance and USB - * - Sleep power consumption at HSE and at 72 MHz is 5.5 mA (3.1 @ 36 MHz) - * - Option AHB prescaler is set to :2 to be compatible with HSI to remain on HCLK = 36 MHz - * - Flash memory running on 72 MHz needs two wait states - * - * \return Clock selection status - * \retval 0 Successful - * \retval -1 External clock is not provided - * \retval -2 Could not lock to external clock - */ -int sysclock_select_hse(void) -{ - uint32_t regval; - - // be sure to release PD0 and PD1 pins from the OSC pins - regval = getreg32(STM32_AFIO_MAPR); - regval &= ~AFIO_MAPR_PD01_REMAP; - putreg32(regval, STM32_AFIO_MAPR); - - // if (is cc1101 9 MHz clock output enabled), otherwise return with -1 - // I think that clock register provides HSE valid signal to detect that as well. - - return 0; -} - - -/**************************************************************************** - * Interrupts, Callbacks - ****************************************************************************/ - - -/** TODO: Interrupt on lost HSE clock, change it to HSI, ... restarting is - * more complex as the step requires restart of CC1101 device driver; - * so spawn a task for that... once cc1101 is restarted signal an event - * to restart clock. - */ -void sysclock_hse_lost(void) -{ -} - - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/** Setup system clock, enabled when: - * - CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG - * option is set in .config - */ -void stm32_board_clockconfig(void) -{ - sysclock_select_hsi(); -} diff --git a/configs/vsn/src/usbdev.c b/configs/vsn/src/usbdev.c deleted file mode 100644 index 1b2d81b436..0000000000 --- a/configs/vsn/src/usbdev.c +++ /dev/null @@ -1,123 +0,0 @@ -/************************************************************************************ - * configs/svsn/src/usbdev.c - * arch/arm/src/board/boot.c - * - * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Copyright (c) 2011 Uros Platise. All rights reserved. - * - * Authors: Gregory Nutt - * Uros Platise - * - * 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. - * - ************************************************************************************/ - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include -#include -#include -#include - -#include -#include - -#include "up_arch.h" -#include "stm32.h" -#include "vsn.h" - -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -/************************************************************************************ - * Name: stm32_usbinitialize - * - * Description: - * Called to setup USB-related GPIO pins for the VSN board. - * - ************************************************************************************/ - -void stm32_usbinitialize(void) -{ - /* USB Soft Connect Pullup: PB.14 */ - -#if defined(GPIO_USB_PULLUP) - stm32_configgpio(GPIO_USB_PULLUP); -#endif -} - -/************************************************************************************ - * Name: stm32_usbpullup - * - * Description: - * If USB is supported and the board supports a pullup via GPIO (for USB software - * connect and disconnect), then the board software must provide stm32_pullup. - * See include/nuttx/usb/usbdev.h for additional description of this method. - * Alternatively, if no pull-up GPIO the following EXTERN can be redefined to be - * NULL. - * - ************************************************************************************/ - -int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable) -{ - usbtrace(TRACE_DEVPULLUP, (uint16_t)enable); -#if defined(GPIO_USB_PULLUP) - stm32_gpiowrite(GPIO_USB_PULLUP, !enable); -#endif - return OK; -} - -/************************************************************************************ - * Name: stm32_usbsuspend - * - * Description: - * Board logic must provide the stm32_usbsuspend logic if the USBDEV driver is - * used. This function is called whenever the USB enters or leaves suspend mode. - * This is an opportunity for the board logic to shutdown clocks, power, etc. - * while the USB is suspended. - * - ************************************************************************************/ - -void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) -{ - ulldbg("resume: %d\n", resume); -} - diff --git a/configs/vsn/src/usbmsc.c b/configs/vsn/src/usbmsc.c deleted file mode 100644 index 979f176feb..0000000000 --- a/configs/vsn/src/usbmsc.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * configs/vsn/src/usbmsc.c - * - * Copyright (C) 2009, 2016 Gregory Nutt. All rights reserved. - * Copyright (c) 2011 Uros Platise. All rights reserved. - * - * Authors: Gregory Nutt - * Uros Platise - * - * Configure and register the STM32 MMC/SD SDIO block driver. - * - * 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. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include - -#include -#include -#include - -#include "vsn.h" - -#ifdef CONFIG_STM32_SDIO - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -#ifndef CONFIG_SYSTEM_USBMSC_DEVMINOR1 -# define CONFIG_SYSTEM_USBMSC_DEVMINOR1 0 -#endif - -/* SLOT number(s) could depend on the board configuration */ - -#ifdef CONFIG_ARCH_BOARD_VSN -# undef STM32_MMCSDSLOTNO -# define STM32_MMCSDSLOTNO 0 -#else - /* Add configuration for new STM32 boards here */ -# error "Unrecognized STM32 board" -#endif - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: board_usbmsc_initialize - * - * Description: - * Perform architecture specific initialization as needed to establish - * the mass storage device that will be exported by the USB MSC device. - * - ****************************************************************************/ - -int board_usbmsc_initialize(int port) -{ - FAR struct sdio_dev_s *sdio; - int ret; - - /* First, get an instance of the SDIO interface */ - - syslog(LOG_INFO, "Initializing SDIO slot %d\n", STM32_MMCSDSLOTNO); - - sdio = sdio_initialize(STM32_MMCSDSLOTNO); - if (!sdio) - { - syslog(LOG_ERR, "ERROR: Failed to initialize SDIO slot %d\n", - STM32_MMCSDSLOTNO); - return -ENODEV; - } - - /* Now bind the SPI interface to the MMC/SD driver */ - - syslog(LOG_INFO, "Bind SDIO to the MMC/SD driver, minor=%d\n", - CONFIG_SYSTEM_USBMSC_DEVMINOR1); - - ret = mmcsd_slotinitialize(CONFIG_SYSTEM_USBMSC_DEVMINOR1, sdio); - if (ret != OK) - { - syslog(LOG_ERR, - "ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n", - ret); - return ret; - } - - syslog(LOG_INFO, "Successfully bound SDIO to the MMC/SD driver\n"); - - /* Then let's guess and say that there is a card in the slot. I need to check to - * see if the VSN board supports a GPIO to detect if there is a card in - * the slot. - */ - - sdio_mediachange(sdio, true); - return OK; -} - -#endif /* CONFIG_STM32_SDIO */ diff --git a/configs/vsn/src/vsn.h b/configs/vsn/src/vsn.h deleted file mode 100644 index 290d7d9582..0000000000 --- a/configs/vsn/src/vsn.h +++ /dev/null @@ -1,219 +0,0 @@ -/************************************************************************************ - * configs/vsn/src/vsn.h - * arch/arm/src/board/vsn.h - * - * Copyright (c) 2011 Uros Platise. All rights reserved. - * - * Authors: Uros Platise - * - * 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. - * - ************************************************************************************/ - -#ifndef __CONFIGS_VSN_SRC_VSN_H -#define __CONFIGS_VSN_SRC_VSN_H - -#include -#include -#include -#include - -#include "stm32.h" -#include "up_internal.h" -#include "up_arch.h" - - -/************************************************************************************ - * PIN Definitions - ************************************************************************************/ - - /* Board Peripheral Assignment - * - * RS232/Power connector: - * - USART1, is the default bootloader and console - * - * Sensor Connector: - * Digital: - * - GPIOs: PB10, PB11 (or even TIM2 CH3 and CH4) - * - USART3 - * - I2C2 - * Analog: - * - ADC1 - * Supporting Analog Circuitry (not seen outside) - * - RefTap (TIM3_CH3) - * - Power PWM Out (TIM8_CH1 / TIM3_CH1) - * - Filtered Out (TIM3_CH4) - * (TIM8 could run at lower frequency, while TIM3 must run at highest possible) - * - Gain selection muxed with SDcard I/Os. - * - * Radio connector: - * - UART3 / UART4 - * - SPI2 - * - I2C1 (remapped pins vs. Expansion connector) - * - CAN - * - TIM4 CH[3:4] - * - * Expansion connector: - * - WakeUp Pin - * - System Wide Reset - * - SPI1 is wired to expansion port - * - I2C1 - * - USART2 [Rx, Tx, CTS, RTS] - * - DAC [0:1] - * - ADC2 on pins [0:7] - * - TIM2 Channels [1:4] - * - TIM5 Channels [1:4] - * - * Onboard Components: - * - SPI3 has direct connection with FRAM - * - SDCard, conencts the microSD and shares the control lines with Sensor Interface - * to select Amplifier Gain - * - ADC3 is used also for power management (can be shared with ADC1 on sensor connector - * if not used) - */ - -/* LED */ - -#define GPIO_LED (GPIO_OUTPUT|GPIO_CNF_OUTPP |GPIO_MODE_2MHz |GPIO_PORTB|GPIO_PIN2 |GPIO_OUTPUT_CLEAR) - -/* BUTTON - Note that after a good second button causes hardware reset */ - -#define GPIO_PUSHBUTTON (GPIO_INPUT |GPIO_CNF_INFLOAT |GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN5 ) - -/* Power Management Pins */ - -#define GPIO_PVS (GPIO_OUTPUT|GPIO_CNF_OUTPP |GPIO_MODE_2MHz |GPIO_PORTC|GPIO_PIN7 |GPIO_OUTPUT_CLEAR) -#define GPIO_PST (GPIO_INPUT |GPIO_CNF_INPULLDWN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN13) -#define GPIO_SCTC (GPIO_INPUT |GPIO_CNF_INPULLDWN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN8 ) -#define GPIO_PCLR (GPIO_INPUT |GPIO_CNF_INPULLDWN|GPIO_MODE_INPUT|GPIO_PORTD|GPIO_PIN1 ) // by default this pin is OSCOUT, requires REMAP -#define GPIO_XPWR (GPIO_INPUT |GPIO_CNF_INFLOAT |GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN4 ) - -/* FRAM (alt pins are not listed here and are a part of SPI) */ - -#define GPIO_FRAM_CS (GPIO_OUTPUT|GPIO_CNF_OUTPP |GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN15|GPIO_OUTPUT_SET) - -/* Sensor Interface */ - -#define GPIO_GP1_HIZ (GPIO_INPUT |GPIO_CNF_INFLOAT |GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN10) -#define GPIO_GP1_PUP (GPIO_INPUT |GPIO_CNF_INPULLUP |GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN10) -#define GPIO_GP1_PDN (GPIO_INPUT |GPIO_CNF_INPULLDWN|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN10) -#define GPIO_GP1_LOW (GPIO_OUTPUT|GPIO_CNF_OUTPP |GPIO_MODE_2MHz |GPIO_PORTB|GPIO_PIN10|GPIO_OUTPUT_CLEAR) -#define GPIO_GP1_HIGH (GPIO_OUTPUT|GPIO_CNF_OUTPP |GPIO_MODE_2MHz |GPIO_PORTB|GPIO_PIN10|GPIO_OUTPUT_SET) - -#define GPIO_GP2_HIZ (GPIO_INPUT |GPIO_CNF_INFLOAT |GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN11) -#define GPIO_GP2_PUP (GPIO_INPUT |GPIO_CNF_INPULLUP |GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN11) -#define GPIO_GP2_PDN (GPIO_INPUT |GPIO_CNF_INPULLDWN|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN11) -#define GPIO_GP2_LOW (GPIO_OUTPUT|GPIO_CNF_OUTPP |GPIO_MODE_2MHz |GPIO_PORTB|GPIO_PIN11|GPIO_OUTPUT_CLEAR) -#define GPIO_GP2_HIGH (GPIO_OUTPUT|GPIO_CNF_OUTPP |GPIO_MODE_2MHz |GPIO_PORTB|GPIO_PIN11|GPIO_OUTPUT_SET) - -#define GPIO_OPA_INPUT (GPIO_INPUT |GPIO_CNF_ANALOGIN |GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN0 ) -#define GPIO_OPA_ENABLE (GPIO_OUTPUT|GPIO_CNF_OUTPP |GPIO_MODE_2MHz |GPIO_PORTC|GPIO_PIN1 |GPIO_OUTPUT_CLEAR) -#define GPIO_OPA_REFAIN (GPIO_INPUT |GPIO_CNF_ANALOGIN |GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN0 ) -#define GPIO_OPA_REFPWM (GPIO_ALT |GPIO_CNF_AFPP |GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN0 ) - -#define GPIO_OUT_PWRON (GPIO_OUTPUT|GPIO_CNF_OUTPP |GPIO_MODE_2MHz |GPIO_PORTC|GPIO_PIN6 |GPIO_OUTPUT_CLEAR) -#define GPIO_OUT_PWROFF (GPIO_OUTPUT|GPIO_CNF_OUTPP |GPIO_MODE_2MHz |GPIO_PORTC|GPIO_PIN6 |GPIO_OUTPUT_SET) -#define GPIO_OUT_PWRPWM (GPIO_ALT |GPIO_CNF_AFPP |GPIO_MODE_10MHz|GPIO_PORTC|GPIO_PIN6 ) -#define GPIO_OUT_PWRPWM_TIM8_CH 1 /* TIM8.CH1 */ - -#define GPIO_OUT_HIZ (GPIO_INPUT |GPIO_CNF_INFLOAT |GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN1 ) -#define GPIO_OUT_PUP (GPIO_INPUT |GPIO_CNF_INPULLUP |GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN1 ) -#define GPIO_OUT_PDN (GPIO_INPUT |GPIO_CNF_INPULLDWN|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN1 ) -#define GPIO_OUT_LOW (GPIO_OUTPUT|GPIO_CNF_OUTPP |GPIO_MODE_2MHz |GPIO_PORTB|GPIO_PIN1 |GPIO_OUTPUT_CLEAR) -#define GPIO_OUT_HIGH (GPIO_OUTPUT|GPIO_CNF_OUTPP |GPIO_MODE_2MHz |GPIO_PORTB|GPIO_PIN1 |GPIO_OUTPUT_SET) -#define GPIO_OUT_AIN (GPIO_INPUT |GPIO_CNF_ANALOGIN |GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN1 ) -#define GPIO_OUT_PWM (GPIO_ALT |GPIO_CNF_AFPP |GPIO_MODE_10MHz|GPIO_PORTB|GPIO_PIN1 ) -#define GPIO_OUT_PWM_TIM3_CH 4 /* TIM3.CH4 */ - -#define GPIO_PGIA_A0_H (GPIO_OUTPUT|GPIO_CNF_OUTPP |GPIO_MODE_2MHz |GPIO_PORTC|GPIO_PIN8 |GPIO_OUTPUT_SET) -#define GPIO_PGIA_A0_L (GPIO_OUTPUT|GPIO_CNF_OUTPP |GPIO_MODE_2MHz |GPIO_PORTC|GPIO_PIN8 |GPIO_OUTPUT_CLEAR) -#define GPIO_PGIA_A1_L (GPIO_OUTPUT|GPIO_CNF_OUTPP |GPIO_MODE_2MHz |GPIO_PORTC|GPIO_PIN12|GPIO_OUTPUT_CLEAR) -#define GPIO_PGIA_A1_H (GPIO_OUTPUT|GPIO_CNF_OUTPP |GPIO_MODE_2MHz |GPIO_PORTC|GPIO_PIN12|GPIO_OUTPUT_SET) -#define GPIO_PGIA_A2_H (GPIO_OUTPUT|GPIO_CNF_OUTPP |GPIO_MODE_2MHz |GPIO_PORTD|GPIO_PIN2 |GPIO_OUTPUT_SET) -#define GPIO_PGIA_A2_L (GPIO_OUTPUT|GPIO_CNF_OUTPP |GPIO_MODE_2MHz |GPIO_PORTD|GPIO_PIN2 |GPIO_OUTPUT_CLEAR) -#define GPIO_PGIA_AEN (GPIO_OUTPUT|GPIO_CNF_OUTPP |GPIO_MODE_2MHz |GPIO_PORTC|GPIO_PIN1 |GPIO_OUTPUT_CLEAR) - - -/* Radio Connector */ - -#define GPIO_CC1101_CS (GPIO_OUTPUT|GPIO_CNF_OUTPP |GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN12|GPIO_OUTPUT_SET) -#define GPIO_CC1101_GDO0 (GPIO_INPUT|GPIO_CNF_INFLOAT |GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN9 ) -#define GPIO_CC1101_GDO2 (GPIO_INPUT|GPIO_CNF_INFLOAT |GPIO_MODE_INPUT|GPIO_PORTD|GPIO_PIN0 ) - - -/* Expansion Connector */ - - -/************************************************************************************ - * Public data - ************************************************************************************/ - -#ifndef __ASSEMBLY__ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -/************************************************************************************ - * Name: stm32_spidev_initialize - * - * Description: - * Called to configure SPI chip select GPIO pins for the VSN board. - * - ************************************************************************************/ - -extern void weak_function stm32_spidev_initialize(void); - -/************************************************************************************ - * Name: stm32_usbinitialize - * - * Description: - * Called to setup USB-related GPIO pins for the VSN board. - * - ************************************************************************************/ - -extern void weak_function stm32_usbinitialize(void); - -/************************************************************************************ - * Init Power Module and set board system voltage - ************************************************************************************/ - -extern void board_power_init(void); - -/************************************************************************************ - * Name: sysclock_select_hsi - * - * Description: - * Selects internal HSI Clock, SYSCLK = 36 MHz, HCLK = 36 MHz. - * - ************************************************************************************/ - -extern void sysclock_select_hsi(void); - -#endif /* __ASSEMBLY__ */ -#endif /* __CONFIGS_VSN_SRC_VSN_H */