diff --git a/Documentation/README.html b/Documentation/README.html
index 8cc093715d4..2fb8e115e19 100644
--- a/Documentation/README.html
+++ b/Documentation/README.html
@@ -8,7 +8,7 @@
NuttX README Files
- Last Updated: April 8, 2017
+ Last Updated: April 15, 2017
|
@@ -161,8 +161,14 @@ nuttx/
| | `- README.txt
| |- nucleo-144/
| | `- README.txt
+ | |- nucleo-f303re/
+ | | `- README.txt
+ | |- nucleo-f334r8/
+ | | `- README.txt
| |- nucleo-f4x1re/
| | `- README.txt
+ | |- nucleo-l476rg/
+ | | `- README.txt
| |- nutiny-nuc120/
| | `- README.txt
| |- olimex-efm32g880f129-stk/
diff --git a/README.txt b/README.txt
index af17a2334dd..fc318715b38 100644
--- a/README.txt
+++ b/README.txt
@@ -1548,8 +1548,14 @@ nuttx/
| | `- README.txt
| |- nucleo-144/
| | `- README.txt
+ | |- nucleo-f303re/
+ | | `- README.txt
+ | |- nucleo-f334r8/
+ | | `- README.txt
| |- nucleo-f4x1re/
| | `- README.txt
+ | |- nucleo-l476rg/
+ | | `- README.txt
| |- nutiny-nuc120/
| | `- README.txt
| |- olimex-efm32g880f129-stk/
diff --git a/TODO b/TODO
index 93db26ced47..b85d4803354 100644
--- a/TODO
+++ b/TODO
@@ -1,4 +1,4 @@
-NuttX TODO List (Last updated April 12, 2017)
+NuttX TODO List (Last updated April 15, 2017)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This file summarizes known NuttX bugs, limitations, inconsistencies with
@@ -19,7 +19,7 @@ nuttx/:
(8) Kernel/Protected Build
(3) C++ Support
(6) Binary loaders (binfmt/)
- (14) Network (net/, drivers/net)
+ (15) Network (net/, drivers/net)
(4) USB (drivers/usbdev, drivers/usbhost)
(0) Other drivers (drivers/)
(12) Libraries (libc/, libm/)
@@ -1145,6 +1145,20 @@ o Network (net/, drivers/net)
Status: Open
Priority: Low. Really just as aesthetic maintainability issue.
+ Title: BROADCAST WITH MULTIPLE NETWORK INTERFACES
+ Description: There is currently no mechanism to send a broadcast packet
+ out through several network interfaces. Currently packets
+ can be sent to only one device. Logic in netdev_findby_ipvXaddr()
+ currently just selects the first device in the list of
+ devices; only that device will receive broadcast packets.
+ Status: Open
+ Priority: High if you require broadcast on multiple networks. There is
+ no simple solution known at this time, however. Perhaps
+ netdev_findby_ipvXaddr() should return a list of devices rather
+ than a single device? All upstream logic would then have to
+ deal with a list of devices. That would be a huge effect and
+ certainly doesn't dount as a "simple solution".
+
o USB (drivers/usbdev, drivers/usbhost)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 228472890ed..b7ccb129b32 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -232,6 +232,13 @@ config ARCH_CHIP_STM32
---help---
STMicro STM32 architectures (ARM Cortex-M3/4).
+config ARCH_CHIP_STM32F0
+ bool "STMicro STM32 F0"
+ select ARCH_CORTEXM0
+ select ARCH_HAVE_CMNVECTOR
+ ---help---
+ STMicro STM32 architectures (ARM Cortex-M0).
+
config ARCH_CHIP_STM32F7
bool "STMicro STM32 F7"
select ARCH_HAVE_CMNVECTOR
@@ -441,6 +448,7 @@ config ARCH_CHIP
default "sam34" if ARCH_CHIP_SAM34
default "samv7" if ARCH_CHIP_SAMV7
default "stm32" if ARCH_CHIP_STM32
+ default "stm32f0" if ARCH_CHIP_STM32F0
default "stm32f7" if ARCH_CHIP_STM32F7
default "stm32l4" if ARCH_CHIP_STM32L4
default "str71x" if ARCH_CHIP_STR71X
@@ -697,6 +705,9 @@ endif
if ARCH_CHIP_STM32
source arch/arm/src/stm32/Kconfig
endif
+if ARCH_CHIP_STM32F0
+source arch/arm/src/stm32f0/Kconfig
+endif
if ARCH_CHIP_STM32F7
source arch/arm/src/stm32f7/Kconfig
endif
diff --git a/arch/arm/src/stm32f0/chip/stm32f0_pinmap.h b/arch/arm/src/stm32f0/chip/stm32f0_pinmap.h
new file mode 100644
index 00000000000..a586cbdbc73
--- /dev/null
+++ b/arch/arm/src/stm32f0/chip/stm32f0_pinmap.h
@@ -0,0 +1,53 @@
+/************************************************************************************
+ * arch/arm/src/stm32f0/chip/stm32f0_pinmap.h
+ *
+ * Copyright (C) 2015 Sebastien Lorquet. All rights reserved.
+ * Author: Sebastien Lorquet
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ************************************************************************************/
+
+#ifndef __ARCH_ARM_SRC_STM32F0_CHIP_STM32F0_PINMAP_H
+#define __ARCH_ARM_SRC_STM32F0_CHIP_STM32F0_PINMAP_H
+
+/************************************************************************************
+ * Included Files
+ ************************************************************************************/
+
+#include
+#include "chip.h"
+
+#if defined(CONFIG_STM32F0_STM32F05X)
+# include "chip/stm32f05xr_pinmap.h"
+#else
+# error "Unsupported STM32F0 pin map"
+#endif
+
+#endif /* __ARCH_ARM_SRC_STM32F0_CHIP_STM32F0_PINMAP_H */
+
diff --git a/arch/arm/src/stm32f0/stm32f0_serial.c b/arch/arm/src/stm32f0/stm32f0_serial.c
index 66f88e38eb3..0423b9ff94f 100644
--- a/arch/arm/src/stm32f0/stm32f0_serial.c
+++ b/arch/arm/src/stm32f0/stm32f0_serial.c
@@ -59,14 +59,21 @@
#endif
#include
-#include
-#include "chip.h"
-#include "stm32f0_uart.h"
-//#include "stm32f0_dma.h"
-#include "stm32f0_rcc.h"
#include "up_arch.h"
#include "up_internal.h"
+#include "chip.h"
+#include "stm32f0_gpio.h"
+#include "stm32f0_uart.h"
+#include "stm32f0_rcc.h"
+#include "chip/stm32f0_pinmap.h"
+
+/* board.h should be included last. It may depend on defintions from
+ * previous header files and it may, in certain cases, override definitions
+ * provided in previous header files.
+ */
+
+#include
/****************************************************************************
* Pre-processor Definitions
@@ -189,7 +196,7 @@
#endif
#ifdef USE_SERIALDRIVER
-#ifdef HAVE_USART
+#ifdef HAVE_UART
/****************************************************************************
* Private Types
@@ -2320,7 +2327,7 @@ static int stm32f0serial_pmprepare(FAR struct pm_callback_s *cb, int domain,
return OK;
}
#endif
-#endif /* HAVE_USART */
+#endif /* HAVE_UART */
#endif /* USE_SERIALDRIVER */
/****************************************************************************
@@ -2342,7 +2349,7 @@ static int stm32f0serial_pmprepare(FAR struct pm_callback_s *cb, int domain,
#ifdef USE_EARLYSERIALINIT
void up_earlyserialinit(void)
{
-#ifdef HAVE_USART
+#ifdef HAVE_UART
unsigned i;
/* Disable all USART interrupts */
@@ -2375,7 +2382,7 @@ void up_earlyserialinit(void)
void up_serialinit(void)
{
-#ifdef HAVE_USART
+#ifdef HAVE_UART
char devname[16];
unsigned i;
unsigned minor = 0;
diff --git a/arch/arm/src/stm32f0/stm32f0_uart.h b/arch/arm/src/stm32f0/stm32f0_uart.h
index 4fb7b1c05f6..80229a28312 100644
--- a/arch/arm/src/stm32f0/stm32f0_uart.h
+++ b/arch/arm/src/stm32f0/stm32f0_uart.h
@@ -54,22 +54,22 @@
* device.
*/
-#if STM32F0_NUSART < 8 || !defined(CONFIG_STM32F0_HAVE_USART8)
+#if STM32F0_NUSART < 8 || !defined(CONFIG_STM32F0_HAVE_UART8)
# undef CONFIG_STM32F0_USART8
#endif
-#if STM32F0_NUSART < 7 || !defined(CONFIG_STM32F0_HAVE_USART7)
+#if STM32F0_NUSART < 7 || !defined(CONFIG_STM32F0_HAVE_UART7)
# undef CONFIG_STM32F0_USART7
#endif
-#if STM32F0_NUSART < 6 || !defined(CONFIG_STM32F0_HAVE_USART6)
+#if STM32F0_NUSART < 6 || !defined(CONFIG_STM32F0_HAVE_UART6)
# undef CONFIG_STM32F0_USART6
#endif
-#if STM32F0_NUSART < 5 || !defined(CONFIG_STM32F0_HAVE_USART5)
+#if STM32F0_NUSART < 5 || !defined(CONFIG_STM32F0_HAVE_UART5)
# undef CONFIG_STM32F0_USART5
#endif
-#if STM32F0_NUSART < 4 || !defined(CONFIG_STM32F0_HAVE_USART4)
+#if STM32F0_NUSART < 4 || !defined(CONFIG_STM32F0_HAVE_UART4)
# undef CONFIG_STM32F0_USART4
#endif
-#if STM32F0_NUSART < 3 || !defined(CONFIG_STM32F0_HAVE_USART3)
+#if STM32F0_NUSART < 3 || !defined(CONFIG_STM32F0_HAVE_UART3)
# undef CONFIG_STM32F0_USART3
#endif
#if STM32F0_NUSART < 2
@@ -84,7 +84,7 @@
#if defined(CONFIG_STM32F0_USART1) || defined(CONFIG_STM32F0_USART2) || \
defined(CONFIG_STM32F0_USART3) || defined(CONFIG_STM32F0_USART4) || \
defined(CONFIG_STM32F0_USART5)
-# define HAVE_USART 1
+# define HAVE_UART 1
#endif
/* Sanity checks */
diff --git a/configs/nucleo-f303re/README.txt b/configs/nucleo-f303re/README.txt
new file mode 100644
index 00000000000..b8f1c239d76
--- /dev/null
+++ b/configs/nucleo-f303re/README.txt
@@ -0,0 +1,26 @@
+Nucleo-64 Boards
+================
+
+The Nucleo-F303RE is a member of the Nucleo-64 board family. The Nucleo-64
+is a standard board for use with several STM32 parts in the LQFP64 package.
+Variants include
+
+ Order code Targeted STM32
+ ------------- --------------
+ NUCLEO-F030R8 STM32F030R8T6
+ NUCLEO-F070RB STM32F070RBT6
+ NUCLEO-F072RB STM32F072RBT6
+ NUCLEO-F091RC STM32F091RCT6
+ NUCLEO-F103RB STM32F103RBT6
+ NUCLEO-F302R8 STM32F302R8T6
+ NUCLEO-F303RE STM32F303RET6
+ NUCLEO-F334R8 STM32F334R8T6
+ NUCLEO-F401RE STM32F401RET6
+ NUCLEO-F410RB STM32F410RBT6
+ NUCLEO-F411RE STM32F411RET6
+ NUCLEO-F446RE STM32F446RET6
+ NUCLEO-L053R8 STM32L053R8T6
+ NUCLEO-L073RZ STM32L073RZT6
+ NUCLEO-L152RE STM32L152RET6
+ NUCLEO-L452RE STM32L452RET6
+ NUCLEO-L476RG STM32L476RGT6
diff --git a/configs/nucleo-f334r8/README.txt b/configs/nucleo-f334r8/README.txt
new file mode 100644
index 00000000000..b8f1c239d76
--- /dev/null
+++ b/configs/nucleo-f334r8/README.txt
@@ -0,0 +1,26 @@
+Nucleo-64 Boards
+================
+
+The Nucleo-F303RE is a member of the Nucleo-64 board family. The Nucleo-64
+is a standard board for use with several STM32 parts in the LQFP64 package.
+Variants include
+
+ Order code Targeted STM32
+ ------------- --------------
+ NUCLEO-F030R8 STM32F030R8T6
+ NUCLEO-F070RB STM32F070RBT6
+ NUCLEO-F072RB STM32F072RBT6
+ NUCLEO-F091RC STM32F091RCT6
+ NUCLEO-F103RB STM32F103RBT6
+ NUCLEO-F302R8 STM32F302R8T6
+ NUCLEO-F303RE STM32F303RET6
+ NUCLEO-F334R8 STM32F334R8T6
+ NUCLEO-F401RE STM32F401RET6
+ NUCLEO-F410RB STM32F410RBT6
+ NUCLEO-F411RE STM32F411RET6
+ NUCLEO-F446RE STM32F446RET6
+ NUCLEO-L053R8 STM32L053R8T6
+ NUCLEO-L073RZ STM32L073RZT6
+ NUCLEO-L152RE STM32L152RET6
+ NUCLEO-L452RE STM32L452RET6
+ NUCLEO-L476RG STM32L476RGT6
diff --git a/configs/nucleo-f4x1re/README.txt b/configs/nucleo-f4x1re/README.txt
index 4a84121a400..9ea6be28ab9 100644
--- a/configs/nucleo-f4x1re/README.txt
+++ b/configs/nucleo-f4x1re/README.txt
@@ -65,6 +65,7 @@ Board features, however, are identical:
Contents
========
+ - Nucleo-64 Boards
- Development Environment
- GNU Toolchain Options
- IDEs
@@ -79,6 +80,33 @@ Contents
- Shields
- Configurations
+Nucleo-64 Boards
+================
+
+The Nucleo-F4x1RE boards are members of the Nucleo-64 board family. The
+Nucleo-64 is a standard board for use with several STM32 parts in the
+LQFP64 package. Variants include
+
+ Order code Targeted STM32
+ ------------- --------------
+ NUCLEO-F030R8 STM32F030R8T6
+ NUCLEO-F070RB STM32F070RBT6
+ NUCLEO-F072RB STM32F072RBT6
+ NUCLEO-F091RC STM32F091RCT6
+ NUCLEO-F103RB STM32F103RBT6
+ NUCLEO-F302R8 STM32F302R8T6
+ NUCLEO-F303RE STM32F303RET6
+ NUCLEO-F334R8 STM32F334R8T6
+ NUCLEO-F401RE STM32F401RET6
+ NUCLEO-F410RB STM32F410RBT6
+ NUCLEO-F411RE STM32F411RET6
+ NUCLEO-F446RE STM32F446RET6
+ NUCLEO-L053R8 STM32L053R8T6
+ NUCLEO-L073RZ STM32L073RZT6
+ NUCLEO-L152RE STM32L152RET6
+ NUCLEO-L452RE STM32L452RET6
+ NUCLEO-L476RG STM32L476RGT6
+
Development Environment
=======================
diff --git a/configs/nucleo-l476rg/README.txt b/configs/nucleo-l476rg/README.txt
index d576d83d880..72ab182d872 100644
--- a/configs/nucleo-l476rg/README.txt
+++ b/configs/nucleo-l476rg/README.txt
@@ -41,6 +41,7 @@ Board features:
Contents
========
+ - Nucleo-64 Boards
- Development Environment
- GNU Toolchain Options
- IDEs
@@ -55,6 +56,33 @@ Contents
- Shields
- Configurations
+Nucleo-64 Boards
+================
+
+The Nucleo-L476RG is a member of the Nucleo-64 board family. The Nucleo-64
+is a standard board for use with several STM32 parts in the LQFP64 package.
+Variants include
+
+ Order code Targeted STM32
+ ------------- --------------
+ NUCLEO-F030R8 STM32F030R8T6
+ NUCLEO-F070RB STM32F070RBT6
+ NUCLEO-F072RB STM32F072RBT6
+ NUCLEO-F091RC STM32F091RCT6
+ NUCLEO-F103RB STM32F103RBT6
+ NUCLEO-F302R8 STM32F302R8T6
+ NUCLEO-F303RE STM32F303RET6
+ NUCLEO-F334R8 STM32F334R8T6
+ NUCLEO-F401RE STM32F401RET6
+ NUCLEO-F410RB STM32F410RBT6
+ NUCLEO-F411RE STM32F411RET6
+ NUCLEO-F446RE STM32F446RET6
+ NUCLEO-L053R8 STM32L053R8T6
+ NUCLEO-L073RZ STM32L073RZT6
+ NUCLEO-L152RE STM32L152RET6
+ NUCLEO-L452RE STM32L452RET6
+ NUCLEO-L476RG STM32L476RGT6
+
Development Environment
=======================
diff --git a/configs/stm32f0discovery/include/board.h b/configs/stm32f0discovery/include/board.h
index 4123b11f560..4840067e96d 100644
--- a/configs/stm32f0discovery/include/board.h
+++ b/configs/stm32f0discovery/include/board.h
@@ -237,38 +237,5 @@
#define BUTTON_USER_BIT (1 << BUTTON_USER)
/* Alternate Pin Functions **********************************************************/
-/* The STM32L-Discovery has no on-board RS-232 driver. Further, there are no USART
- * pins that do not conflict with the on board resources, in particular, the LCD:
- * Most USART pins are available if the LCD is enabled; USART2 may be used if either
- * the LCD or the on-board LEDs are disabled.
- *
- * PA9 USART1_TX LCD glass COM1 P2, pin 22
- * PA10 USART1_RX LCD glass COM2 P2, pin 21
- * PB6 USART1_TX LED Blue P2, pin 8
- * PB7 USART1_RX LED Green P2, pin 7
- *
- * PA2 USART2_TX LCD SEG1 P1, pin 17
- * PA3 USART2_RX LCD SEG2 P1, pin 18
- *
- * PB10 USART3_TX LCD SEG6 P1, pin 22
- * PB11 USART3_RX LCD SEG7 P1, pin 23
- * PC10 USART3_TX LCD SEG22 P2, pin 15
- * PC11 USART3_RX LCD SEG23 P2, pin 14
- */
-
-/* Select PA9 and PA10 if the LCD is not enabled */
-
-//#define GPIO_USART1_RX GPIO_USART1_RX_1 /* PA10 */
-//#define GPIO_USART1_TX GPIO_USART1_TX_1 /* PA9 */
-
-/* This there are no other options for USART1 on this part */
-
-#define GPIO_USART2_RX GPIO_USART2_RX_1 /* PA3 */
-#define GPIO_USART2_TX GPIO_USART2_TX_1 /* PA2 */
-
-/* Arbirtrarily select PB10 and PB11 */
-
-#define GPIO_USART3_RX GPIO_USART3_RX_1 /* PB11 */
-#define GPIO_USART3_TX GPIO_USART3_TX_1 /* PB10 */
#endif /* __CONFIG_STM32F0DISCOVERY_INCLUDE_BOARD_H */
diff --git a/net/netdev/netdev_findbyaddr.c b/net/netdev/netdev_findbyaddr.c
index 25fbc02b8d1..6aea450393b 100644
--- a/net/netdev/netdev_findbyaddr.c
+++ b/net/netdev/netdev_findbyaddr.c
@@ -1,7 +1,7 @@
/****************************************************************************
* net/netdev/netdev_findbyaddr.c
*
- * Copyright (C) 2007-2009, 2014-2015 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007-2009, 2014-2015, 2017 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
@@ -217,9 +217,13 @@ FAR struct net_driver_s *netdev_findby_ipv4addr(in_addr_t ripaddr)
* broadcast packet out ALL local networks. I am not sure
* of that and, in any event, there is nothing we can do
* about that here.
+ *
+ * REVISIT: For now, arbitrarily return the first network
+ * interface in the list of network devices. The broadcast
+ * will be sent on that device only.
*/
- return NULL;
+ return g_netdevices;
}
else
{
@@ -335,9 +339,13 @@ FAR struct net_driver_s *netdev_findby_ipv6addr(const net_ipv6addr_t ripaddr)
* broadcast packet out ALL local networks. I am not sure
* of that and, in any event, there is nothing we can do
* about that here.
+ *
+ * REVISIT: For now, arbitrarily return the first network
+ * interface in the list of network devices. The broadcast
+ * will be sent on that device only.
*/
- return NULL;
+ return g_netdevices;
}
else
{