Merged nuttx/nuttx into master

This commit is contained in:
ziggurat29 2016-05-08 16:50:19 -05:00
commit 185a138bef
20 changed files with 105 additions and 48 deletions

View file

@ -10401,7 +10401,7 @@
* arch/arm/src/efm32/efm32_rtc_burtc.c: Updated EFM32 RTC driver from
Pierre-noel Bouteville (2015-05-19).
* arch/arm/src/tiva/chip/tm4c_memorymap.h, tm4c_pinmap.h, and vectors.h.
configs/tm4c1294-launchpad/include/board.h and src/tm4c_autoleds.c:
configs/tm4c1294-launchpad/include/board.h and src/tm4c_autoleds.c:
Fixes for Tiva TM4C1294NCPDT. From Frank Sautter. (2015-05-20).
* configs/tm4c1294-launchpad/include/board.h: Added TM4C1294NCPDT
EN0_LED2 (10/100-Base-Tx); removed all booster pack pin definitions.
@ -11625,13 +11625,13 @@
* configs/nucleus2g: Removed the Nucleus2G configuration. There has
not been any activity with the commercial board in a few years and it
no longer appears to be available from the 2g-eng.com website.
Since the board is commercial and no longer publically available, it
Since the board is commercial and no longer publicly available, it
no longer qualifies for inclusion in the open source repositories.
The code as of this data is still available in the Obsoleted
repository at configs/nucleus2g (2016-04-12).
* arch/arm/src/stm32l4: Fix the STM32L4 SPI driver. That SPI driver is
quite different. They now handle frames of arbitrary size between 4
and 16 bits. It was broken before a new bit has to be set (rx fifo
and 16 bits. It was broken before a new bit has to be set (RX fifo
threshold) to handle <= 8-bit transactions. If not set, the default is
16-bit packed >=8-bit frames and the RXNE bit is never set (it is set
when 16-bits are received). weird things as always.
@ -11662,7 +11662,7 @@
* configs/stm32l476vb-disco: Add support for QSPI based N25Qxxx flash.
From Dave dev@ziggurat29.com (2016-04-18).
* graphics/vnc: Add support for a VNC server. This logic is code
complete, but untested and so not ready for primetime (2016-04-18).
complete, but untested and so not ready for prime time (2016-04-18).
* configs/samv71-xult/vnc: Add a configuration that will be used to
verify VNC (also untested) (2016-04-18).
* drivers/ioexpander: Fix an error in the PCA9555 driver: Under certain
@ -11670,8 +11670,38 @@
Lorquet (2016-04-20).
* arch/arm/src/stm32 and configs/stm32f429i-disco: Correct some bad
commits that broke the LTDC display example. From Marco Krahl
(2016-04-22).
* configs/samv71-xult/vnwwm: Add a more complex NxWM configuration
(2016-04-22).
* configs/samv71-xult/vncwwm: Add a more complex NxWM configuration
to support further VNC testing (particularly of VNC keyboard and
mouse intputs). Initial configuration is not functional (2016-04-23).
mouse inputs). Initial configuration is not functional (2016-04-23).
* arch/arm/src/stm32l4: Add support for QSPI DMA. From Dave
dev@ziggurat29.com (2016-04-24).
* configs/stm32l476vg-disco: Update stm32l4 disco board to reflect QSPI
DMA support. From Dave dev@ziggurat29.com (2016-04-24).
* arch/arm/src/stm32l4: Add configuration options to allow SRAM2 to be
used for heap, or not at all, and to zero-initialize it on OS start,
or not at all. From Dave dev@ziggurat29.com (2016-04-24).
* drivers/mtd/smart.c: Return code of smart_scan not checked, can
cause success result in failure case, leading to 'dev' pointer being
invalid. From Dave dev@ziggurat29.com (2016-04-27).
* arch/arm/src/stm32l4: Add support for QSPI memory mapped mode. From
Dave dev@ziggurat29.com (2016-04-27).
* configs/stm32l476vg-disco: Add board ioctls for allowing user
application to cause QSPI memory mapped mode to be engaged and
disengaged. Also partitioned QSPI flash for file system and other
(eventually xip). From Dave dev@ziggurat29.com (2016-04-27).
* fs/mount: Fix a backward debug assertion. Noted by David Sidrane
(2016-04-29).
* arch/arm/src/stm32l4: Add support for HSE and MSI clocks, and auto
trim of MSI to LSE (needed for USB). From Dave dev@ziggurat29.com
(2016-04-29).
* arch/arm/src/stm32l4: Add support for unique id function to arch;
modified board to support unique id boardctl. From Dave
dev@ziggurat29.com (2016-05-03).
* Makefile.unix and tools/mkexport.sh: Pass top-level make to the
script to allow -j greater than 1. From David Sidrane (2016-05-04).
* arch/arm/src/stm32, sm32f7, stm32l4: Fix typo in variable name in
serial BREAK logic. Review other serial implementations for similar
naming problems. (2016-05-05).
* arch/arm/src/samv7: Fix typo in MATRIX register definitions. From
Stefan Kolb (2016-05-06).

