mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
Changes from review of the last PR
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
/********************************************************************************************
|
||||
* arch/arm/src/kinetis/kinetis_usbotg.h
|
||||
*
|
||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2011, 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -363,10 +363,6 @@ struct usbotg_bdtentry_s
|
||||
};
|
||||
#endif
|
||||
|
||||
/********************************************************************************************
|
||||
* Public Data
|
||||
********************************************************************************************/
|
||||
|
||||
/********************************************************************************************
|
||||
* Public Functions
|
||||
********************************************************************************************/
|
||||
|
||||
@@ -78,7 +78,9 @@ int board_app_initialize(uintptr_t arg)
|
||||
/* Teensy is powered from usb and (bug?) only boots from being programmed,
|
||||
* so if usb is compiled in signal the controller driver that we're attached now.
|
||||
*/
|
||||
|
||||
khci_usbattach();
|
||||
#endif
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/************************************************************************************
|
||||
* configs/teensy-3.x/src/k20_usbdev.c
|
||||
*
|
||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2011, 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -56,13 +56,10 @@
|
||||
/************************************************************************************
|
||||
* Pre-processor Definitions
|
||||
************************************************************************************/
|
||||
|
||||
#define khci_getreg(addr) getreg8(addr)
|
||||
#define khci_putreg(val,addr) putreg8(val,addr)
|
||||
#define SIM_CLKDIV2_USBDIV(n) (uint32_t)(((n) & 0x07) << 1)
|
||||
|
||||
/************************************************************************************
|
||||
* Private Functions
|
||||
************************************************************************************/
|
||||
#define SIM_CLKDIV2_USBDIV(n) (uint32_t)(((n) & 0x07) << 1)
|
||||
|
||||
/************************************************************************************
|
||||
* Public Functions
|
||||
@@ -78,9 +75,6 @@
|
||||
|
||||
void kinetis_usbinitialize(void)
|
||||
{
|
||||
uint32_t regval;
|
||||
|
||||
// khci_usbattach();
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
@@ -99,16 +93,28 @@ int kinetis_usbpullup(FAR struct usbdev_s *dev, bool enable)
|
||||
{
|
||||
usbtrace(TRACE_DEVPULLUP, (uint16_t)enable);
|
||||
uint32_t regval;
|
||||
if (enable)
|
||||
khci_putreg(USB_CONTROL_DPPULLUPNONOTG, KINETIS_USB0_CONTROL);
|
||||
else
|
||||
khci_putreg(0,KINETIS_USB0_CONTROL);
|
||||
|
||||
if (enable)
|
||||
{
|
||||
khci_putreg(USB_CONTROL_DPPULLUPNONOTG, KINETIS_USB0_CONTROL);
|
||||
}
|
||||
else
|
||||
{
|
||||
khci_putreg(0,KINETIS_USB0_CONTROL);
|
||||
}
|
||||
|
||||
#if 0
|
||||
regval = khci_getreg(KINETIS_USB0_OTGCTL);
|
||||
if (enable)
|
||||
regval |= (1<<2);
|
||||
else
|
||||
regval &= ~(1<<2);
|
||||
|
||||
if (enable)
|
||||
{
|
||||
regval |= (1 << 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
regval &= ~(1 << 2);
|
||||
}
|
||||
|
||||
khci_putreg(regval,KINETIS_USB0_OTGCTL);
|
||||
#endif
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
############################################################################
|
||||
# configs/teensy-3.1/nsh/Make.defs
|
||||
#
|
||||
# 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
|
||||
@@ -114,4 +114,3 @@ HOSTCC = gcc
|
||||
HOSTINCLUDES = -I.
|
||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -g -pipe
|
||||
HOSTLDFLAGS =
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ CONFIG_HOST_LINUX=y
|
||||
#
|
||||
# Build Configuration
|
||||
#
|
||||
CONFIG_APPS_DIR="../apps"
|
||||
# CONFIG_APPS_DIR="../apps"
|
||||
CONFIG_BUILD_FLAT=y
|
||||
# CONFIG_BUILD_2PASS is not set
|
||||
|
||||
@@ -42,36 +42,11 @@ CONFIG_RAW_BINARY=y
|
||||
#
|
||||
# Debug Options
|
||||
#
|
||||
CONFIG_DEBUG=y
|
||||
# CONFIG_DEBUG is not set
|
||||
# CONFIG_ARCH_HAVE_HEAPCHECK is not set
|
||||
# CONFIG_DEBUG_VERBOSE is not set
|
||||
|
||||
#
|
||||
# Subsystem Debug Options
|
||||
#
|
||||
# CONFIG_DEBUG_BINFMT is not set
|
||||
# CONFIG_DEBUG_FS is not set
|
||||
# CONFIG_DEBUG_GRAPHICS is not set
|
||||
# CONFIG_DEBUG_LIB is not set
|
||||
# CONFIG_DEBUG_MM is not set
|
||||
# CONFIG_DEBUG_SCHED is not set
|
||||
|
||||
#
|
||||
# OS Function Debug Options
|
||||
#
|
||||
# CONFIG_DEBUG_IRQ is not set
|
||||
|
||||
#
|
||||
# Driver Debug Options
|
||||
#
|
||||
# CONFIG_DEBUG_LEDS is not set
|
||||
# CONFIG_DEBUG_ANALOG is not set
|
||||
# CONFIG_DEBUG_GPIO is not set
|
||||
# CONFIG_DEBUG_SPI is not set
|
||||
# CONFIG_DEBUG_USB is not set
|
||||
CONFIG_ARCH_HAVE_STACKCHECK=y
|
||||
# CONFIG_STACK_COLORATION is not set
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
# CONFIG_DEBUG_SYMBOLS is not set
|
||||
CONFIG_ARCH_HAVE_CUSTOMOPT=y
|
||||
# CONFIG_DEBUG_NOOPT is not set
|
||||
# CONFIG_DEBUG_CUSTOMOPT is not set
|
||||
@@ -142,6 +117,8 @@ CONFIG_ARCH_CORTEXM4=y
|
||||
# CONFIG_ARCH_CORTEXR7F is not set
|
||||
CONFIG_ARCH_FAMILY="armv7-m"
|
||||
CONFIG_ARCH_CHIP="kinetis"
|
||||
# CONFIG_ARM_TOOLCHAIN_IAR is not set
|
||||
CONFIG_ARM_TOOLCHAIN_GNU=y
|
||||
# CONFIG_ARMV7M_USEBASEPRI is not set
|
||||
CONFIG_ARCH_HAVE_FPU=y
|
||||
# CONFIG_ARCH_HAVE_DPFPU is not set
|
||||
@@ -149,7 +126,6 @@ CONFIG_ARCH_HAVE_FPU=y
|
||||
# CONFIG_ARCH_HAVE_TRUSTZONE is not set
|
||||
CONFIG_ARM_HAVE_MPU_UNIFIED=y
|
||||
# CONFIG_ARM_MPU is not set
|
||||
# CONFIG_DEBUG_HARDFAULT is not set
|
||||
|
||||
#
|
||||
# ARMV7M Configuration Options
|
||||
@@ -158,6 +134,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y
|
||||
# CONFIG_ARMV7M_HAVE_DCACHE is not set
|
||||
# CONFIG_ARMV7M_HAVE_ITCM is not set
|
||||
# CONFIG_ARMV7M_HAVE_DTCM is not set
|
||||
# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set
|
||||
# CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set
|
||||
# CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set
|
||||
# CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set
|
||||
@@ -480,7 +457,12 @@ CONFIG_SPI_EXCHANGE=y
|
||||
# CONFIG_BCH is not set
|
||||
# CONFIG_INPUT is not set
|
||||
# CONFIG_IOEXPANDER is not set
|
||||
|
||||
#
|
||||
# LCD Driver Support
|
||||
#
|
||||
# CONFIG_LCD is not set
|
||||
# CONFIG_SLCD is not set
|
||||
|
||||
#
|
||||
# LED Support
|
||||
@@ -501,38 +483,33 @@ CONFIG_SERIAL=y
|
||||
# CONFIG_DEV_LOWCONSOLE is not set
|
||||
CONFIG_SERIAL_REMOVABLE=y
|
||||
# CONFIG_16550_UART is not set
|
||||
# CONFIG_ARCH_HAVE_UART is not set
|
||||
CONFIG_ARCH_HAVE_UART0=y
|
||||
# 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 is not set
|
||||
# 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_UART_SERIALDRIVER is not set
|
||||
CONFIG_UART0_SERIALDRIVER=y
|
||||
# CONFIG_UART1_SERIALDRIVER is not set
|
||||
# CONFIG_UART2_SERIALDRIVER is not set
|
||||
# CONFIG_UART3_SERIALDRIVER is not set
|
||||
# CONFIG_UART4_SERIALDRIVER is not set
|
||||
# CONFIG_UART5_SERIALDRIVER is not set
|
||||
# CONFIG_UART6_SERIALDRIVER is not set
|
||||
# CONFIG_UART7_SERIALDRIVER is not set
|
||||
# CONFIG_UART8_SERIALDRIVER is not set
|
||||
# CONFIG_SCI0_SERIALDRIVER is not set
|
||||
# CONFIG_SCI1_SERIALDRIVER is not set
|
||||
# CONFIG_USART0_SERIALDRIVER is not set
|
||||
# CONFIG_USART1_SERIALDRIVER is not set
|
||||
# CONFIG_USART2_SERIALDRIVER is not set
|
||||
# CONFIG_USART3_SERIALDRIVER is not set
|
||||
# CONFIG_USART4_SERIALDRIVER is not set
|
||||
# CONFIG_USART5_SERIALDRIVER is not set
|
||||
# CONFIG_USART6_SERIALDRIVER is not set
|
||||
# CONFIG_USART7_SERIALDRIVER is not set
|
||||
# CONFIG_USART8_SERIALDRIVER is not set
|
||||
# CONFIG_OTHER_UART_SERIALDRIVER is not set
|
||||
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_SERIAL_TIOCSERGSTRUCT is not set
|
||||
# CONFIG_ARCH_HAVE_SERIAL_TERMIOS is not set
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
# CONFIG_OTHER_SERIAL_CONSOLE is not set
|
||||
@@ -755,10 +732,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024
|
||||
# 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_JSON is not set
|
||||
# CONFIG_EXAMPLES_KEYPADTEST is not set
|
||||
# CONFIG_EXAMPLES_MEDIA is not set
|
||||
# CONFIG_EXAMPLES_MM is not set
|
||||
# CONFIG_EXAMPLES_MODBUS is not set
|
||||
@@ -767,17 +744,17 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024
|
||||
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_NXTERM 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_PPPD is not set
|
||||
# CONFIG_EXAMPLES_RGBLED is not set
|
||||
# CONFIG_EXAMPLES_RGMP is not set
|
||||
# CONFIG_EXAMPLES_SENDMAIL is not set
|
||||
@@ -785,17 +762,17 @@ CONFIG_EXAMPLES_NSH=y
|
||||
# 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_SMART_TEST is not set
|
||||
# CONFIG_EXAMPLES_SMP is not set
|
||||
# CONFIG_EXAMPLES_TCPECHO is not set
|
||||
# CONFIG_EXAMPLES_TELNETD is not set
|
||||
# CONFIG_EXAMPLES_TIFF is not set
|
||||
# CONFIG_EXAMPLES_TOUCHSCREEN is not set
|
||||
# CONFIG_EXAMPLES_WEBSERVER is not set
|
||||
# CONFIG_EXAMPLES_USBSERIAL is not set
|
||||
# CONFIG_EXAMPLES_USBTERM is not set
|
||||
# CONFIG_EXAMPLES_WATCHDOG is not set
|
||||
# CONFIG_EXAMPLES_WEBSERVER is not set
|
||||
|
||||
#
|
||||
# File System Utilities
|
||||
@@ -817,8 +794,8 @@ CONFIG_EXAMPLES_NSH=y
|
||||
# Interpreters
|
||||
#
|
||||
# CONFIG_INTERPRETERS_FICL is not set
|
||||
# CONFIG_INTERPRETERS_PCODE is not set
|
||||
# CONFIG_INTERPRETERS_MICROPYTHON is not set
|
||||
# CONFIG_INTERPRETERS_PCODE is not set
|
||||
|
||||
#
|
||||
# FreeModBus
|
||||
@@ -829,6 +806,7 @@ CONFIG_EXAMPLES_NSH=y
|
||||
# Network Utilities
|
||||
#
|
||||
# CONFIG_NETUTILS_CODECS is not set
|
||||
# CONFIG_NETUTILS_ESP8266 is not set
|
||||
# CONFIG_NETUTILS_FTPC is not set
|
||||
# CONFIG_NETUTILS_JSON is not set
|
||||
# CONFIG_NETUTILS_SMTP is not set
|
||||
@@ -948,14 +926,21 @@ CONFIG_NSH_ARCHINIT=y
|
||||
#
|
||||
# System Libraries and NSH Add-Ons
|
||||
#
|
||||
# CONFIG_SYSTEM_FREE is not set
|
||||
CONFIG_SYSTEM_CDCACM=y
|
||||
CONFIG_SYSTEM_CDCACM_DEVMINOR=0
|
||||
# CONFIG_SYSTEM_CDCACM_TRACEINIT is not set
|
||||
# CONFIG_SYSTEM_CDCACM_TRACECLASS is not set
|
||||
# CONFIG_SYSTEM_CDCACM_TRACETRANSFERS is not set
|
||||
# CONFIG_SYSTEM_CDCACM_TRACECONTROLLER is not set
|
||||
# CONFIG_SYSTEM_CDCACM_TRACEINTERRUPTS is not set
|
||||
# CONFIG_SYSTEM_CLE is not set
|
||||
# CONFIG_SYSTEM_CUTERM is not set
|
||||
# CONFIG_SYSTEM_INSTALL is not set
|
||||
# CONFIG_SYSTEM_FREE is not set
|
||||
# CONFIG_SYSTEM_HEX2BIN is not set
|
||||
CONFIG_SYSTEM_HEXED=y
|
||||
CONFIG_SYSTEM_HEXED_STACKSIZE=2048
|
||||
CONFIG_SYSTEM_HEXED_PRIORITY=100
|
||||
# CONFIG_SYSTEM_INSTALL is not set
|
||||
CONFIG_SYSTEM_RAMTEST=y
|
||||
CONFIG_READLINE_HAVE_EXTMATCH=y
|
||||
CONFIG_SYSTEM_READLINE=y
|
||||
@@ -966,16 +951,7 @@ CONFIG_READLINE_MAX_EXTCMDS=64
|
||||
CONFIG_READLINE_CMD_HISTORY=y
|
||||
CONFIG_READLINE_CMD_HISTORY_LINELEN=80
|
||||
CONFIG_READLINE_CMD_HISTORY_LEN=16
|
||||
# CONFIG_SYSTEM_SDCARD is not set
|
||||
# CONFIG_SYSTEM_SUDOKU is not set
|
||||
# CONFIG_SYSTEM_VI is not set
|
||||
CONFIG_SYSTEM_CDCACM=y
|
||||
CONFIG_SYSTEM_CDCACM_DEVMINOR=0
|
||||
# CONFIG_SYSTEM_CDCACM_TRACEINIT is not set
|
||||
# CONFIG_SYSTEM_CDCACM_TRACECLASS is not set
|
||||
# CONFIG_SYSTEM_CDCACM_TRACETRANSFERS is not set
|
||||
# CONFIG_SYSTEM_CDCACM_TRACECONTROLLER is not set
|
||||
# CONFIG_SYSTEM_CDCACM_TRACEINTERRUPTS is not set
|
||||
# CONFIG_SYSTEM_UBLOXMODEM is not set
|
||||
CONFIG_SYSTEM_USBMONITOR=y
|
||||
CONFIG_SYSTEM_USBMONITOR_STACKSIZE=2048
|
||||
@@ -986,4 +962,5 @@ CONFIG_SYSTEM_USBMONITOR_TRACECLASS=y
|
||||
CONFIG_SYSTEM_USBMONITOR_TRACETRANSFERS=y
|
||||
CONFIG_SYSTEM_USBMONITOR_TRACECONTROLLER=y
|
||||
CONFIG_SYSTEM_USBMONITOR_TRACEINTERRUPTS=y
|
||||
# CONFIG_SYSTEM_VI is not set
|
||||
# CONFIG_SYSTEM_ZMODEM is not set
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
# configs/teensy-3.1/nsh/setenv.sh
|
||||
#
|
||||
# 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
|
||||
@@ -62,13 +62,9 @@ fi
|
||||
# You can this free toolchain here https://launchpad.net/gcc-arm-embedded
|
||||
export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/GNU Tools ARM Embedded/4.9 2015q2/bin"
|
||||
|
||||
# These are the Cygwin paths to the locations where I installed the Atollic
|
||||
# toolchain under windows. You will also have to edit this if you install
|
||||
# the Atollic toolchain in any other location. /usr/bin is added before
|
||||
# the Atollic bin path because there is are binaries named gcc.exe and g++.exe
|
||||
# at those locations as well.
|
||||
#export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for ARM Pro 2.3.0/ARMTools/bin"
|
||||
#export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for STMicroelectronics STM32 Lite 2.3.0/ARMTools/bin"
|
||||
# This is the path to the location where I installed the devkitARM toolchain
|
||||
# You can get this free toolchain from http://devkitpro.org/ or http://sourceforge.net/projects/devkitpro/
|
||||
#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/devkitARM/bin"
|
||||
|
||||
# This is the Cygwin path to the location where I build the buildroot
|
||||
# toolchain.
|
||||
|
||||
Reference in New Issue
Block a user