mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
Merged nuttx/boards into master
This commit is contained in:
+11
-4
@@ -25,7 +25,7 @@ config ARCH_BOARD_ARDUINO_MEGA2560
|
||||
depends on ARCH_CHIP_ATMEGA2560
|
||||
---help---
|
||||
This option selects the Arduino Mega 2560 board featuring the Atmel
|
||||
Atmega2560 MCU running at 16 MHz.
|
||||
Atmega2560 MCU running at 16 MHz.
|
||||
|
||||
config ARCH_BOARD_ARDUINO_DUE
|
||||
bool "Arduino Due"
|
||||
@@ -970,7 +970,7 @@ config ARCH_BOARD_STM32F746G_DISCO
|
||||
select ARCH_HAVE_BUTTONS
|
||||
select ARCH_HAVE_IRQBUTTONS
|
||||
---help---
|
||||
STMicro STM32F746G-DISCO development board featuring the STM32F746NGH6
|
||||
STMicro STM32F746G-DISCO development board featuring the STM32F746NGH6
|
||||
MCU. The STM32F746NGH6 is a 216MHz Cortex-M7 operation with 1024Kb Flash
|
||||
memory and 300Kb SRAM.
|
||||
|
||||
@@ -981,7 +981,7 @@ config ARCH_BOARD_STM32L476VG_DISCO
|
||||
select ARCH_HAVE_BUTTONS
|
||||
select ARCH_HAVE_IRQBUTTONS
|
||||
---help---
|
||||
STMicro STM32L476VG_DISCO development board featuring the STM32L476VG
|
||||
STMicro STM32L476VG_DISCO development board featuring the STM32L476VG
|
||||
MCU. The STM32L476VG is a Cortex-M4 optimised for low-power operation
|
||||
at up to 80MHz operation with 1024Kb Flash memory and 96+32Kb SRAM.
|
||||
|
||||
@@ -1428,7 +1428,7 @@ config ARCH_BOARD
|
||||
default "tm4c1294-launchpad" if ARCH_BOARD_TM4C1294_LAUNCHPAD
|
||||
default "cc3200-launchpad" if ARCH_BOARD_CC3200_LAUNCHPAD
|
||||
default "twr-k60n512" if ARCH_BOARD_TWR_K60N512
|
||||
default "u-blox-c027" if ARCH_BOARD_U_BLOX_C027
|
||||
default "u-blox-c027" if ARCH_BOARD_U_BLOX_C027
|
||||
default "ubw32" if ARCH_BOARD_UBW32
|
||||
default "us7032evb1" if ARCH_BOARD_US7032EVB1
|
||||
default "viewtool-stm32f107" if ARCH_BOARD_VIEWTOOL_STM32F107
|
||||
@@ -1918,6 +1918,13 @@ config BOARDCTL_OS_SYMTAB
|
||||
---help---
|
||||
Enables support for the BOARDIOC_OS_SYMTAB boardctl() command.
|
||||
|
||||
config BOARDCTL_USBDEVCTRL
|
||||
bool "Enable USB device controls"
|
||||
default n
|
||||
depends on USBDEV
|
||||
---help---
|
||||
Enables support for the BOARDIOC_USBDEV_CONTROL boardctl() command.
|
||||
|
||||
config BOARDCTL_TSCTEST
|
||||
bool "Enable touchscreen test interfaces"
|
||||
default n
|
||||
|
||||
@@ -648,6 +648,11 @@ configs/stm32f746g-disco
|
||||
MCU. The STM32F746NGH6 is a 216MHz Cortex-M7 operation with 1024Kb Flash
|
||||
memory and 300Kb SRAM.
|
||||
|
||||
configs/stm32l476vg-disco
|
||||
STMicro STM32L476VG_DISCO development board featuring the STM32L476VG
|
||||
MCU. The STM32L476VG is a Cortex-M4 optimised for low-power operation
|
||||
at up to 80MHz operation with 1024Kb Flash memory and 96+32Kb SRAM.
|
||||
|
||||
configs/stm32ldiscovery
|
||||
STMicro STM32L-Discovery board based on the STMicro STM32L152RB MCU.
|
||||
|
||||
|
||||
+179
-1
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* configs/boardctl.c
|
||||
*
|
||||
* Copyright (C) 2015 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2015-2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -49,8 +49,167 @@
|
||||
#include <nuttx/module.h>
|
||||
#include <nuttx/binfmt/symtab.h>
|
||||
|
||||
#ifdef CONFIG_BOARDCTL_USBDEVCTRL
|
||||
# include <nuttx/usb/cdcacm.h>
|
||||
# include <nuttx/usb/pl2303.h>
|
||||
# include <nuttx/usb/usbmsc.h>
|
||||
# include <nuttx/usb/composite.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LIB_BOARDCTL
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: boardctl_usbdevctrl
|
||||
*
|
||||
* Description:
|
||||
* Handler the USB device control command.
|
||||
*
|
||||
* Input Parameters:
|
||||
* ctrl - Described the USB device control command.
|
||||
*
|
||||
* Returned Value:
|
||||
* On success zero (OK) is returned; -1 (ERROR) is returned on failure
|
||||
* with the errno variable to to indicate the nature of the failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_BOARDCTL_USBDEVCTRL
|
||||
static inline int boardctl_usbdevctrl(FAR struct boardioc_usbdev_ctrl_s *ctrl)
|
||||
{
|
||||
int ret = OK;
|
||||
|
||||
switch (ctrl->usbdev)
|
||||
{
|
||||
#ifdef CONFIG_CDCACM
|
||||
case BOARDIOC_USBDEV_CDCACM: /* CDC/ACM, not in a composite */
|
||||
switch (ctrl->action)
|
||||
{
|
||||
case BOARDIOC_USBDEV_INITIALIZE: /* Initialize CDC/ACM device */
|
||||
break; /* There is no CDC/ACM initialization */
|
||||
|
||||
case BOARDIOC_USBDEV_CONNECT: /* Connect the CDC/ACM device */
|
||||
#ifndef CONFIG_CDCACM_COMPOSITE
|
||||
{
|
||||
DEBUGASSERT(ctrl->handle != NULL);
|
||||
ret = cdcacm_initialize(ctrl->instance, ctrl->handle);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
||||
case BOARDIOC_USBDEV_DISCONNECT: /* Disconnect the CDC/ACM device */
|
||||
{
|
||||
DEBUGASSERT(ctrl->handle != NULL && *ctrl->handle != NULL);
|
||||
cdcacm_uninitialize(*ctrl->handle);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PL2303
|
||||
case BOARDIOC_USBDEV_PL2303: /* PL2303 serial, not in a composite */
|
||||
switch (ctrl->action)
|
||||
{
|
||||
case BOARDIOC_USBDEV_INITIALIZE: /* Initialize PL2303 serial device */
|
||||
break; /* There is no PL2303 serial initialization */
|
||||
|
||||
case BOARDIOC_USBDEV_CONNECT: /* Connect the CDC/ACM device */
|
||||
ret = usbdev_serialinitialize(ctrl->instance);
|
||||
break;
|
||||
|
||||
case BOARDIOC_USBDEV_DISCONNECT: /* There is no PL2303 serial disconnect */
|
||||
ret = -ENOSYS;
|
||||
break;
|
||||
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USBMSC
|
||||
case BOARDIOC_USBDEV_MSC: /* Mass storage class */
|
||||
switch (ctrl->action)
|
||||
{
|
||||
case BOARDIOC_USBDEV_INITIALIZE: /* Initialize USB MSC device */
|
||||
{
|
||||
ret = board_usbmsc_initialize(ctrl->instance);
|
||||
}
|
||||
break;
|
||||
|
||||
case BOARDIOC_USBDEV_CONNECT: /* Connect the USB MSC device */
|
||||
{
|
||||
DEBUGASSERT(ctrl->handle != NULL);
|
||||
#warning Missing logic
|
||||
ret = -ENOSYS;
|
||||
}
|
||||
break;
|
||||
|
||||
case BOARDIOC_USBDEV_DISCONNECT: /* Disconnect the USB MSC device */
|
||||
{
|
||||
DEBUGASSERT(ctrl->handle != NULL && *ctrl->handle != NULL);
|
||||
usbmsc_uninitialize(*ctrl->handle);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USBDEV_COMPOSITE
|
||||
case BOARDIOC_USBDEV_COMPOSITE: /* Composite device */
|
||||
switch (ctrl->action)
|
||||
{
|
||||
case BOARDIOC_USBDEV_INITIALIZE: /* Initialize Composite device */
|
||||
{
|
||||
ret = board_composite_initialize(ctrl->instance);
|
||||
}
|
||||
break;
|
||||
|
||||
case BOARDIOC_USBDEV_CONNECT: /* Connect the Composite device */
|
||||
{
|
||||
DEBUGASSERT(ctrl->handle != NULL);
|
||||
*ctrl->handle = composite_initialize();
|
||||
if (*ctrl->handle == NULL)
|
||||
{
|
||||
ret = -EIO;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case BOARDIOC_USBDEV_DISCONNECT: /* Disconnect the Composite device */
|
||||
{
|
||||
DEBUGASSERT(ctrl->handle != NULL && *ctrl->handle != NULL);
|
||||
composite_uninitialize(*ctrl->handle);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
@@ -193,6 +352,25 @@ int boardctl(unsigned int cmd, uintptr_t arg)
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BOARDCTL_USBDEVCTRL
|
||||
/* CMD: BOARDIOC_USBDEV_CONTROL
|
||||
* DESCRIPTION: Manage USB device classes
|
||||
* ARG: A pointer to an instance of struct boardioc_usbdev_ctrl_s
|
||||
* CONFIGURATION: CONFIG_LIB_BOARDCTL && CONFIG_BOARDCTL_USBDEVCTRL
|
||||
* DEPENDENCIES: Board logic must provide board_<usbdev>_initialize()
|
||||
*/
|
||||
|
||||
case BOARDIOC_USBDEV_CONTROL:
|
||||
{
|
||||
FAR struct boardioc_usbdev_ctrl_s *ctrl =
|
||||
(FAR struct boardioc_usbdev_ctrl_s *)arg;
|
||||
|
||||
DEBUGASSERT(ctrl != NULL);
|
||||
ret = boardctl_usbdevctrl(ctrl);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BOARDCTL_TSCTEST
|
||||
/* CMD: BOARDIOC_TSCTEST_SETUP
|
||||
* DESCRIPTION: Touchscreen controller test configuration
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* configs/cloudctrl/src/stm32_usbmsc.c
|
||||
*
|
||||
* Copyright (C) 2012, 2013 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2012, 2013, 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
* Darcy Gong <darcy.gong@gmail.com>
|
||||
*
|
||||
@@ -46,6 +46,8 @@
|
||||
#include <syslog.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
|
||||
#include "stm32.h"
|
||||
|
||||
/****************************************************************************
|
||||
@@ -62,14 +64,14 @@
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: usbmsc_archinitialize
|
||||
* Name: board_usbmsc_initialize
|
||||
*
|
||||
* Description:
|
||||
* Perform architecture specific initialization
|
||||
* Perform architecture specific initialization of the USB MSC device.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int usbmsc_archinitialize(void)
|
||||
int board_usbmsc_initialize(int port)
|
||||
{
|
||||
/* If system/usbmsc is built as an NSH command, then SD slot should
|
||||
* already have been initized in board_app_initialize() (see stm32_appinit.c).
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* configs/ea3131/src/lpc31_usbmsc.c
|
||||
*
|
||||
* Copyright (C) 2010, 2013, 2015 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2010, 2013, 2015-2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Configure and register the SAM3U MMC/SD SDIO block driver.
|
||||
@@ -46,6 +46,7 @@
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/kmalloc.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/fs/mkfatfs.h>
|
||||
@@ -77,14 +78,14 @@ static struct fat_format_s g_fmt = FAT_FORMAT_INITIALIZER;
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: usbmsc_archinitialize
|
||||
* Name: board_usbmsc_initialize
|
||||
*
|
||||
* Description:
|
||||
* Perform architecture specific initialization
|
||||
* Perform architecture specific initialization of the USB MSC device.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int usbmsc_archinitialize(void)
|
||||
int board_usbmsc_initialize(int port)
|
||||
{
|
||||
uint8_t *pbuffer;
|
||||
int ret;
|
||||
|
||||
+123
-139
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* configs/ea3152/src/lpc31_usbmsc.c
|
||||
*
|
||||
* Copyright (C) 2011, 2015 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2011, 2015-2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Configure and register the SAM3U MMC/SD SDIO block driver.
|
||||
@@ -46,6 +46,7 @@
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/kmalloc.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/fs/mkfatfs.h>
|
||||
@@ -77,14 +78,14 @@ static struct fat_format_s g_fmt = FAT_FORMAT_INITIALIZER;
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: usbmsc_archinitialize
|
||||
* Name: board_usbmsc_initialize
|
||||
*
|
||||
* Description:
|
||||
* Perform architecture specific initialization
|
||||
* Perform architecture specific initialization of the USB MSC device.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int usbmsc_archinitialize(void)
|
||||
int board_usbmsc_initialize(int port)
|
||||
{
|
||||
uint8_t *pbuffer;
|
||||
int ret;
|
||||
@@ -92,7 +93,7 @@ int usbmsc_archinitialize(void)
|
||||
pbuffer = (uint8_t *)kmm_malloc(BUFFER_SIZE);
|
||||
if (!pbuffer)
|
||||
{
|
||||
lowsyslog("usbmsc_archinitialize: Failed to allocate ramdisk of size %d\n",
|
||||
lowsyslog("board_usbmsc_initialize: Failed to allocate ramdisk of size %d\n",
|
||||
BUFFER_SIZE);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@@ -564,6 +564,7 @@ CONFIG_ARCH_BOARD_FIRE_STM32V2=y
|
||||
CONFIG_LIB_BOARDCTL=y
|
||||
# CONFIG_BOARDCTL_RESET is not set
|
||||
# CONFIG_BOARDCTL_UNIQUEID is not set
|
||||
CONFIG_BOARDCTL_USBDEVCTRL=y
|
||||
# CONFIG_BOARDCTL_TSCTEST is not set
|
||||
# CONFIG_BOARDCTL_ADCTEST is not set
|
||||
# CONFIG_BOARDCTL_PWMTEST is not set
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* configs/fire-stm32v2/src/stm32_composite.c
|
||||
*
|
||||
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Configure and register the STM32 SPI-based MMC/SD block driver.
|
||||
@@ -43,6 +43,8 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
|
||||
#include "fire-stm32v2.h"
|
||||
|
||||
/****************************************************************************
|
||||
@@ -60,14 +62,14 @@
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: composite_archinitialize
|
||||
* Name: board_composite_initialize
|
||||
*
|
||||
* Description:
|
||||
* Perform architecture specific initialization
|
||||
* Perform architecture specific initialization of a composite USB device.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int composite_archinitialize(void)
|
||||
int board_composite_initialize(int port)
|
||||
{
|
||||
/* If system/composite is built as an NSH command, then SD slot should
|
||||
* already have been initialized in board_app_initialize() (see stm32_appinit.c).
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* configs/fire-stm32v2/src/stm32_usbmsc.c
|
||||
*
|
||||
* Copyright (C) 2012, 2013 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2012, 2013, 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Configure and register the STM32 SPI-based MMC/SD block driver.
|
||||
@@ -45,6 +45,8 @@
|
||||
#include <syslog.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
|
||||
#include "stm32.h"
|
||||
|
||||
/****************************************************************************
|
||||
@@ -61,14 +63,14 @@
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: usbmsc_archinitialize
|
||||
* Name: board_usbmsc_initialize
|
||||
*
|
||||
* Description:
|
||||
* Perform architecture specific initialization
|
||||
* Perform architecture specific initialization of the USB MSC device.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int usbmsc_archinitialize(void)
|
||||
int board_usbmsc_initialize(int port)
|
||||
{
|
||||
/* If system/usbmsc is built as an NSH command, then SD slot should
|
||||
* already have been initialized in board_app_initialize() (see stm32_appinit.c).
|
||||
|
||||
@@ -544,6 +544,7 @@ CONFIG_NSH_MMCSDSPIPORTNO=0
|
||||
CONFIG_LIB_BOARDCTL=y
|
||||
# CONFIG_BOARDCTL_RESET is not set
|
||||
# CONFIG_BOARDCTL_UNIQUEID is not set
|
||||
CONFIG_BOARDCTL_USBDEVCTRL=y
|
||||
CONFIG_BOARDCTL_TSCTEST=y
|
||||
# CONFIG_BOARDCTL_ADCTEST is not set
|
||||
# CONFIG_BOARDCTL_PWMTEST is not set
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* configs/hymini-stm32v/src/stm32_usbmsc.c
|
||||
*
|
||||
* Copyright (C) 2009, 2011, 2013 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2009, 2011, 2013, 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Configure and register the STM32 MMC/SD SDIO block driver.
|
||||
@@ -45,6 +45,7 @@
|
||||
#include <syslog.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/sdio.h>
|
||||
#include <nuttx/mmcsd.h>
|
||||
|
||||
@@ -79,14 +80,14 @@
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: usbmsc_archinitialize
|
||||
* Name: board_usbmsc_initialize
|
||||
*
|
||||
* Description:
|
||||
* Perform architecture specific initialization
|
||||
* Perform architecture specific initialization of the USB MSC device.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int usbmsc_archinitialize(void)
|
||||
int board_usbmsc_initialize(int port)
|
||||
{
|
||||
/* If system/usbmsc is built as an NSH command, then SD slot should
|
||||
* already have been initialized in board_app_initialize() (see stm32_appinit.c).
|
||||
|
||||
@@ -523,7 +523,8 @@ CONFIG_ARCH_HAVE_IRQBUTTONS=y
|
||||
#
|
||||
# Board-Specific Options
|
||||
#
|
||||
# CONFIG_LIB_BOARDCTL is not set
|
||||
CONFIG_LIB_BOARDCTL=y
|
||||
CONFIG_BOARDCTL_USBDEVCTRL=y
|
||||
|
||||
#
|
||||
# RTOS Features
|
||||
|
||||
@@ -514,7 +514,8 @@ CONFIG_NSH_MMCSDMINOR=0
|
||||
#
|
||||
# Board-Specific Options
|
||||
#
|
||||
# CONFIG_LIB_BOARDCTL is not set
|
||||
CONFIG_LIB_BOARDCTL=y
|
||||
CONFIG_BOARDCTL_USBDEVCTRL=y
|
||||
|
||||
#
|
||||
# RTOS Features
|
||||
|
||||
@@ -76,6 +76,7 @@ CONFIG_ARCH="arm"
|
||||
# CONFIG_ARCH_CHIP_DM320 is not set
|
||||
# CONFIG_ARCH_CHIP_EFM32 is not set
|
||||
# CONFIG_ARCH_CHIP_IMX1 is not set
|
||||
# CONFIG_ARCH_CHIP_IMX6 is not set
|
||||
# CONFIG_ARCH_CHIP_KINETIS is not set
|
||||
# CONFIG_ARCH_CHIP_KL is not set
|
||||
# CONFIG_ARCH_CHIP_LM is not set
|
||||
@@ -94,6 +95,7 @@ CONFIG_ARCH="arm"
|
||||
# CONFIG_ARCH_CHIP_SAMV7 is not set
|
||||
CONFIG_ARCH_CHIP_STM32=y
|
||||
# CONFIG_ARCH_CHIP_STM32F7 is not set
|
||||
# CONFIG_ARCH_CHIP_STM32L4 is not set
|
||||
# CONFIG_ARCH_CHIP_STR71X is not set
|
||||
# CONFIG_ARCH_CHIP_TMS570 is not set
|
||||
# CONFIG_ARCH_CHIP_MOXART is not set
|
||||
@@ -121,6 +123,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y
|
||||
# CONFIG_ARMV7M_LAZYFPU is not set
|
||||
# CONFIG_ARCH_HAVE_FPU is not set
|
||||
# CONFIG_ARCH_HAVE_DPFPU is not set
|
||||
# CONFIG_ARCH_HAVE_TRUSTZONE is not set
|
||||
CONFIG_ARM_HAVE_MPU_UNIFIED=y
|
||||
# CONFIG_ARM_MPU is not set
|
||||
|
||||
@@ -514,7 +517,15 @@ CONFIG_ARCH_HAVE_IRQBUTTONS=y
|
||||
#
|
||||
# Board-Specific Options
|
||||
#
|
||||
# CONFIG_LIB_BOARDCTL is not set
|
||||
CONFIG_LIB_BOARDCTL=y
|
||||
# CONFIG_BOARDCTL_RESET is not set
|
||||
# CONFIG_BOARDCTL_UNIQUEID is not set
|
||||
CONFIG_BOARDCTL_USBDEVCTRL=y
|
||||
# CONFIG_BOARDCTL_TSCTEST is not set
|
||||
# CONFIG_BOARDCTL_ADCTEST is not set
|
||||
# CONFIG_BOARDCTL_PWMTEST is not set
|
||||
# CONFIG_BOARDCTL_GRAPHICS is not set
|
||||
# CONFIG_BOARDCTL_IOCTL is not set
|
||||
|
||||
#
|
||||
# RTOS Features
|
||||
@@ -886,6 +897,8 @@ CONFIG_ARCH_LOWPUTC=y
|
||||
CONFIG_LIB_SENDFILE_BUFSIZE=512
|
||||
# CONFIG_ARCH_ROMGETC is not set
|
||||
# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set
|
||||
CONFIG_ARCH_HAVE_TLS=y
|
||||
# CONFIG_TLS is not set
|
||||
# CONFIG_LIBC_NETDB is not set
|
||||
|
||||
#
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* configs/kwikstik-k40/src/k40_usbmsc.c
|
||||
*
|
||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2011, 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Configure and register the Kinetis MMC/SD block driver.
|
||||
@@ -45,6 +45,7 @@
|
||||
#include <syslog.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/sdio.h>
|
||||
#include <nuttx/mmcsd.h>
|
||||
|
||||
@@ -75,14 +76,14 @@
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: usbmsc_archinitialize
|
||||
* Name: board_usbmsc_initialize
|
||||
*
|
||||
* Description:
|
||||
* Perform architecture specific initialization
|
||||
* Perform architecture specific initialization of the USB MSC device.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int usbmsc_archinitialize(void)
|
||||
int board_usbmsc_initialize(int port)
|
||||
{
|
||||
/* If system/usbmsc is built as an NSH command, then SD slot should
|
||||
* already have been initialized in board_app_initialize() (see k40_appinit.c).
|
||||
|
||||
@@ -288,6 +288,7 @@ CONFIG_NSH_MMCSDMINOR=0
|
||||
CONFIG_LIB_BOARDCTL=y
|
||||
# CONFIG_BOARDCTL_RESET is not set
|
||||
# CONFIG_BOARDCTL_UNIQUEID is not set
|
||||
CONFIG_BOARDCTL_USBDEVCTRL=y
|
||||
# CONFIG_BOARDCTL_TSCTEST is not set
|
||||
CONFIG_BOARDCTL_ADCTEST=y
|
||||
# CONFIG_BOARDCTL_PWMTEST is not set
|
||||
|
||||
@@ -290,6 +290,7 @@ CONFIG_NSH_MMCSDMINOR=0
|
||||
CONFIG_LIB_BOARDCTL=y
|
||||
# CONFIG_BOARDCTL_RESET is not set
|
||||
# CONFIG_BOARDCTL_UNIQUEID is not set
|
||||
CONFIG_BOARDCTL_USBDEVCTRL=y
|
||||
# CONFIG_BOARDCTL_TSCTEST is not set
|
||||
# CONFIG_BOARDCTL_ADCTEST is not set
|
||||
# CONFIG_BOARDCTL_PWMTEST is not set
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* configs/lpcxpresso-lpc1768/src/lpc17_usbmsc.c
|
||||
*
|
||||
* Copyright (C) 2011, 2013 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2011, 2013, 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Configure and register the LPC17xx MMC/SD SPI block driver.
|
||||
@@ -45,8 +45,9 @@
|
||||
#include <syslog.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/spi/spi.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/mmcsd.h>
|
||||
#include <nuttx/spi/spi.h>
|
||||
|
||||
#include "lpc17_ssp.h"
|
||||
|
||||
@@ -77,14 +78,14 @@
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: usbmsc_archinitialize
|
||||
* Name: board_usbmsc_initialize
|
||||
*
|
||||
* Description:
|
||||
* Perform architecture specific initialization
|
||||
* Perform architecture specific initialization of the USB MSC device.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int usbmsc_archinitialize(void)
|
||||
int board_usbmsc_initialize(int port)
|
||||
{
|
||||
FAR struct spi_dev_s *spi;
|
||||
int ret;
|
||||
|
||||
@@ -286,7 +286,8 @@ CONFIG_ARCH_LEDS=y
|
||||
#
|
||||
# Board-Specific Options
|
||||
#
|
||||
# CONFIG_LIB_BOARDCTL is not set
|
||||
CONFIG_LIB_BOARDCTL=y
|
||||
CONFIG_BOARDCTL_USBDEVCTRL=y
|
||||
|
||||
#
|
||||
# RTOS Features
|
||||
|
||||
@@ -537,7 +537,8 @@ CONFIG_NSH_MMCSDMINOR=0
|
||||
# Board-Specific Options
|
||||
#
|
||||
CONFIG_MAPLE_MINI=y
|
||||
# CONFIG_LIB_BOARDCTL is not set
|
||||
CONFIG_LIB_BOARDCTL=y
|
||||
CONFIG_BOARDCTL_USBDEVCTRL=y
|
||||
|
||||
#
|
||||
# RTOS Features
|
||||
|
||||
@@ -56,4 +56,8 @@ ifeq ($(CONFIG_WATCHDOG),y)
|
||||
CSRCS += stm32_watchdog.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_LIB_BOARDCTL),y)
|
||||
CSRCS += stm32_appinit.c
|
||||
endif
|
||||
|
||||
include $(TOPDIR)/configs/Board.mk
|
||||
|
||||
@@ -43,8 +43,11 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/compiler.h>
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <arch/stm32/chip.h>
|
||||
|
||||
/************************************************************************************
|
||||
* Pre-processor Definitions
|
||||
************************************************************************************/
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
/****************************************************************************
|
||||
* configs/maple/src/stm32_appinit.c
|
||||
*
|
||||
* Copyright (C) 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* 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 <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
|
||||
#include "maple.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_app_initialize
|
||||
*
|
||||
* Description:
|
||||
* Perform architecture specific initialization
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int board_app_initialize(void)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
@@ -512,7 +512,8 @@ CONFIG_NSH_MMCSDMINOR=0
|
||||
# Board-Specific Options
|
||||
#
|
||||
CONFIG_MAPLE_MINI=y
|
||||
# CONFIG_LIB_BOARDCTL is not set
|
||||
CONFIG_LIB_BOARDCTL=y
|
||||
CONFIG_BOARDCTL_USBDEVCTRL=y
|
||||
|
||||
#
|
||||
# RTOS Features
|
||||
|
||||
@@ -225,7 +225,8 @@ CONFIG_ARCH_LEDS=y
|
||||
#
|
||||
# Board-Specific Options
|
||||
#
|
||||
# CONFIG_LIB_BOARDCTL is not set
|
||||
CONFIG_LIB_BOARDCTL=y
|
||||
CONFIG_BOARDCTL_USBDEVCTRL=y
|
||||
|
||||
#
|
||||
# RTOS Features
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* configs/mcu123-lpc214x/src/lpc2148_composite.c
|
||||
*
|
||||
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Configure and register the LPC214x MMC/SD SPI block driver.
|
||||
@@ -45,8 +45,9 @@
|
||||
#include <syslog.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/spi/spi.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/mmcsd.h>
|
||||
#include <nuttx/spi/spi.h>
|
||||
#include <nuttx/usb/composite.h>
|
||||
|
||||
#include "lpc214x_spi.h"
|
||||
@@ -71,14 +72,14 @@
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: composite_archinitialize
|
||||
* Name: board_composite_initialize
|
||||
*
|
||||
* Description:
|
||||
* Perform architecture specific initialization
|
||||
* Perform architecture specific initialization of a composite USB device.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int composite_archinitialize(void)
|
||||
int board_composite_initialize(int port)
|
||||
{
|
||||
/* If system/composite is built as an NSH command, then SD slot should
|
||||
* already have been initialized in board_app_initialize() (see lpc2148_appinit.c).
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* configs/mcu123-lpc214x/src/lpc2148_usbmsc.c
|
||||
*
|
||||
* Copyright (C) 2008-2010 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2008-2010, 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Configure and register the LPC214x MMC/SD SPI block driver.
|
||||
@@ -45,8 +45,9 @@
|
||||
#include <syslog.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/spi/spi.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/mmcsd.h>
|
||||
#include <nuttx/spi/spi.h>
|
||||
|
||||
#include "lpc214x_spi.h"
|
||||
|
||||
@@ -79,14 +80,14 @@
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: usbmsc_archinitialize
|
||||
* Name: board_usbmsc_initialize
|
||||
*
|
||||
* Description:
|
||||
* Perform architecture specific initialization
|
||||
* Perform architecture specific initialization of the USB MSC device.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int usbmsc_archinitialize(void)
|
||||
int board_usbmsc_initialize(int port)
|
||||
{
|
||||
FAR struct spi_dev_s *spi;
|
||||
int ret;
|
||||
|
||||
@@ -225,7 +225,8 @@ CONFIG_ARCH_LEDS=y
|
||||
#
|
||||
# Board-Specific Options
|
||||
#
|
||||
# CONFIG_LIB_BOARDCTL is not set
|
||||
CONFIG_LIB_BOARDCTL=y
|
||||
CONFIG_BOARDCTL_USBDEVCTRL=y
|
||||
|
||||
#
|
||||
# RTOS Features
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -567,6 +567,7 @@ CONFIG_MIKROE_FLASH_PART_LIST="8,248,768"
|
||||
CONFIG_LIB_BOARDCTL=y
|
||||
# CONFIG_BOARDCTL_RESET is not set
|
||||
# CONFIG_BOARDCTL_UNIQUEID is not set
|
||||
CONFIG_BOARDCTL_USBDEVCTRL=y
|
||||
CONFIG_BOARDCTL_TSCTEST=y
|
||||
# CONFIG_BOARDCTL_ADCTEST is not set
|
||||
# CONFIG_BOARDCTL_PWMTEST is not set
|
||||
|
||||
@@ -569,6 +569,7 @@ CONFIG_MIKROE_FLASH_PART_LIST="256,768"
|
||||
CONFIG_LIB_BOARDCTL=y
|
||||
# CONFIG_BOARDCTL_RESET is not set
|
||||
# CONFIG_BOARDCTL_UNIQUEID is not set
|
||||
CONFIG_BOARDCTL_USBDEVCTRL=y
|
||||
# CONFIG_BOARDCTL_TSCTEST is not set
|
||||
# CONFIG_BOARDCTL_ADCTEST is not set
|
||||
# CONFIG_BOARDCTL_PWMTEST is not set
|
||||
|
||||
@@ -553,6 +553,7 @@ CONFIG_MIKROE_RAMMTD_SIZE=32
|
||||
CONFIG_LIB_BOARDCTL=y
|
||||
# CONFIG_BOARDCTL_RESET is not set
|
||||
# CONFIG_BOARDCTL_UNIQUEID is not set
|
||||
CONFIG_BOARDCTL_USBDEVCTRL=y
|
||||
# CONFIG_BOARDCTL_TSCTEST is not set
|
||||
# CONFIG_BOARDCTL_ADCTEST is not set
|
||||
# CONFIG_BOARDCTL_PWMTEST is not set
|
||||
|
||||
@@ -38,10 +38,6 @@
|
||||
ASRCS =
|
||||
CSRCS = stm32_boot.c stm32_spi.c
|
||||
|
||||
ifeq ($(CONFIG_HAVE_CXX),y)
|
||||
CSRCS += stm32_cxxinitialize.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_LEDS),y)
|
||||
CSRCS += stm32_autoleds.c
|
||||
else
|
||||
@@ -66,8 +62,8 @@ CSRCS += stm32_ajoystick.c
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_NSH_LIBRARY),y)
|
||||
CSRCS += stm32_nsh.c
|
||||
ifeq ($(CONFIG_LIB_BOARDCTL),y)
|
||||
CSRCS += stm32_appinit.c
|
||||
endif
|
||||
|
||||
include $(TOPDIR)/configs/Board.mk
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* configs/nucleo-l476rg/src/stm32_nsh.c
|
||||
* configs/nucleo-l476rg/src/stm32_appinit.c
|
||||
*
|
||||
* Copyright (C) 2014 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@@ -55,18 +55,6 @@
|
||||
|
||||
#include "nucleo-l476rg.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
@@ -1,154 +0,0 @@
|
||||
/************************************************************************************
|
||||
* configs/nucleo-l476rg/src/stm32_cxxinitialize.c
|
||||
*
|
||||
* Copyright (C) 2014 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* 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 <nuttx/config.h>
|
||||
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include <arch/stm32l4/chip.h>
|
||||
#include "chip.h"
|
||||
|
||||
#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
|
||||
|
||||
/************************************************************************************
|
||||
* Pre-processor Definitions
|
||||
************************************************************************************/
|
||||
/* Debug ****************************************************************************/
|
||||
/* Non-standard debug that may be enabled just for testing the static constructors */
|
||||
|
||||
#ifndef CONFIG_DEBUG
|
||||
# undef CONFIG_DEBUG_CXX
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CXX
|
||||
# define cxxdbg dbg
|
||||
# define cxxlldbg lldbg
|
||||
# ifdef CONFIG_DEBUG_VERBOSE
|
||||
# define cxxvdbg vdbg
|
||||
# define cxxllvdbg llvdbg
|
||||
# else
|
||||
# define cxxvdbg(x...)
|
||||
# define cxxllvdbg(x...)
|
||||
# endif
|
||||
#else
|
||||
# define cxxdbg(x...)
|
||||
# define cxxlldbg(x...)
|
||||
# define cxxvdbg(x...)
|
||||
# define cxxllvdbg(x...)
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
* Private Types
|
||||
************************************************************************************/
|
||||
/* This type defines one entry in initialization array */
|
||||
|
||||
typedef void (*initializer_t)(void);
|
||||
|
||||
/************************************************************************************
|
||||
* External references
|
||||
************************************************************************************/
|
||||
/* _sinit and _einit are symbols exported by the linker script that mark the
|
||||
* beginning and the end of the C++ initialization section.
|
||||
*/
|
||||
|
||||
extern initializer_t _sinit;
|
||||
extern initializer_t _einit;
|
||||
|
||||
/* _stext and _etext are symbols exported by the linker script that mark the
|
||||
* beginning and the end of text.
|
||||
*/
|
||||
|
||||
extern uint32_t _stext;
|
||||
extern uint32_t _etext;
|
||||
|
||||
/************************************************************************************
|
||||
* Private Functions
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Public Functions
|
||||
************************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_cxxinitialize
|
||||
*
|
||||
* Description:
|
||||
* If C++ and C++ static constructors are supported, then this function
|
||||
* must be provided by board-specific logic in order to perform
|
||||
* initialization of the static C++ class instances.
|
||||
*
|
||||
* This function should then be called in the application-specific
|
||||
* user_start logic in order to perform the C++ initialization. NOTE
|
||||
* that no component of the core NuttX RTOS logic is involved; This
|
||||
* function defintion only provides the 'contract' between application
|
||||
* specific C++ code and platform-specific toolchain support
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_cxxinitialize(void)
|
||||
{
|
||||
initializer_t *initp;
|
||||
|
||||
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
|
||||
&_sinit, &_einit, &_stext, &_etext);
|
||||
|
||||
/* Visit each entry in the initialzation table */
|
||||
|
||||
for (initp = &_sinit; initp != &_einit; initp++)
|
||||
{
|
||||
initializer_t initializer = *initp;
|
||||
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
|
||||
|
||||
/* Make sure that the address is non-NULL and lies in the text region
|
||||
* defined by the linker script. Some toolchains may put NULL values
|
||||
* or counts in the initialization table
|
||||
*/
|
||||
|
||||
if ((void*)initializer > (void*)&_stext && (void*)initializer < (void*)&_etext)
|
||||
{
|
||||
cxxdbg("Calling %p\n", initializer);
|
||||
initializer();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* configs/nucleus2g/src/lpc17_usbmsc.c
|
||||
*
|
||||
* Copyright (C) 2010, 2013 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2010, 2013, 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Configure and register the LPC17xx MMC/SD SPI block driver.
|
||||
@@ -45,8 +45,9 @@
|
||||
#include <syslog.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/spi/spi.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/mmcsd.h>
|
||||
#include <nuttx/spi/spi.h>
|
||||
|
||||
#include "lpc17_ssp.h"
|
||||
|
||||
@@ -77,14 +78,14 @@
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: usbmsc_archinitialize
|
||||
* Name: board_usbmsc_initialize
|
||||
*
|
||||
* Description:
|
||||
* Perform architecture specific initialization
|
||||
* Perform architecture specific initialization of the USB MSC device.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int usbmsc_archinitialize(void)
|
||||
int board_usbmsc_initialize(int port)
|
||||
{
|
||||
FAR struct spi_dev_s *spi;
|
||||
int ret;
|
||||
|
||||
@@ -275,7 +275,8 @@ CONFIG_ARCH_LEDS=y
|
||||
#
|
||||
# Board-Specific Options
|
||||
#
|
||||
# CONFIG_LIB_BOARDCTL is not set
|
||||
CONFIG_LIB_BOARDCTL=y
|
||||
CONFIG_BOARDCTL_USBDEVCTRL=y
|
||||
|
||||
#
|
||||
# RTOS Features
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* configs/olimex-lpc1766stk/src/lpc17_usbmsc.c
|
||||
*
|
||||
* Copyright (C) 2010 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2010, 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Configure and register the LPC17xx MMC/SD SPI block driver.
|
||||
@@ -45,8 +45,9 @@
|
||||
#include <syslog.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/spi/spi.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/mmcsd.h>
|
||||
#include <nuttx/spi/spi.h>
|
||||
|
||||
#include "lpc17_gpio.h"
|
||||
#include "lpc17_ssp.h"
|
||||
@@ -79,14 +80,14 @@
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: usbmsc_archinitialize
|
||||
* Name: board_usbmsc_initialize
|
||||
*
|
||||
* Description:
|
||||
* Perform architecture specific initialization
|
||||
* Perform architecture specific initialization of the USB MSC device.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int usbmsc_archinitialize(void)
|
||||
int board_usbmsc_initialize(int port)
|
||||
{
|
||||
FAR struct spi_dev_s *spi;
|
||||
int ret;
|
||||
|
||||
@@ -287,7 +287,8 @@ CONFIG_ARCH_HAVE_IRQBUTTONS=y
|
||||
#
|
||||
# Board-Specific Options
|
||||
#
|
||||
# CONFIG_LIB_BOARDCTL is not set
|
||||
CONFIG_LIB_BOARDCTL=y
|
||||
CONFIG_BOARDCTL_USBDEVCTRL=y
|
||||
|
||||
#
|
||||
# RTOS Features
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -562,6 +562,7 @@ CONFIG_NSH_MMCSDMINOR=0
|
||||
CONFIG_LIB_BOARDCTL=y
|
||||
# CONFIG_BOARDCTL_RESET is not set
|
||||
# CONFIG_BOARDCTL_UNIQUEID is not set
|
||||
CONFIG_BOARDCTL_USBDEVCTRL=y
|
||||
# CONFIG_BOARDCTL_TSCTEST is not set
|
||||
CONFIG_BOARDCTL_ADCTEST=y
|
||||
# CONFIG_BOARDCTL_PWMTEST is not set
|
||||
|
||||
@@ -559,6 +559,7 @@ CONFIG_NSH_MMCSDSPIPORTNO=0
|
||||
CONFIG_LIB_BOARDCTL=y
|
||||
# CONFIG_BOARDCTL_RESET is not set
|
||||
# CONFIG_BOARDCTL_UNIQUEID is not set
|
||||
CONFIG_BOARDCTL_USBDEVCTRL=y
|
||||
# CONFIG_BOARDCTL_TSCTEST is not set
|
||||
# CONFIG_BOARDCTL_ADCTEST is not set
|
||||
# CONFIG_BOARDCTL_PWMTEST is not set
|
||||
|
||||
@@ -213,7 +213,7 @@ int stm32_can_initialize(void);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: usbmsc_archinitialize
|
||||
* Name: board_usbmsc_initialize
|
||||
*
|
||||
* Description:
|
||||
* Called from the application system/usbmc or the boards_nsh if the
|
||||
@@ -224,24 +224,8 @@ int stm32_can_initialize(void);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if !defined(CONFIG_NSH_BUILTIN_APPS) && !defined(CONFIG_SYSTEM_USBMSC)
|
||||
int usbmsc_archinitialize(void);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: composite_archinitialize
|
||||
*
|
||||
* Description:
|
||||
* Called from the application system/composite or the boards_nsh if the
|
||||
* application is not included.
|
||||
* Perform architecture specific initialization. This function must
|
||||
* configure the block device to export via USB. This function must be
|
||||
* provided by architecture-specific logic in order to use this add-on.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if !defined(CONFIG_NSH_BUILTIN_APPS) && !defined(CONFIG_SYSTEM_COMPOSITE)
|
||||
extern int composite_archinitialize(void);
|
||||
#ifndef CONFIG_BOARDCTL_USBDEVCTRL
|
||||
int board_usbmsc_initialize(int port);
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/************************************************************************************
|
||||
* configs/olimexino-stm32/src/stm32_appinit.c
|
||||
*
|
||||
* Copyright (C) 2015 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2015, 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
* David Sidrane <david_s5@nscdg.com>
|
||||
*
|
||||
@@ -60,17 +60,6 @@
|
||||
#include "stm32.h"
|
||||
#include "olimexino-stm32.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
@@ -89,13 +78,13 @@ int board_app_initialize(void)
|
||||
|
||||
#ifdef CONFIG_USBMSC
|
||||
#if !defined(CONFIG_NSH_BUILTIN_APPS) && !defined(CONFIG_SYSTEM_USBMSC)
|
||||
ret = usbmsc_archinitialize();
|
||||
ret = board_usbmsc_initialize(0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USBDEV_COMPOSITE
|
||||
#if !defined(CONFIG_NSH_BUILTIN_APPS) && !defined(CONFIG_SYSTEM_COMPOSITE)
|
||||
ret = composite_archinitialize();
|
||||
ret = board_composite_initialize(0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -44,8 +44,9 @@
|
||||
#include <syslog.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/spi/spi.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/mmcsd.h>
|
||||
#include <nuttx/spi/spi.h>
|
||||
|
||||
#include "stm32.h"
|
||||
#include "olimexino-stm32.h"
|
||||
@@ -81,14 +82,14 @@
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: composite_archinitialize
|
||||
* Name: board_composite_initialize
|
||||
*
|
||||
* Description:
|
||||
* Perform architecture specific initialization
|
||||
* Perform architecture specific initialization of a composite USB device.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int composite_archinitialize(void)
|
||||
int board_composite_initialize(int port)
|
||||
{
|
||||
/* If system/composite is built as an NSH command, then SD slot should
|
||||
* already have been initialized in board_app_initialize() (see stm32_appinit.c).
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/************************************************************************************
|
||||
* configs/olimexino-stm32/src/stm32_usbmsc.c
|
||||
*
|
||||
* Copyright (C) 2015 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2015-2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
* David Sidrane <david_s5@nscdg.com>
|
||||
*
|
||||
@@ -44,8 +44,9 @@
|
||||
#include <syslog.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/spi/spi.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/mmcsd.h>
|
||||
#include <nuttx/spi/spi.h>
|
||||
|
||||
#include "stm32.h"
|
||||
#include "olimexino-stm32.h"
|
||||
@@ -60,8 +61,6 @@
|
||||
|
||||
/* Configuration ************************************************************/
|
||||
|
||||
/* Configuration ************************************************************/
|
||||
|
||||
#ifndef CONFIG_SYSTEM_USBMSC_DEVMINOR1
|
||||
# define CONFIG_SYSTEM_USBMSC_DEVMINOR1 0
|
||||
#endif
|
||||
@@ -83,14 +82,14 @@
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: usbmsc_archinitialize
|
||||
* Name: board_usbmsc_initialize
|
||||
*
|
||||
* Description:
|
||||
* Perform architecture specific initialization
|
||||
* Perform architecture specific initialization of the USB MSC device.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int usbmsc_archinitialize(void)
|
||||
int board_usbmsc_initialize(int port)
|
||||
{
|
||||
/* If system/usbmsc is built as an NSH command, then SD slot should
|
||||
* already have been initialized in board_app_initialize() (see stm32_appinit.c).
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* configs/pic32mx-starterkit/src/up_usbmsc.c
|
||||
*
|
||||
* Copyright (C) 2012, 2013 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2012, 2013, 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -38,19 +38,16 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/board.h>
|
||||
|
||||
#include "pic32mx-starterkit.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: usbmsc_archinitialize
|
||||
* Name: board_usbmsc_initialize
|
||||
*
|
||||
* Description:
|
||||
* Perform architecture specific initialization as needed to establish
|
||||
@@ -58,7 +55,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int usbmsc_archinitialize(void)
|
||||
int board_usbmsc_initialize(int port)
|
||||
{
|
||||
/* If system/usbmsc is built as an NSH command, then SD slot should
|
||||
* already have been initialized in board_app_initialize() (see
|
||||
|
||||
@@ -350,6 +350,7 @@ CONFIG_NSH_MMCSDSPIPORTNO=1
|
||||
#
|
||||
CONFIG_LIB_BOARDCTL=y
|
||||
# CONFIG_BOARDCTL_UNIQUEID is not set
|
||||
CONFIG_BOARDCTL_USBDEVCTRL=y
|
||||
# CONFIG_BOARDCTL_TSCTEST is not set
|
||||
# CONFIG_BOARDCTL_ADCTEST is not set
|
||||
# CONFIG_BOARDCTL_PWMTEST is not set
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user