View file

@ -507,7 +507,7 @@ gconfig: apps_preconfig
# that the archiver is 'ar'
export: pass2deps
$(Q) $(MKEXPORT) $(MKEXPORT_ARGS) -l "$(EXPORTLIBS)"
$(Q) MAKE=${MAKE} $(MKEXPORT) $(MKEXPORT_ARGS) -l "$(EXPORTLIBS)"
# General housekeeping targets: dependencies, cleaning, etc.
#

View file

@ -268,6 +268,7 @@ static inline void up_waittxready(struct up_dev_s *priv)
static inline void up_enablebreaks(struct up_dev_s *priv, bool enable)
{
uint16_t lcr = up_serialin(priv, UART_LCR);
if (enable)
{
lcr |= UART_LCR_BOC;
@ -276,6 +277,7 @@ static inline void up_enablebreaks(struct up_dev_s *priv, bool enable)
{
lcr &= ~UART_LCR_BOC;
}
up_serialout(priv, UART_LCR, lcr);
}

View file

@ -272,6 +272,7 @@ static inline void up_waittxready(struct up_dev_s *priv)
static inline void up_enablebreaks(struct up_dev_s *priv, bool enable)
{
uint8_t lcr = up_serialin(priv, LPC214X_UART_LCR_OFFSET);
if (enable)
{
lcr |= LPC214X_LCR_BREAK_ENABLE;
@ -280,6 +281,7 @@ static inline void up_enablebreaks(struct up_dev_s *priv, bool enable)
{
lcr &= ~LPC214X_LCR_BREAK_ENABLE;
}
up_serialout(priv, LPC214X_UART_LCR_OFFSET, lcr);
}

View file

@ -290,6 +290,7 @@ static inline void up_waittxready(struct up_dev_s *priv)
static inline void up_enablebreaks(struct up_dev_s *priv, bool enable)
{
uint8_t lcr = up_serialin(priv, UART_LCR_OFFSET);
if (enable)
{
lcr |= LCR_BREAK_ENABLE;
@ -298,6 +299,7 @@ static inline void up_enablebreaks(struct up_dev_s *priv, bool enable)
{
lcr &= ~LCR_BREAK_ENABLE;
}
up_serialout(priv, UART_LCR_OFFSET, lcr);
}

View file

@ -551,6 +551,7 @@ static inline void up_restoreuartint(struct up_dev_s *priv, uint32_t ier)
static inline void up_enablebreaks(struct up_dev_s *priv, bool enable)
{
uint32_t lcr = up_serialin(priv, LPC43_UART_LCR_OFFSET);
if (enable)
{
lcr |= UART_LCR_BRK;
@ -559,6 +560,7 @@ static inline void up_enablebreaks(struct up_dev_s *priv, bool enable)
{
lcr &= ~UART_LCR_BRK;
}
up_serialout(priv, LPC43_UART_LCR_OFFSET, lcr);
}

View file

@ -101,7 +101,7 @@
/* 0x006c8-0x00fc: Reserved */
#define SAM_MATRIX_MRCR_OFFSET 0x0100 /* Master Remap Control Register */
/* 0x0104-0x010c: Reserved */
#define SAM_MATRIX_CAN0_OFFSET 0x0100 /* Master Remap Control Register */
#define SAM_MATRIX_CAN0_OFFSET 0x0110 /* CAN0 Configuration Register */
#define SAM_MATRIX_CCFG_SYSIO_OFFSET 0x0114 /* System I/O Configuration Register */
/* 0x0118-0x0120: Reserved */
#define SAM_MATRIX_CCFG_SMCNFCS_OFFSET 0x0124 /* SMC Chip Select NAND Flash Assignment Register */

View file

@ -2060,8 +2060,11 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg)
#ifdef CONFIG_USART_BREAKS
case TIOCSBRK: /* BSD compatibility: Turn break on, unconditionally */
{
irqstate_t flags = enter_critical_section();
uint32_t cr2 = up_serialin(priv, STM32_USART_CR2_OFFSET);
uint32_t cr2;
irqstate_t flags;
flags = enter_critical_section();
cr2 = up_serialin(priv, STM32_USART_CR2_OFFSET);
up_serialout(priv, STM32_USART_CR2_OFFSET, cr2 | USART_CR2_LINEN);
leave_critical_section(flags);
}
@ -2069,9 +2072,11 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg)
case TIOCCBRK: /* BSD compatibility: Turn break off, unconditionally */
{
uint32_t cr2;
irqstate_t flags;
flags = enter_critical_section();
uint32_t cr1 = up_serialin(priv, STM32_USART_CR2_OFFSET);
cr2 = up_serialin(priv, STM32_USART_CR2_OFFSET);
up_serialout(priv, STM32_USART_CR2_OFFSET, cr2 & ~USART_CR2_LINEN);
leave_critical_section(flags);
}

View file

@ -1967,8 +1967,11 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg)
#ifdef CONFIG_USART_BREAKS
case TIOCSBRK: /* BSD compatibility: Turn break on, unconditionally */
{
irqstate_t flags = enter_critical_section();
uint32_t cr2 = up_serialin(priv, STM32_USART_CR2_OFFSET);
uint32_t cr2;
irqstate_t flags;
flags = enter_critical_section();
cr2 = up_serialin(priv, STM32_USART_CR2_OFFSET);
up_serialout(priv, STM32_USART_CR2_OFFSET, cr2 | USART_CR2_LINEN);
leave_critical_section(flags);
}
@ -1976,9 +1979,11 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg)
case TIOCCBRK: /* BSD compatibility: Turn break off, unconditionally */
{
uint32_t cr2;
irqstate_t flags;
flags = enter_critical_section();
uint32_t cr1 = up_serialin(priv, STM32_USART_CR2_OFFSET);
cr2 = up_serialin(priv, STM32_USART_CR2_OFFSET);
up_serialout(priv, STM32_USART_CR2_OFFSET, cr2 & ~USART_CR2_LINEN);
leave_critical_section(flags);
}

