Skip to content
......@@ -53,8 +53,6 @@
# include "chip/tm4c123_syscontrol.h"
#elif defined(CONFIG_ARCH_CHIP_TM4C129)
# include "chip/tm4c129_syscontrol.h"
#elif defined(CONFIG_ARCH_CHIP_CC3200)
# include "chip/cc3200_syscontrol.h"
#else
# error "Unsupported Tiva/Stellaris system control module"
#endif
......
......@@ -45,8 +45,6 @@
# include "chip/lm4f_vectors.h"
#elif defined(CONFIG_ARCH_CHIP_TM4C)
# include "chip/tm4c_vectors.h"
#elif defined(CONFIG_ARCH_CHIP_CC3200)
# include "chip/cc3200_vectors.h"
#else
# error "Unsupported Tiva/Stellaris vector file"
#endif
......
......@@ -60,8 +60,7 @@
/* Configuration ************************************************************/
#if defined(CONFIG_ARCH_CHIP_LM3S) || defined(CONFIG_ARCH_CHIP_LM4F) || \
defined(CONFIG_ARCH_CHIP_CC3200)
#if defined(CONFIG_ARCH_CHIP_LM3S) || defined(CONFIG_ARCH_CHIP_LM4F)
/* I don't believe that any of these families support interrupts on port J. Many
* do not support interrupts on port H either.
......
/****************************************************************************
* arch/arm/src/tiva/tiva_irq.c
*
* Copyright (C) 2009, 2011, 2013-2014 Gregory Nutt. All rights reserved.
* Copyright (C) 2009, 2011, 2013-2014, 2018 Gregory Nutt. All rights
* reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
......@@ -409,7 +410,9 @@ void up_irqinitialize(void)
up_ramvec_initialize();
#endif
#ifdef CONFIG_ARCH_CHIP_CC3200
#ifdef CONFIG_TIVA_RAMVBAR
/* Set the interrupt vector table to beginning of RAM */
putreg32((uint32_t)CONFIG_RAM_START, NVIC_VECTAB);
#endif
......
/****************************************************************************
* arch/arm/src/tiva/tiva_syscontrol.c
*
* Copyright (C) 2009-2014 Gregory Nutt. All rights reserved.
* Copyright (C) 2009-2014, 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
......@@ -199,6 +199,12 @@ static inline void tiva_pll_lock(void)
void tiva_clockconfig(uint32_t newrcc, uint32_t newrcc2)
{
/* We are probably using the main oscillator. The main oscillator is
* disabled on reset and so probably must be enabled here. The internal
* oscillator is enabled on reset and if that is selected, most likely
* nothing needs to be done.
*/
uint32_t rcc;
uint32_t rcc2;
......@@ -207,12 +213,6 @@ void tiva_clockconfig(uint32_t newrcc, uint32_t newrcc2)
rcc = getreg32(TIVA_SYSCON_RCC);
rcc2 = getreg32(TIVA_SYSCON_RCC2);
/* We are probably using the main oscillator. The main oscillator is
* disabled on reset and so probably must be enabled here. The internal
* oscillator is enabled on reset and if that is selected, most likely
* nothing needs to be done.
*/
#if defined(LM4F) || defined(TM4C)
if ((rcc & SYSCON_RCC_MOSCDIS) != 0 && (newrcc & SYSCON_RCC_MOSCDIS) == 0)
{
......@@ -318,12 +318,6 @@ void tiva_clockconfig(uint32_t newrcc, uint32_t newrcc2)
putreg32(rcc2, TIVA_SYSCON_RCC2);
}
}
#elif defined(CONFIG_ARCH_CHIP_CC3200)
#if 0
/* NOTE: we do this in up_earlyconsoleinit() */
cc3200_init();
#endif
#else
if (((rcc & SYSCON_RCC_MOSCDIS) != 0 && (newrcc & SYSCON_RCC_MOSCDIS) == 0) ||
((rcc & SYSCON_RCC_IOSCDIS) != 0 && (newrcc & SYSCON_RCC_IOSCDIS) == 0))
......@@ -419,8 +413,14 @@ void tiva_clockconfig(uint32_t newrcc, uint32_t newrcc2)
void up_clockconfig(void)
{
#if defined(CONFIG_TIVA_BOARD_CLOCKCONFIG)
/* Execute the board specific clock configuration logic */
tiva_board_clockconfig();
#else
#ifdef CONFIG_LM_REVA2
/* Some early LM3 silicon returned an increase LDO voltage or 2.75V to work
/* Some early LM3 silicon returned an increase LDO voltage to 2.75V to work
* around a PLL bug
*/
......@@ -432,4 +432,5 @@ void up_clockconfig(void)
*/
tiva_clockconfig(TIVA_RCC_VALUE, TIVA_RCC2_VALUE);
#endif
}
......@@ -81,7 +81,7 @@ extern "C"
* Public Function Prototypes
****************************************************************************/
#ifdef CONFIG_ARCH_CHIP_TM4C129
#if defined(CONFIG_ARCH_CHIP_TM4C129)
/****************************************************************************
* Name: tiva_clockconfig
*
......@@ -132,6 +132,20 @@ uint32_t tiva_clockconfig(uint32_t pllfreq0, uint32_t pllfreq1, uint32_t sysdiv)
void tiva_clockconfig(uint32_t newrcc, uint32_t newrcc2);
#endif
#if defined(CONFIG_TIVA_BOARD_CLOCKCONFIG)
/****************************************************************************
* Name: tiva_board_clockconfig
*
* Description:
* If CONFIG_TIVA_BOARD_CLOCKCONFIG is defined, then the board-specific
* logic must provide the function tiva_board_clockconfig(). That
* function will then be called to perform all clock initialization.
*
****************************************************************************/
void tiva_board_clockconfig(void);
#endif
/****************************************************************************
* Name: up_clockconfig
*
......
......@@ -1111,17 +1111,6 @@ config ARCH_BOARD_SKP16C26
uses the GNU m32c toolchain. STATUS: The port is complete but untested
due to issues with compiler internal errors.
config ARCH_BOARD_SPARK
bool "Spark Core"
depends on ARCH_CHIP_STM32F103CB
select ARCH_HAVE_LEDS
select ARCH_HAVE_BUTTONS
select ARCH_HAVE_IRQBUTTONS
---help---
A configuration for the Spark Core from Spark Devices
(http://www.spark.io). This board features the STM32103CBT6
MCU from STMicro.
config ARCH_BOARD_PHOTON
bool "Photon wifi board"
depends on ARCH_CHIP_STM32F205RG
......@@ -1412,16 +1401,6 @@ config ARCH_BOARD_TM4C1294_LAUNCHPAD
---help---
Tiva EK-TM4C1294XL LaunchPad.
config ARCH_BOARD_CC3200_LAUNCHPAD
bool "Tiva CC3200 Launchpad"
depends on ARCH_CHIP_CC3200
select ARCH_HAVE_LEDS
select ARCH_HAVE_BUTTONS
select ARCH_HAVE_IRQBUTTONS
select TIVA_BOARD_EARLYINIT
---help---
Tiva CC3200 Launchpad.
config ARCH_BOARD_TWR_K60N512
bool "FreeScale TWR-K60N512 development board"
depends on ARCH_CHIP_MK60N512VMD100
......@@ -1726,7 +1705,6 @@ config ARCH_BOARD
default "samv71-xult" if ARCH_BOARD_SAMV71_XULT
default "shenzhou" if ARCH_BOARD_SHENZHOU
default "skp16c26" if ARCH_BOARD_SKP16C26
default "spark" if ARCH_BOARD_SPARK
default "photon" if ARCH_BOARD_PHOTON
default "stm32butterfly2" if ARCH_BOARD_STM32_BUTTERFLY2
default "stm32_tiny" if ARCH_BOARD_STM32_TINY
......@@ -1756,7 +1734,6 @@ config ARCH_BOARD
default "teensy-lc" if ARCH_BOARD_TEENSY_LC
default "tm4c123g-launchpad" if ARCH_BOARD_TM4C123G_LAUNCHPAD
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 "twr-k64f120m" if ARCH_BOARD_TWR_K64F120M
default "u-blox-c027" if ARCH_BOARD_U_BLOX_C027
......@@ -2120,9 +2097,6 @@ endif
if ARCH_BOARD_SKP16C26
source "configs/skp16c26/Kconfig"
endif
if ARCH_BOARD_SPARK
source "configs/spark/Kconfig"
endif
if ARCH_BOARD_PHOTON
source "configs/photon/Kconfig"
endif
......@@ -2204,9 +2178,6 @@ endif
if ARCH_BOARD_TM4C1294_LAUNCHPAD
source "configs/tm4c1294-launchpad/Kconfig"
endif
if ARCH_BOARD_CC3200_LAUNCHPAD
source "configs/cc3200-launchpad/Kconfig"
endif
if ARCH_BOARD_TWR_K60N512
source "configs/twr-k60n512/Kconfig"
endif
......
......@@ -664,10 +664,6 @@ configs/shenzhou
This is the port of NuttX to the Shenzhou development board from
www.armjishu.com. This board features the STMicro STM32F107VCT MCU.
configs/spark
Board support for the Spark Core from Spark Devices http://www.sparkdevices.com).
This board features the STM32103CBT6 MCU from STMicro.
configs/skp16c26
Renesas M16C processor on the Renesas SKP16C26 StarterKit. This port
uses the GNU m32c toolchain. STATUS: The port is complete but untested
......
......@@ -349,6 +349,38 @@
#define PINCONF_U3_RXD PINCONF_U3_RXD_2
#define PINCONF_U3_DIR PINCONF_U3_DIR_2
/* SPI Pins ****************************************************************/
/* The Bambino 200E has SPI peripheral pins reserved for SPIFI.
* SSP0 and SSP1 are available on Socket 1 and 10, respectively:
*
* --------- ---------- -----------------
* SIGNAL Socket/Pin LPC4330FBD144 PIN
* --------- ---------- -----------------
* SSP0_SCK s:1 / p:9 112 P3_0
* SSP0_SSEL s:1 / p:6 38 P1_0
* SSP0_MISO s:1 / p:8 42 P1_1
* SSP0_MOSI s:1 / p:7 43 P1_2
* SSP1_SCK s:10 / p:9 120 PF_4
* SSP1_SSEL s:10 / p:6 48 P1_5
* SSP1_MISO s:10 / p:8 44 P1_3
* SSP1_MOSI s:10 / p:7 47 P1_4
* --------- ---------- -----------------
*
* The following definitions must be provided so that the LPC43 serial
* driver can set up the SPI ports properly (see the
* file arch/arm/src/lpc43xx/lpc4310203050_pinconf.h for more info).
*/
#define PINCONF_SSP0_SCK PINCONF_SSP0_SCK_3
#define PINCONF_SSP0_SSEL PINCONF_SSP0_SSEL_3
#define PINCONF_SSP0_MISO PINCONF_SSP0_MISO_3
#define PINCONF_SSP0_MOSI PINCONF_SSP0_MOSI_3
#define PINCONF_SSP1_SCK PINCONF_SSP1_SCK_1
#define PINCONF_SSP1_SSEL PINCONF_SSP1_SSEL_3
#define PINCONF_SSP1_MISO PINCONF_SSP1_MISO_3
#define PINCONF_SSP1_MOSI PINCONF_SSP1_MOSI_3
/* Ethernet */
#define PINCONF_ENET_RX_DV PINCONF_ENET_RX_DV_2
......
# CONFIG_ARCH_FPU is not set
# CONFIG_ARCH_LEDS is not set
# CONFIG_DISABLE_OS_API is not set
# CONFIG_NSH_DISABLE_DATE is not set
# CONFIG_NSH_DISABLE_IFCONFIG is not set
# CONFIG_NSH_DISABLE_PS is not set
CONFIG_ARCH_BOARD_INDIUM_F7=y
CONFIG_ARCH_BOARD="indium-f7"
CONFIG_ARCH_CHIP_STM32F7=y
CONFIG_ARCH_CHIP_STM32F746ZG=y
CONFIG_ARCH_BOARD_BAMBINO_200E=y
CONFIG_ARCH_BOARD="bambino-200e"
CONFIG_ARCH_CHIP_LPC4330FBD144=y
CONFIG_ARCH_CHIP_LPC43XX=y
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH_STDARG_H=y
CONFIG_ARCH="arm"
CONFIG_ARMV7M_DCACHE_WRITETHROUGH=y
CONFIG_ARMV7M_DCACHE=y
CONFIG_ARMV7M_DTCM=y
CONFIG_ARMV7M_ICACHE=y
CONFIG_BOARD_LOOPSPERMSEC=43103
CONFIG_BOARD_LOOPSPERMSEC=18535
CONFIG_BOARD_INITIALIZE=y
CONFIG_BUILTIN=y
CONFIG_CDCACM=y
CONFIG_DEBUG_ERROR=y
CONFIG_DEBUG_SENSORS_ERROR=y
CONFIG_DEBUG_SYMBOLS=y
CONFIG_DISABLE_POLL=y
CONFIG_EXAMPLES_HELLOXX=y
CONFIG_EXAMPLES_LEDS=y
CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y
CONFIG_EXAMPLES_MAX31855=y
CONFIG_EXAMPLES_NSH=y
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_EXAMPLES_TIMER=y
CONFIG_FAT_LCNAMES=y
CONFIG_FAT_LFN=y
CONFIG_FS_FAT=y
CONFIG_LPC43_BOOT_SPIFI=y
CONFIG_LPC43_SSP0=y
CONFIG_LPC43_SSP1=y
CONFIG_LPC43_TMR0=y
CONFIG_LPC43_UART1=y
CONFIG_LPC43_USB0=y
CONFIG_MAX_TASKS=16
CONFIG_MAX_WDOGPARMS=2
CONFIG_MM_REGIONS=2
......@@ -37,27 +40,23 @@ CONFIG_NSH_READLINE=y
CONFIG_PREALLOC_MQ_MSGS=4
CONFIG_PREALLOC_TIMERS=4
CONFIG_PREALLOC_WDOGS=4
CONFIG_PRIORITY_INHERITANCE=y
CONFIG_RAM_SIZE=245760
CONFIG_RAM_START=0x20010000
CONFIG_RAM_SIZE=131072
CONFIG_RAM_START=0x10000000
CONFIG_RAW_BINARY=y
CONFIG_READLINE_CMD_HISTORY=y
CONFIG_READLINE_TABCOMPLETION=y
CONFIG_RR_INTERVAL=200
CONFIG_SCHED_HPWORK=y
CONFIG_SCHED_LPWORK=y
CONFIG_SCHED_WAITPID=y
CONFIG_SDCLONE_DISABLE=y
CONFIG_SERIAL_DISABLE_REORDERING=y
CONFIG_SENSORS_MAX31855=y
CONFIG_SPI=y
CONFIG_STACK_COLORATION=y
CONFIG_START_DAY=30
CONFIG_START_MONTH=11
CONFIG_START_YEAR=2015
CONFIG_STM32F7_SERIALBRK_BSDCOMPAT=y
CONFIG_STM32F7_USART_BREAKS=y
CONFIG_START_DAY=11
CONFIG_START_MONTH=7
CONFIG_START_YEAR=2012
CONFIG_SYMTAB_ORDEREDBYNAME=y
CONFIG_SYSTEM_CDCACM_DEVMINOR=1
CONFIG_SYSTEM_CDCACM=y
CONFIG_TASK_NAME_SIZE=0
CONFIG_TIMER=y
CONFIG_UART1_SERIAL_CONSOLE=y
CONFIG_USBDEV=y
CONFIG_USER_ENTRYPOINT="nsh_main"
CONFIG_USERLED_LOWER=y
CONFIG_USERLED=y
CONFIG_WDOG_INTRESERVE=0
......@@ -37,7 +37,11 @@
-include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = lpc43_boot.c
CSRCS = lpc43_boot.c lpc43_ssp.c
ifeq ($(CONFIG_SENSORS_MAX31855),y)
CSRCS += lpc43_max31855.c
endif
ifeq ($(CONFIG_LIB_BOARDCTL),y)
CSRCS += lpc43_appinit.c
......
/****************************************************************************
* configs/bambino-200e/src/bambino-200e.h
*
* Copyright (C) 2016 Gregory Nutt. All rights reserved.
* Copyright (C) 2016, 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
* Alan Carvalho de Assis acassis@gmail.com [nuttx] <nuttx@yahoogroups.com>
*
......@@ -70,8 +70,10 @@
#define PINCONFIG_LED1 PINCONF_GPIO3p7
#define PINCONFIG_LED2 PINCONF_GPIO5p5
#define GPIO_LED1 (GPIO_MODE_OUTPUT | GPIO_VALUE_ONE | GPIO_PORT3 | GPIO_PIN7)
#define GPIO_LED2 (GPIO_MODE_OUTPUT | GPIO_VALUE_ONE | GPIO_PORT5 | GPIO_PIN5)
#define GPIO_LED1 (GPIO_MODE_OUTPUT | GPIO_VALUE_ONE | GPIO_PORT3 | \
GPIO_PIN7)
#define GPIO_LED2 (GPIO_MODE_OUTPUT | GPIO_VALUE_ONE | GPIO_PORT5 | \
GPIO_PIN5)
/****************************************************************************
* Buttons GPIO
......@@ -90,6 +92,15 @@
#define GPIO_SSP0_MISO GPIO_SSP0_MISO_1
#define GPIO_SSP0_MOSI GPIO_SSP0_MOSI_1
/* Max31855 Chip Select pins */
#define PINCONFIG_MAX31855_CS1 PINCONF_GPIO0p4
#define PINCONFIG_MAX31855_CS2 PINCONF_GPIO1p8
#define GPIO_MAX31855_CS1 (GPIO_MODE_OUTPUT | GPIO_VALUE_ONE | \
GPIO_PORT0 | GPIO_PIN4)
#define GPIO_MAX31855_CS2 (GPIO_MODE_OUTPUT | GPIO_VALUE_ONE | \
GPIO_PORT1 | GPIO_PIN8)
/* We need to redefine USB_PWRD as GPIO to get USB Host working
* Also remember to add 2 resistors of 15K to D+ and D- pins.
*/
......@@ -130,7 +141,6 @@
# undef HAVE_MMCSD
#endif
/****************************************************************************
* Public Types
****************************************************************************/
......@@ -149,12 +159,32 @@
* Name: lpc43_sspdev_initialize
*
* Description:
* Called to configure SPI chip select GPIO pins for the Lincoln 80 board.
* Called to configure SPI chip select GPIO pins for the Bambino-200e
* board.
*
****************************************************************************/
void weak_function lpc43_sspdev_initialize(void);
/************************************************************************************
* Name: lpc43_max31855initialize
*
* Description:
* Initialize and register the MAX31855 Temperature Sensor driver.
*
* Input parameters:
* devpath - The full path to the driver to register. E.g., "/dev/temp0"
* spi - An instance of the SPI interface to use to communicate with
* MAX31855
* devid - Minor device number. E.g., 0, 1, 2, etc.
*
* Returned Value:
* Zero (OK) on success; a negated errno value on failure.
*
************************************************************************************/
int lpc43_max31855initialize(FAR const char *devpath, int bus, uint16_t devid);
/************************************************************************************
* Name: lpc43xx_timerinitialize()
*
......
/************************************************************************************
* configs/bambino-200e/src/lpc43_boot.c
*
* Copyright (C) 2016 Gregory Nutt. All rights reserved.
* Copyright (C) 2016, 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
* Alan Carvalho de Assis acassis@gmail.com [nuttx] <nuttx@yahoogroups.com>
*
......@@ -50,6 +50,22 @@
#include "bambino-200e.h"
/****************************************************************************
* Public Types
****************************************************************************/
enum devid_e
{
DEVID0 = 0,
DEVID1
};
enum ssp_channel_e
{
SSP0 = 0,
SSP1
};
/************************************************************************************
* Public Functions
************************************************************************************/
......@@ -58,9 +74,9 @@
* Name: lpc43_boardinitialize
*
* Description:
* All LPC43xx 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.
* All LPC43xx 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.
*
************************************************************************************/
......@@ -70,5 +86,68 @@ void lpc43_boardinitialize(void)
#ifdef CONFIG_ARCH_LEDS
board_autoled_initialize();
#endif
/* Configure SSP chip selects if 1) Any SSP channel is not disabled, and 2) the
* weak function lpc43_sspdev_initialize() has been brought into the link.
*/
#if defined(CONFIG_LPC43_SSP0) || defined(CONFIG_LPC43_SSP1)
if (lpc43_sspdev_initialize)
{
lpc43_sspdev_initialize();
}
#endif
}
/****************************************************************************
* Name: board_initialize
*
* Description:
* If CONFIG_BOARD_INITIALIZE is selected, then an additional
* initialization call will be performed in the boot-up sequence to a
* function called board_initialize(). board_initialize() will be
* called immediately after up_initialize() is called and just before the
* initial application is started. This additional initialization phase
* may be used, for example, to initialize board-specific device drivers.
*
****************************************************************************/
#ifdef CONFIG_BOARD_INITIALIZE
void board_initialize(void)
{
/* Configure max31855 driver for SSP0 or SSP1 */
#if defined(CONFIG_SENSORS_MAX31855)
int ret;
#if defined(CONFIG_LPC43_SSP0)
ret = lpc43_max31855initialize("/dev/temp0", SSP0, DEVID0);
if (ret < 0)
{
serr("ERROR: lpc43_max31855initialize failed: %d\n", ret);
}
ret = lpc43_max31855initialize("/dev/temp1", SSP0, DEVID1);
if (ret < 0)
{
serr("ERROR: lpc43_max31855initialize failed: %d\n", ret);
}
#endif
#if defined(CONFIG_LPC43_SSP1)
ret = lpc43_max31855initialize("/dev/temp2", SSP1, DEVID0);
if (ret < 0)
{
serr("ERROR: lpc43_max31855initialize failed: %d\n", ret);
}
ret = lpc43_max31855initialize("/dev/temp3", SSP1, DEVID1);
if (ret < 0)
{
serr("ERROR: lpc43_max31855initialize failed: %d\n", ret);
}
#endif
#endif
}
#endif
/****************************************************************************
* configs/freedom-kl25z/include/kl_cc300.h
/************************************************************************************
* configs/bambino-200e/src/lpc43_max31855.c
*
* Copyright (C) 2013 Alan Carvalho de Assis
* Copyright (C) 2015 Alan Carvalho de Assis. All rights reserved.
* Author: Alan Carvalho de Assis <acassis@gmail.com>
* with adaptions from Gregory Nutt <gnutt@nuttx.org>
*
* Reference: https://community.freescale.com/community/
* the-embedded-beat/blog/2012/10/15/
* using-the-touch-interface-on-the-freescale-freedom-development-platform
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
......@@ -36,47 +31,73 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
#ifndef __CONFIGS_FREEDOM_KL25Z_INCLUDE_KL_CC3000_H
#define __CONFIGS_FREEDOM_KL25Z_INCLUDE_KL_CC3000_H 1
************************************************************************************/
/****************************************************************************
/************************************************************************************
* Included Files
****************************************************************************/
#include <stdio.h>
#include <stdint.h>
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
long ReadWlanInterruptPin(void);
/* Enable WiFi Interrupt */
************************************************************************************/
void WlanInterruptEnable(void);
#include <nuttx/config.h>
/* Disable WiFi Interrupt */
#include <errno.h>
#include <debug.h>
#include <string.h>
void WlanInterruptDisable(void);
#include <nuttx/sensors/max31855.h>
/* Enable/Disable WiFi */
#include "bambino-200e.h"
void WriteWlanEnablePin(uint8_t val);
#include <nuttx/spi/spi.h>
/* Assert CC3000 CS */
void AssertWlanCS(void);
#include "lpc43_spi.h"
#include "lpc43_ssp.h"
/* Deassert CC3000 CS */
#include <nuttx/kmalloc.h>
#include <nuttx/fs/fs.h>
#include <nuttx/random.h>
void DeassertWlanCS(void);
#if defined(CONFIG_SPI) && defined(CONFIG_SENSORS_MAX31855)
/* Setup needed pins */
void Wlan_Setup(void);
#endif /* __CONFIGS_FREEDOM_KL25Z_INCLUDE_KL_CC3000_H */
/************************************************************************************
* Public Functions
************************************************************************************/
/************************************************************************************
* Name: lpc43_max31855initialize
*
* Description:
* Initialize and register the MAX31855 Temperature Sensor driver.
*
* Input parameters:
* devpath - The full path to the driver to register. E.g., "/dev/temp0"
* spi - An instance of the SPI interface to use to communicate with
* MAX31855
* devid - Minor device number. E.g., 0, 1, 2, etc.
* Returned Value:
* Zero (OK) on success; a negated errno value on failure.
*
************************************************************************************/
int lpc43_max31855initialize(FAR const char *devpath, int bus, uint16_t devid)
{
FAR struct spi_dev_s *spi;
spi = lpc43_sspbus_initialize(bus);
if (!spi)
{
snerr("ERROR: Failed to initialize SSP%d\n", bus);
return -ENODEV;
}
/* Then register the temperature sensor */
int ret = max31855_register(devpath, spi, devid);
if (ret < 0)
{
snerr("ERROR: Error registering MAX31855\n");
}
return ret;
}
#endif /* CONFIG_SPI && CONFIG_SENSORS_MAX31855 */
/************************************************************************************
* configs/spark/src/stm32_usbdev.c
* configs/bambino-200e/src/lpc43_ssp.c
*
* Copyright (C) 2009-2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
* Librae <librae8226@gmail.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
......@@ -40,78 +39,147 @@
#include <nuttx/config.h>
#include <sys/types.h>
#include <stdint.h>
#include <stdbool.h>
#include <errno.h>
#include <debug.h>
#include <string.h>
#include <nuttx/usb/usbdev.h>
#include <nuttx/usb/usbdev_trace.h>
#include "lpc43_spi.h"
#include "lpc43_ssp.h"
#include "up_arch.h"
#include "stm32.h"
#include "spark.h"
#include <nuttx/spi/spi.h>
#include <arch/board/board.h>
/************************************************************************************
* Pre-processor Definitions
************************************************************************************/
#include "bambino-200e.h"
/************************************************************************************
* Private Functions
************************************************************************************/
#include <nuttx/kmalloc.h>
#include <nuttx/fs/fs.h>
#include <nuttx/random.h>
/************************************************************************************
* Public Functions
************************************************************************************/
/****************************************************************************
* Name: lpc43_sspdev_initialize
*
* Description:
* Called to configure SPI chip select GPIO pins for the Bambino-200e board.
*
****************************************************************************/
void weak_function lpc43_sspdev_initialize(void)
{
#ifdef CONFIG_SENSORS_MAX31855
lpc43_pin_config(PINCONFIG_MAX31855_CS1);
int ret = lpc43_gpio_config(GPIO_MAX31855_CS1);
if (ret < 0)
{
snerr("ERROR: Error configuring chip select GPIO pin\n");
}
lpc43_pin_config(PINCONFIG_MAX31855_CS2);
ret = lpc43_gpio_config(GPIO_MAX31855_CS2);
if (ret < 0)
{
snerr("ERROR: Error configuring chip select GPIO pin\n")
}
#endif
}
/************************************************************************************
* Name: stm32_usbinitialize
* Name: lpc43_ssp0select
*
* Description:
* Called to setup USB-related GPIO pins.
* Perform chip selection using GPIO pins, controlling data flow in SSP0 channel.
*
* Input parameters:
* devpath - The full path to the driver. E.g., "/dev/temp0"
* devid - Minor device number. E.g., 0, 1, 2, etc.
* selected - Logical state of the pin
*
************************************************************************************/
void stm32_usbinitialize(void)
void lpc43_ssp0select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
{
uinfo("called\n");
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
#if defined(CONFIG_SENSORS_MAX31855)
if (devid == SPIDEV_TEMPERATURE(0))
{
lpc43_gpio_write(GPIO_MAX31855_CS1, !selected);
}
if (devid == SPIDEV_TEMPERATURE(1))
{
lpc43_gpio_write(GPIO_MAX31855_CS2, !selected);
}
#endif
}
/* USB Soft Connect Pullup */
/************************************************************************************
* Name: lpc43_ssp0status
*
* Description:
* Perform status operations in SSP0 channel, using GPIO pins.
*
* Input parameters:
* devpath - The full path to the driver. E.g., "/dev/temp0"
* devid - Minor device number. E.g., 0, 1, 2, etc.
*
* Returned Value:
* Zero
************************************************************************************/
stm32_configgpio(GPIO_USB_PULLUP);
uint8_t lpc43_ssp0status(FAR struct spi_dev_s *dev, uint32_t devid)
{
return 0;
}
/************************************************************************************
* Name: stm32_usbpullup
* Name: lpc43_ssp1select
*
* 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.
* Perform chip selection using GPIO pins, controlling data flow in SSP1 channel.
*
* Input parameters:
* devpath - The full path to the driver. E.g., "/dev/temp0"
* devid - Minor device number. E.g., 0, 1, 2, etc.
* selected - Logical state of the pin
*
************************************************************************************/
int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable)
void lpc43_ssp1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
{
usbtrace(TRACE_DEVPULLUP, (uint16_t)enable);
stm32_gpiowrite(GPIO_USB_PULLUP, !enable);
return OK;
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
#if defined(CONFIG_SENSORS_MAX31855)
if (devid == SPIDEV_TEMPERATURE(0))
{
lpc43_gpio_write(GPIO_MAX31855_CS1, !selected);
}
if (devid == SPIDEV_TEMPERATURE(1))
{
lpc43_gpio_write(GPIO_MAX31855_CS2, !selected);
}
#endif
}
/************************************************************************************
* Name: stm32_usbsuspend
* Name: lpc43_ssp1status
*
* 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.
* Perform status operations in SSP1 channel, using GPIO pins.
*
* Input parameters:
* devpath - The full path to the driver. E.g., "/dev/temp0"
* devid - Minor device number. E.g., 0, 1, 2, etc.
*
* Returned Value:
* Zero
************************************************************************************/
void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume)
uint8_t lpc43_ssp1status(FAR struct spi_dev_s *dev, uint32_t devid)
{
uinfo("resume: %d\n", resume);
return 0;
}
README
======
This is the README file for the port of NuttX to the TI CC3200 Launchpad.
OpenOCD for Windows
===================
Get the CC3200 SDK
------------------
Get this from the TI web site. Also get "CC3200 SimpleLink™ Wi-Fi® and
IoT Solution With MCU LaunchPad™ Getting Started Guide" (SWRU376A)
Get OpenOCD
------------
The OpenOCD project is here: http://openocd.sourceforge.net/
I use the pre-built binaries provided by Freddie Chopin that can b
downloaded here: http://www.freddiechopin.info/
I used version 0.8.0 which available here:
http://www.freddiechopin.info/en/articles/34-news/92-openocd-w-wersji-080
Other versions are available here:
http://www.freddiechopin.info/en/download/category/4-openocd
Get Zadig
---------
Unless you are very clever with Windows drivers, then I also recommend
that you download and install Zadig: http://zadig.akeo.ie/
Other Stuff
-----------
USB Cable, your favorite serial terminal program, NuttX build with
one of the CC3200 configurations in this diretory.
Installing
----------
Install the TI CC3200 SDK and OpenOCD. Zadig is just an binary so there
is no installation. Plug in the CC3200 via the USB cable. You should see
two new devices in the Windows Device Manager, both called:
USB <-> JTAG/SWD
There will be indications on the driver icon that no driver is installed.
Follow the instructions in the paragraph "Install USB Driver" to install
the TI USB drivers. You need to do this twice, once for each device. Now
you will have two devices with different names:
CC3200CP JTAG Port A, and
CC3200CP UART Port B
OpenOCD cannot use the TI JTAG drivers. So we need to replace that port
(ONLY) with the libusb driver. Use Zadig to install the libusb driver
replacing the TI driver for "CC3200CP JTAG Port A". Now you should have
the following under "Ports (COM & LPT)":
CC3200 UART Port B
And under "Universal Serial Bus Devices", again:
USB <-> JTAG/SWD
But this time without the indication that a driver is needed.
Starting OpenOCD
----------------
These instructions assume that (1) you are using a terminal with a Bash
shell under Cygwin, (2) that you installed OpenOCD at C:\openocd-0.8.0,
and (3) you are using a 64-bit windows version. You will need to make
minor changes if any of these are not true.
The script to use with OpenOCD 0.8.0 is provided in
nuttx/configs/cc3200-launchpad/tools. Go there and start OpenOCd as
follow:
$ cd configs/cc3200-launchpad/tools
$ /cygdrive/c/openocd-0.8.0/bin-x64/openocd-x64-0.8.0.exe --file cc3200.cfg
And you should see something like:
Open On-Chip Debugger 0.8.0 (2014-04-28-08:42)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
adapter speed: 1000 kHz
Info : clock speed 1000 kHz
Info : JTAG tap: cc3200.jrc tap/device found: 0x0b97c02f (mfg: 0x017, part: 0xb97c, ver: 0x0)
Info : JTAG tap: cc3200.dap enabled
Info : cc3200.cpu: hardware has 6 breakpoints, 4 watchpoints
Open the Serial Terminal
------------------------
Connect the CC3200 board via the USB cabale. Open the serial terminal
program using the libusb COM device. For me this is usually COM6 but
could be anything. If you are unsure, remove the CC3200 and see which
one goes away.
The serial interface should be configured 115200 8N1.
Using GDB
---------
Start GDB and connect to OpenOCD:
$ arm-none-eabi-gdb
(gdb) target remote localhost:3333
Load and start the NuttX ELF file (nuttx):
(gdb) mon reset halt
(gdb) load nuttx
(gdb) cont
(gdb)
After entering cont(inue), you should see the NSH prompt in the serial
terminal window:
C3200 init
NuttShell (NSH)
nsh>
/************************************************************************************
* configs/cc3200/include/board.h
* include/arch/board/board.h
*
* Copyright (C) 2010 Gregory Nutt. All rights reserved.
* Authors: Gregory Nutt <gnutt@nuttx.org>
* Jim Ewing <jim@droidifi.com>
*
* 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_CC3200_LAUNCHPAD_INCLUDE_BOARD_H
#define __CONFIGS_CC3200_LAUNCHPAD_INCLUDE_BOARD_H
/************************************************************************************
* Included Files
************************************************************************************/
/************************************************************************************
* Pre-processor Definitions
************************************************************************************/
/* Clocking *************************************************************************/
/* RCC settings. Crystal on-board the CC3200 LaunchPad include:
*
* 40MHz internal clock
* 32.768kHz RTC clock
*/
#define SYSCON_RCC_XTAL SYSCON_RCC_XTAL40000KHZ /* On-board crystal is 40 MHz */
#define XTAL_FREQUENCY 40000000
/* Oscillator source is the main oscillator */
#define SYSCON_RCC_OSCSRC SYSCON_RCC_OSCSRC_MOSC
#define SYSCON_RCC2_OSCSRC SYSCON_RCC2_OSCSRC2_MOSC
#define OSCSRC_FREQUENCY XTAL_FREQUENCY
#define TIVA_SYSDIV 5
#define SYSCLK_FREQUENCY 80000000 /* 80MHz */
/* Other RCC settings:
*
* - Main and internal oscillators enabled.
* - PLL and sys dividers not bypassed
* - PLL not powered down
* - No auto-clock gating reset
*/
#define TIVA_RCC_VALUE (SYSCON_RCC_OSCSRC | SYSCON_RCC_XTAL | \
SYSCON_RCC_USESYSDIV | SYSCON_RCC_SYSDIV(TIVA_SYSDIV))
/* RCC2 settings
*
* - PLL and sys dividers not bypassed.
* - PLL not powered down
* - Not using RCC2
*
* When SYSCON_RCC2_DIV400 is not selected, SYSDIV2 is the divisor-1.
* When SYSCON_RCC2_DIV400 is selected, SYSDIV2 is the divisor-1)/2, plus
* the LSB:
*
* SYSDIV2 SYSDIV2LSB DIVISOR
* 0 N/A 2
* 1 0 3
* " 1 4
* 2 0 5
* " 1 6
* etc.
*/
#if (TIVA_SYSDIV & 1) == 0
# define TIVA_RCC2_VALUE (SYSCON_RCC2_OSCSRC | SYSCON_RCC2_SYSDIV2LSB | \
SYSCON_RCC2_SYSDIV_DIV400(TIVA_SYSDIV) | \
SYSCON_RCC2_DIV400 | SYSCON_RCC2_USERCC2)
#else
# define TIVA_RCC2_VALUE (SYSCON_RCC2_OSCSRC | SYSCON_RCC2_SYSDIV_DIV400(TIVA_SYSDIV) | \
SYSCON_RCC2_DIV400 | SYSCON_RCC2_USERCC2)
#endif
/* LED definitions ******************************************************************/
/* The CC3200 LaunchPad has three RGB LEDs.
*
* BOARD_LED_R -- Connected to PF1
* BOARD_LED_G -- Connected to PF3
* BOARD_LED_Y -- Connected to PF2
*/
/* LED index values for use with board_userled() */
#define BOARD_LED_R 1
#define BOARD_LED_G 2
#define BOARD_LED_Y 3
#define BOARD_NLEDS 3
/* LED bits for use with board_userled_all() */
#define BOARD_LED1_BIT (1 << BOARD_LED1)
#define BOARD_LED2_BIT (1 << BOARD_LED2)
/* If CONFIG_ARCH_LEDS is defined, then automated support for the LaunchPad LEDs
* will be included in the build:
*
* OFF:
* - OFF means that the OS is still initializing. Initialization is very fast so
* if you see this at all, it probably means that the system is hanging up
* somewhere in the initialization phases.
*
* GREEN
* - This means that the OS completed initialization.
*
* BLUE:
* - Whenever and interrupt or signal handler is entered, the BLUE LED is
* illuminated and extinguished when the interrupt or signal handler exits.
*
* RED:
* - If a recovered assertion occurs, the RED LED will be illuminated
* briefly while the assertion is handled. You will probably never see this.
*
* Flashing RED:
* - In the event of a fatal crash,
* extinguished and the RED component will FLASH at a 2Hz rate.
*/
/* RED GREEN BLUE */
#define LED_STARTED 0 /* OFF OFF OFF */
#define LED_HEAPALLOCATE 0 /* OFF OFF OFF */
#define LED_IRQSENABLED 0 /* OFF OFF OFF */
#define LED_STACKCREATED 1 /* OFF ON OFF */
#define LED_INIRQ 2 /* NC NC ON (momentary) */
#define LED_SIGNAL 2 /* NC NC ON (momentary) */
#define LED_ASSERTION 3 /* ON NC NC (momentary) */
#define LED_PANIC 4 /* ON OFF OFF (flashing 2Hz) */
/* LED definitions ******************************************************************/
/* The CC3200 LaunchPad has two buttons:
*
* BOARD_SW1 -- Connected to PF4
* BOARD_SW2 -- Connected to PF0
*/
#define BUTTON_SW1 0
#define BUTTON_SW2 1
#define BUTTON_SW3 2
#define NUM_BUTTONS 3
#define BUTTON_SW1_BIT (1 << BUTTON_SW1)
#define BUTTON_SW2_BIT (1 << BUTTON_SW2)
#define BUTTON_SW3_BIT (1 << BUTTON_SW3)
#endif /* __CONFIGS_CC3200_LAUNCHPAD_INCLUDE_BOARD_H */
/************************************************************************************
* configs/cc3200/include/cc3200_util.h
*
* Copyright (C) 2014 Droidifi LLC. All rights reserved.
* Author: Jim Ewing <jim@droidifi.com>
*
* Adapted from code Copyright (C) 2014 Texas Instruments Incorporated
*
* 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.
*
* 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_CC3200_INCLUDE_UTILS_H
#define __CONFIGS_CC3200_INCLUDE_UTILS_H 1
/************************************************************************************
* Pre-processor Definitions
************************************************************************************/
#define CONSOLE_BAUD_RATE 115200
#define PAD_CONFIG_BASE 0x4402E0A0
#define PIN_TYPE_STD 0x00000000
#define PIN_STRENGTH_2MA 0x00000020
#define PAD_MODE_MASK 0x0000000F
#define PAD_STRENGTH_MASK 0x000000E0
#define PAD_TYPE_MASK 0x00000310
#define PIN_MODE_0 0x00000000
#define PIN_MODE_1 0x00000001
#define PIN_MODE_2 0x00000002
#define PIN_MODE_3 0x00000003
#define PIN_MODE_4 0x00000004
#define PIN_MODE_5 0x00000005
#define PIN_MODE_6 0x00000006
#define PIN_MODE_7 0x00000007
#define PIN_MODE_8 0x00000008
#define PIN_MODE_9 0x00000009
#define PIN_MODE_10 0x0000000A
#define PIN_MODE_11 0x0000000B
#define PIN_MODE_12 0x0000000C
#define PIN_MODE_13 0x0000000D
#define PIN_MODE_14 0x0000000E
#define PIN_MODE_15 0x0000000F
#define PIN_STRENGTH_2MA 0x00000020
#define PIN_STRENGTH_4MA 0x00000040
#define PIN_STRENGTH_6MA 0x00000060
#define PIN_TYPE_STD 0x00000000
#define PIN_TYPE_STD_PU 0x00000100
#define PIN_TYPE_STD_PD 0x00000200
#define PIN_TYPE_OD 0x00000010
#define PIN_TYPE_OD_PU 0x00000110
#define PIN_TYPE_OD_PD 0x00000210
#define PIN_TYPE_ANALOG 0x10000000
#define PIN_01 0x00000000
#define PIN_02 0x00000001
#define PIN_03 0x00000002
#define PIN_04 0x00000003
#define PIN_05 0x00000004
#define PIN_06 0x00000005
#define PIN_07 0x00000006
#define PIN_08 0x00000007
#define PIN_11 0x0000000A
#define PIN_12 0x0000000B
#define PIN_13 0x0000000C
#define PIN_14 0x0000000D
#define PIN_15 0x0000000E
#define PIN_16 0x0000000F
#define PIN_17 0x00000010
#define PIN_18 0x00000011
#define PIN_19 0x00000012
#define PIN_20 0x00000013
#define PIN_21 0x00000014
#define PIN_45 0x0000002C
#define PIN_46 0x0000002D
#define PIN_47 0x0000002E
#define PIN_48 0x0000002F
#define PIN_49 0x00000030
#define PIN_50 0x00000031
#define PIN_52 0x00000033
#define PIN_53 0x00000034
#define PIN_55 0x00000036
#define PIN_56 0x00000037
#define PIN_57 0x00000038
#define PIN_58 0x00000039
#define PIN_59 0x0000003A
#define PIN_60 0x0000003B
#define PIN_61 0x0000003C
#define PIN_62 0x0000003D
#define PIN_63 0x0000003E
#define PIN_64 0x0000003F
#define GPIO_O_GPIO_DATA 0x00000000
#define GPIO_O_GPIO_DIR 0x00000400
#define GPIO_DIR_MODE_OUT 0x00000001
#define GPIO_DIR_MODE_IN 0x00000000
/************************************************************************************
* Public Functions
************************************************************************************/
void cc3200_print(char* str);
void cc3200_pin_config_set(uint32_t pin, uint32_t pin_strength, uint32_t pin_type);
void cc3200_pin_mode_set(uint32_t pin, uint32_t pin_mode);
void cc3200_pin_type_uart(uint32_t pin, uint32_t pin_mode);
void cc3200_get_gpio_port_pin(uint8_t pin, uint32_t *gpio_port, uint8_t *gpio_pin);
void cc3200_set_gpio(uint8_t pin, uint32_t gpio_port, uint8_t gpio_pin, uint8_t gpio_val);
void cc3200_set_gpio_dir(uint32_t port, uint8_t pins, uint32_t pin_io);
void cc3200_pin_type_gpio(uint32_t pin, uint32_t pin_mode, uint32_t open_drain);
#endif /* __CONFIGS_CC3200_INCLUDE_UTILS_H */
# CONFIG_ARCH_FPU is not set
CONFIG_ARCH_BOARD_CC3200_LAUNCHPAD=y
CONFIG_ARCH_BOARD="cc3200-launchpad"
CONFIG_ARCH_CHIP_CC3200=y
CONFIG_ARCH_CHIP_TIVA=y
CONFIG_ARCH_IRQPRIO=y
CONFIG_ARCH="arm"
CONFIG_ARMV7M_USEBASEPRI=y
CONFIG_BOARD_LOOPSPERMSEC=4000
CONFIG_BOOT_RUNFROMISRAM=y
CONFIG_BUILTIN_PROXY_STACKSIZE=512
CONFIG_BUILTIN=y
CONFIG_DISABLE_POLL=y
CONFIG_EXAMPLES_NSH=y
CONFIG_EXPERIMENTAL=y
CONFIG_FS_PROCFS=y
CONFIG_MAX_TASKS=8
CONFIG_MAX_WDOGPARMS=2
CONFIG_MM_REGIONS=2
CONFIG_NFILE_DESCRIPTORS=8
CONFIG_NFILE_STREAMS=8
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_FILEIOSIZE=512
CONFIG_NSH_LINELEN=64
CONFIG_NSH_READLINE=y
CONFIG_NXFLAT=y
CONFIG_PREALLOC_TIMERS=2
CONFIG_PREALLOC_WDOGS=8
CONFIG_RAM_SIZE=192000
CONFIG_RAM_START=0x20004000
CONFIG_RAW_BINARY=y
CONFIG_RR_INTERVAL=100
CONFIG_SCHED_WAITPID=y
CONFIG_START_DAY=24
CONFIG_START_MONTH=8
CONFIG_START_YEAR=2014
CONFIG_STDIO_BUFFER_SIZE=128
CONFIG_TASK_NAME_SIZE=0
CONFIG_TIVA_UART0=y
CONFIG_UART0_RXBUFSIZE=128
CONFIG_UART0_SERIAL_CONSOLE=y
CONFIG_UART0_TXBUFSIZE=128
CONFIG_USER_ENTRYPOINT="nsh_main"
CONFIG_USERMAIN_STACKSIZE=4096
CONFIG_WDOG_INTRESERVE=2
############################################################################
# configs/cc3200-launchpad/scripts/Make.defs
#
# Copyright (C) 2014, 2017 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.
#
############################################################################
include ${TOPDIR}/.config
include ${TOPDIR}/tools/Config.mk
include ${TOPDIR}/arch/arm/src/armv7-m/Toolchain.defs
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/cc3200-launchpad.ld}"
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/cc3200-launchpad.ld
endif
CC = $(CROSSDEV)gcc
CXX = $(CROSSDEV)g++
CPP = $(CROSSDEV)gcc -E
LD = $(CROSSDEV)ld
STRIP = $(CROSSDEV)strip --strip-unneeded
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 -fcheck-new
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
HOSTCC = gcc
HOSTINCLUDES = -I.
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -g -pipe
HOSTLDFLAGS =