View file

@ -54,10 +54,6 @@
#include "stm32l4_gpio.h"
#include "stm32l4_exti.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************
* Private Data
****************************************************************************/
@ -66,10 +62,6 @@
static xcpt_t stm32l4_exti_callback;
/****************************************************************************
* Public Data
****************************************************************************/
/****************************************************************************
* Private Functions
****************************************************************************/

View file

@ -100,6 +100,7 @@ struct stm32l4_lowerhalf_s
/****************************************************************************
* Private Function Prototypes
****************************************************************************/
/* Prototypes for static methods in struct rtc_ops_s */
static int stm32l4_rdtime(FAR struct rtc_lowerhalf_s *lower,
@ -179,7 +180,7 @@ static void stm32l4_alarm_callback(FAR void *arg, unsigned int alarmid)
lower = (struct stm32l4_lowerhalf_s *)arg;
cbinfo = &lower->cbinfo[alarmid];
/* Sample and clear the callback information to minimize the window in
/* Sample and clear the callback information to minimize the window in
* time in which race conditions can occur.
*/
@ -195,7 +196,6 @@ static void stm32l4_alarm_callback(FAR void *arg, unsigned int alarmid)
{
cb(priv, alarmid);
}
}
#endif /* CONFIG_RTC_ALARM */
@ -298,7 +298,7 @@ static int stm32l4_settime(FAR struct rtc_lowerhalf_s *lower,
#ifdef CONFIG_RTC_ALARM
static int stm32l4_setalarm(FAR struct rtc_lowerhalf_s *lower,
FAR const struct lower_setalarm_s *alarminfo)
FAR const struct lower_setalarm_s *alarminfo)
{
FAR struct stm32l4_lowerhalf_s *priv;
FAR struct stm32l4_cbinfo_s *cbinfo;
@ -367,7 +367,7 @@ static int stm32l4_setalarm(FAR struct rtc_lowerhalf_s *lower,
#ifdef CONFIG_RTC_ALARM
static int stm32l4_setrelative(FAR struct rtc_lowerhalf_s *lower,
FAR const struct lower_setrelative_s *alarminfo)
FAR const struct lower_setrelative_s *alarminfo)
{
struct lower_setalarm_s setalarm;
struct tm time;
@ -380,7 +380,7 @@ static int stm32l4_setrelative(FAR struct rtc_lowerhalf_s *lower,
if ((alarminfo->id == RTC_ALARMA || alarminfo->id == RTC_ALARMB) &&
alarminfo->reltime > 0)
{
/* Disable preemption while we do this so that we don't have to worry
/* Disable pre-emption while we do this so that we don't have to worry
* about being suspended and working on an old time.
*/

View file

@ -112,7 +112,8 @@
(rtc_bin2bcd((tm)->tm_min) << RTC_ALRMR_MNU_SHIFT) | \
(rtc_bin2bcd((tm)->tm_hour) << RTC_ALRMR_HU_SHIFT))
/* need to ignore DATE/DOW part of alarm; rtc_reg_alrmr_bin2bcd only encodes hms */
/* Need to ignore DATE/DOW part of alarm; rtc_reg_alrmr_bin2bcd only encodes hms */
#define RTC_ALRMR_ENABLE (0x80000000)
/* Debug ****************************************************************************/
@ -995,8 +996,6 @@ int up_rtc_initialize(void)
return OK;
}
/************************************************************************************
* Name: stm32l4_rtc_getdatetime_with_subseconds
*
@ -1324,7 +1323,7 @@ int stm32l4_rtc_setalarm(FAR struct alm_setalarm_s *alminfo)
* Name: stm32l4_rtc_cancelalarm
*
* Description:
* Cancel an alaram.
* Cancel an alarm.
*
* Input Parameters:
* alarmid - Identifies the alarm to be cancelled
@ -1378,7 +1377,7 @@ int stm32l4_rtc_cancelalarm(enum alm_id_e alarmid)
break;
case RTC_ALARMB:
{
{
/* Cancel the global callback function */
g_alarmcb[alarmid].ac_cb = NULL;
@ -1405,8 +1404,8 @@ int stm32l4_rtc_cancelalarm(enum alm_id_e alarmid)
putreg32(-1, STM32L4_RTC_ALRMBR);
modifyreg32(STM32L4_RTC_ISR, RTC_ISR_ALRBF, 0);
rtc_wprlock();
ret = OK;
}
ret = OK;
}
break;
default:

View file

@ -1723,8 +1723,11 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg)
#ifdef CONFIG_USART_BREAKS
case TIOCSBRK: /* BSD compatibility: Turn break on, unconditionally */
{
irqstate_t flags = enter_critical_section();
uint32_t cr2 = up_serialin(priv, STM32L4_USART_CR2_OFFSET);
uint32_t cr2;
irqstate_t flags;
flags = enter_critical_section();
cr2 = up_serialin(priv, STM32L4_USART_CR2_OFFSET);
up_serialout(priv, STM32L4_USART_CR2_OFFSET, cr2 | USART_CR2_LINEN);
leave_critical_section(flags);
}
@ -1732,9 +1735,11 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg)
case TIOCCBRK: /* BSD compatibility: Turn break off, unconditionally */
{
uint32_t cr2;
irqstate_t flags;
flags = enter_critical_section();
uint32_t cr1 = up_serialin(priv, STM32L4_USART_CR2_OFFSET);
cr2 = up_serialin(priv, STM32L4_USART_CR2_OFFSET);
up_serialout(priv, STM32L4_USART_CR2_OFFSET, cr2 & ~USART_CR2_LINEN);
leave_critical_section(flags);
}

View file

@ -661,9 +661,9 @@ static inline void tiva_interrupt(uint32_t pinset)
{
case GPIO_INT_FALLINGEDGE:
{
isset = pin;
isclr = pin;
ibeclr = pin;
ievset = pin;
ievclr = pin;
}
break;

View file

@ -1274,7 +1274,6 @@ config BOARD_CUSTOM_LEDS
bool "Custom board LEDs"
default n
select ARCH_HAVE_LEDS
select ARCH_LEDS
config BOARD_CUSTOM_BUTTONS
bool "Custom board buttons"

View file

@ -814,7 +814,7 @@ CONFIG_HAVE_CXXINITIALIZE=y
#
CONFIG_CANUTILS_UAVCAN=y
CONFIG_UAVCAN_LIBUAVCAN_URL="https://github.com/UAVCAN/libuavcan/archive"
CONFIG_UAVCAN_LIBUAVCAN_VERSION="c152f28a620ceec9f63581a7c99fe77c89938048"
CONFIG_UAVCAN_LIBUAVCAN_VERSION="b04396ace50155573e545ed9bf2fb09964ee2367"
CONFIG_UAVCAN_DSDL_URL="https://github.com/UAVCAN/dsdl/archive"
CONFIG_UAVCAN_DSDL_VERSION="9804a3e6972825586be252ce08dd899f44994b14"
CONFIG_UAVCAN_PYUAVCAN_URL="https://github.com/UAVCAN/pyuavcan/archive"

View file

@ -843,11 +843,11 @@ CONFIG_HAVE_CXXINITIALIZE=y
#
CONFIG_CANUTILS_UAVCAN=y
CONFIG_UAVCAN_LIBUAVCAN_URL="https://github.com/UAVCAN/libuavcan/archive"
CONFIG_UAVCAN_LIBUAVCAN_VERSION="531433a3261ff1568e824c240d0f1c6ecef73be1"
CONFIG_UAVCAN_LIBUAVCAN_VERSION="b04396ace50155573e545ed9bf2fb09964ee2367"
CONFIG_UAVCAN_DSDL_URL="https://github.com/UAVCAN/dsdl/archive"
CONFIG_UAVCAN_DSDL_VERSION="9804a3e6972825586be252ce08dd899f44994b14"
CONFIG_UAVCAN_PYUAVCAN_URL="https://github.com/UAVCAN/pyuavcan/archive"
CONFIG_UAVCAN_PYUAVCAN_VERSION="4e2798ec3da8e8493b769da514f3b96eea5773e2"
CONFIG_UAVCAN_PYUAVCAN_VERSION="c58477a644d20ccf95a20c151f3a0402f271c3b8"
CONFIG_UAVCAN_STM32_NUM_IFACES=1
# CONFIG_UAVCAN_STM32_TIM2 is not set
# CONFIG_UAVCAN_STM32_TIM3 is not set

View file

@ -520,6 +520,7 @@ static inline void u16550_restoreuartint(FAR struct u16550_s *priv, uint32_t ier
static inline void u16550_enablebreaks(FAR struct u16550_s *priv, bool enable)
{
uint32_t lcr = u16550_serialin(priv, UART_LCR_OFFSET);
if (enable)
{
lcr |= UART_LCR_BRK;
@ -528,6 +529,7 @@ static inline void u16550_enablebreaks(FAR struct u16550_s *priv, bool enable)
{
lcr &= ~UART_LCR_BRK;
}
u16550_serialout(priv, UART_LCR_OFFSET, lcr);
}

View file

@ -135,6 +135,12 @@ mkexport.sh and Makefile.export
Makefile.export is used only by the mkexport.sh script to parse out
options from the top-level Make.defs file.
USAGE: tools/mkexport.sh [-d] [-z] [-u] [-w|wy|wn] -t <top-dir> [-x <lib-ext>] -l "lib1 [lib2 [lib3 ...]]"
Thais script also depends on the environment variable MAKE which is set
in the top-level Makefile before starting mkexport.sh. If MAKE is not
defined, the script will set it to `which make`.
mkfsdata.pl
-----------

View file

@ -1,7 +1,7 @@
#!/bin/bash
# tools/mkexport.sh
#
# Copyright (C) 2011-2012, 2014 Gregory Nutt. All rights reserved.
# Copyright (C) 2011-2012, 2014, 2016 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
@ -115,6 +115,12 @@ if [ ! -f "${TOPDIR}/.version" ]; then
exit 1
fi
# Check if the make environment variable has been defined
if [ -z "${MAKE}" ]; then
MAKE=`which make`
fi
# Get the version string
source "${TOPDIR}/.version"
@ -162,7 +168,7 @@ grep -v "WINTOOL[ \t]*=[ \t]y" "${TOPDIR}/Make.defs" > "${EXPORTDIR}/Make.defs"
# Extract information from the Make.defs file. A Makefile can do this best
make -C "${TOPDIR}/tools" -f Makefile.export TOPDIR="${TOPDIR}" EXPORTDIR="${EXPORTDIR}"
${MAKE} -C "${TOPDIR}/tools" -f Makefile.export TOPDIR="${TOPDIR}" EXPORTDIR="${EXPORTDIR}"
source "${EXPORTDIR}/makeinfo.sh"
rm -f "${EXPORTDIR}/makeinfo.sh"
rm -f "${EXPORTDIR}/Make.defs"
@ -236,7 +242,7 @@ cp -LR -p "${TOPDIR}/include" "${EXPORTDIR}/." || \
# Copy the startup object file(s)
make -C ${ARCHDIR} export_startup TOPDIR=${TOPDIR} EXPORT_DIR="${EXPORTDIR}"
${MAKE} -C ${ARCHDIR} export_startup TOPDIR=${TOPDIR} EXPORT_DIR="${EXPORTDIR}"
# Copy architecture-specific header files into the arch export sub-directory.
# This is tricky because each architecture does things in a little different