From 879273f63e5d68b065eeda960b2ffac3927a7472 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 14 Apr 2017 09:32:15 -0600 Subject: [PATCH 1/8] arch/arm/Kconfig: Add option for STM32F0 --- arch/arm/Kconfig | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 From 4602212612d618a7adce2038b653ec6b4333ce38 Mon Sep 17 00:00:00 2001 From: Alan Carvalho de Assis Date: Fri, 14 Apr 2017 11:42:20 -0600 Subject: [PATCH 2/8] Fix serial compilation issues --- arch/arm/src/stm32f0/chip/stm32f0_pinmap.h | 53 ++++++++++++++++++++++ arch/arm/src/stm32f0/stm32f0_serial.c | 17 +++++-- configs/stm32f0discovery/include/board.h | 33 -------------- 3 files changed, 65 insertions(+), 38 deletions(-) create mode 100644 arch/arm/src/stm32f0/chip/stm32f0_pinmap.h 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..6c122328af6 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 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 */ From 03cbf21cd8810d10a5ca1bfc2866b66315a6c2f8 Mon Sep 17 00:00:00 2001 From: Alan Carvalho de Assis Date: Fri, 14 Apr 2017 11:44:51 -0600 Subject: [PATCH 3/8] Replace HAVE_USART with HAVE_UART --- arch/arm/src/stm32f0/stm32f0_serial.c | 8 ++++---- arch/arm/src/stm32f0/stm32f0_uart.h | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/arch/arm/src/stm32f0/stm32f0_serial.c b/arch/arm/src/stm32f0/stm32f0_serial.c index 6c122328af6..0423b9ff94f 100644 --- a/arch/arm/src/stm32f0/stm32f0_serial.c +++ b/arch/arm/src/stm32f0/stm32f0_serial.c @@ -196,7 +196,7 @@ #endif #ifdef USE_SERIALDRIVER -#ifdef HAVE_USART +#ifdef HAVE_UART /**************************************************************************** * Private Types @@ -2327,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 */ /**************************************************************************** @@ -2349,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 */ @@ -2382,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 */ From 935cc4e3de2f06e64572d132e8851a00a3d43bb9 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 14 Apr 2017 13:30:36 -0600 Subject: [PATCH 4/8] Add a placeholder for nucleo-64 boards. Currently these are in various directories nucleo-f303re, nucleo-f334r8, and nucleo-l476rg but need to be consolidated here because these are all the same boards. --- Documentation/README.html | 2 + README.txt | 2 + configs/nucleo-64/README.txt | 141 +++++++++++++++++++++++++++++++++++ 3 files changed, 145 insertions(+) create mode 100644 configs/nucleo-64/README.txt diff --git a/Documentation/README.html b/Documentation/README.html index 8cc093715d4..e360426ef5a 100644 --- a/Documentation/README.html +++ b/Documentation/README.html @@ -161,6 +161,8 @@ nuttx/ | | `- README.txt | |- nucleo-144/ | | `- README.txt + | |- nucleo-64/ + | | `- README.txt | |- nucleo-f4x1re/ | | `- README.txt | |- nutiny-nuc120/ diff --git a/README.txt b/README.txt index af17a2334dd..51306cfbb87 100644 --- a/README.txt +++ b/README.txt @@ -1548,6 +1548,8 @@ nuttx/ | | `- README.txt | |- nucleo-144/ | | `- README.txt + | |- nucleo-64/ + | | `- README.txt | |- nucleo-f4x1re/ | | `- README.txt | |- nutiny-nuc120/ diff --git a/configs/nucleo-64/README.txt b/configs/nucleo-64/README.txt new file mode 100644 index 00000000000..a33b49185d7 --- /dev/null +++ b/configs/nucleo-64/README.txt @@ -0,0 +1,141 @@ +README +====== + +This README discusses issues unique to NuttX configurations for the STMicro +Nucleo-64 board family + +Contents +======== + + - Nucleo-64 Boards + - Nucleo-F303RE + - Nucleo-F334R8 + - Nucleo-L476RG + - Development Environment + - Basic configuaration & build steps + - Hardware + - Button + - LED + - U[S]ARTs and Serial Consoles + - SPI + - SDIO - MMC + - Configurations + +Nucleo-64 Boards: +================= + +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 + +This directory is intended to support all Nucleo-64 variants since the +boards are identical, differing only in the installed part. This common +board design provides uniformity in the documentation from ST and should +allow us to quickly change configurations by just cloning a configuration +and changing the CPU choice and board initialization. Unfortunately for +the developer, the CPU specific information must be extracted from the +common information in the documentation. + +Please read the User Manaul UM1727: Getting started with STM32 Nucleo board +software development tools and take note of the Powering options for the +board (6.3 Power supply and power selection) and the Solder bridges based +hardware configuration changes that are configurable (6.11 Solder bridges). + +Common Board Features: +--------------------- + +The STM32 Nucleo board offers the following features: + + - STM32 microcontroller in LQFP64 package + - Two types of extension resources + Arduino™ Uno V3 connectivity + ST morpho extension pin headers for full access to all STM32 I/Os + - ARM® mbed™ (see http://mbed.org) + - On-board ST-LINK/V2-1 debugger and programmer with SWD connector + Selection-mode switch to use the kit as a standalone ST-LINK/V2-1 + - Flexible board power supply: + USB VBUS or external source (3.3V, 5V, 7 - 12V) + Power management access point + - Three LEDs: + USB communication (LD1), user LED (LD2), power LED (LD3) + - Two push-buttons: USER and RESET + - USB re-enumeration capability. Three different interfaces supported on USB: + Virtual COM port + Mass storage + Debug port + - Comprehensive free software HAL library including a variety of software examples + + Peripherals: 8 leds, 2 push button (3 LEDs, 1 button) under software + control + Debug: STLINK/V2-1 debugger/programmer Uses a STM32F103CB to + provide a ST-Link for programming, debug similar to the + OpenOcd FTDI function - USB to JTAG front-end. + + Expansion I/F: ST Zio and Extended Ardino and Morpho Headers + +Nucleo-F303RE +============= + +Nucleo-F334R8 +============= + +Nucleo-L476RG +============= + +Development Environment +======================= + + Either Linux or Cygwin on Windows can be used for the development environment. + The source has been built only using the GNU toolchain (see below). Other + toolchains will likely cause problems. + + All testing has been conducted using the GNU toolchain from ARM for Linux. + found here https://launchpad.net/gcc-arm-embedded/4.9/4.9-2015-q3-update/+download/gcc-arm-none-eabi-4_9-2015q3-20150921-linux.tar.bz2 + + If you change the default toolchain, then you may also have to modify the PATH in + the setenv.h file if your make cannot find the tools. + +Basic configuration & build steps +================================== + + A GNU GCC-based toolchain is assumed. The files */setenv.sh should + be modified to point to the correct path to the Cortex-M4 GCC toolchain (if + different from the default in your PATH variable). + + - Configures nuttx creating .config file in the nuttx directory. + cd tools && ./configure.sh nucleo-f746zg/nsh && cd .. + - Refreshes the .config file with the latest available configurations. + make oldconfig + - Select the features you want in the build. + make menuconfig + - Builds Nuttx with the features you selected. + make + +Hardware +======== + +Serial Console +============== + +Configurations +============== + From fffdba08356e087eca860b40523d257a9c701255 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 14 Apr 2017 17:15:58 -0600 Subject: [PATCH 5/8] Revert "Add a placeholder for nucleo-64 boards. Currently these are in various directories nucleo-f303re, nucleo-f334r8, and nucleo-l476rg but need to be consolidated here because these are all the same boards." This reverts commit 935cc4e3de2f06e64572d132e8851a00a3d43bb9. --- Documentation/README.html | 2 - README.txt | 2 - configs/nucleo-64/README.txt | 141 ----------------------------------- 3 files changed, 145 deletions(-) delete mode 100644 configs/nucleo-64/README.txt diff --git a/Documentation/README.html b/Documentation/README.html index e360426ef5a..8cc093715d4 100644 --- a/Documentation/README.html +++ b/Documentation/README.html @@ -161,8 +161,6 @@ nuttx/ | | `- README.txt | |- nucleo-144/ | | `- README.txt - | |- nucleo-64/ - | | `- README.txt | |- nucleo-f4x1re/ | | `- README.txt | |- nutiny-nuc120/ diff --git a/README.txt b/README.txt index 51306cfbb87..af17a2334dd 100644 --- a/README.txt +++ b/README.txt @@ -1548,8 +1548,6 @@ nuttx/ | | `- README.txt | |- nucleo-144/ | | `- README.txt - | |- nucleo-64/ - | | `- README.txt | |- nucleo-f4x1re/ | | `- README.txt | |- nutiny-nuc120/ diff --git a/configs/nucleo-64/README.txt b/configs/nucleo-64/README.txt deleted file mode 100644 index a33b49185d7..00000000000 --- a/configs/nucleo-64/README.txt +++ /dev/null @@ -1,141 +0,0 @@ -README -====== - -This README discusses issues unique to NuttX configurations for the STMicro -Nucleo-64 board family - -Contents -======== - - - Nucleo-64 Boards - - Nucleo-F303RE - - Nucleo-F334R8 - - Nucleo-L476RG - - Development Environment - - Basic configuaration & build steps - - Hardware - - Button - - LED - - U[S]ARTs and Serial Consoles - - SPI - - SDIO - MMC - - Configurations - -Nucleo-64 Boards: -================= - -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 - -This directory is intended to support all Nucleo-64 variants since the -boards are identical, differing only in the installed part. This common -board design provides uniformity in the documentation from ST and should -allow us to quickly change configurations by just cloning a configuration -and changing the CPU choice and board initialization. Unfortunately for -the developer, the CPU specific information must be extracted from the -common information in the documentation. - -Please read the User Manaul UM1727: Getting started with STM32 Nucleo board -software development tools and take note of the Powering options for the -board (6.3 Power supply and power selection) and the Solder bridges based -hardware configuration changes that are configurable (6.11 Solder bridges). - -Common Board Features: ---------------------- - -The STM32 Nucleo board offers the following features: - - - STM32 microcontroller in LQFP64 package - - Two types of extension resources - Arduino™ Uno V3 connectivity - ST morpho extension pin headers for full access to all STM32 I/Os - - ARM® mbed™ (see http://mbed.org) - - On-board ST-LINK/V2-1 debugger and programmer with SWD connector - Selection-mode switch to use the kit as a standalone ST-LINK/V2-1 - - Flexible board power supply: - USB VBUS or external source (3.3V, 5V, 7 - 12V) - Power management access point - - Three LEDs: - USB communication (LD1), user LED (LD2), power LED (LD3) - - Two push-buttons: USER and RESET - - USB re-enumeration capability. Three different interfaces supported on USB: - Virtual COM port - Mass storage - Debug port - - Comprehensive free software HAL library including a variety of software examples - - Peripherals: 8 leds, 2 push button (3 LEDs, 1 button) under software - control - Debug: STLINK/V2-1 debugger/programmer Uses a STM32F103CB to - provide a ST-Link for programming, debug similar to the - OpenOcd FTDI function - USB to JTAG front-end. - - Expansion I/F: ST Zio and Extended Ardino and Morpho Headers - -Nucleo-F303RE -============= - -Nucleo-F334R8 -============= - -Nucleo-L476RG -============= - -Development Environment -======================= - - Either Linux or Cygwin on Windows can be used for the development environment. - The source has been built only using the GNU toolchain (see below). Other - toolchains will likely cause problems. - - All testing has been conducted using the GNU toolchain from ARM for Linux. - found here https://launchpad.net/gcc-arm-embedded/4.9/4.9-2015-q3-update/+download/gcc-arm-none-eabi-4_9-2015q3-20150921-linux.tar.bz2 - - If you change the default toolchain, then you may also have to modify the PATH in - the setenv.h file if your make cannot find the tools. - -Basic configuration & build steps -================================== - - A GNU GCC-based toolchain is assumed. The files */setenv.sh should - be modified to point to the correct path to the Cortex-M4 GCC toolchain (if - different from the default in your PATH variable). - - - Configures nuttx creating .config file in the nuttx directory. - cd tools && ./configure.sh nucleo-f746zg/nsh && cd .. - - Refreshes the .config file with the latest available configurations. - make oldconfig - - Select the features you want in the build. - make menuconfig - - Builds Nuttx with the features you selected. - make - -Hardware -======== - -Serial Console -============== - -Configurations -============== - From 6d18300f981f34de6417d5cc596cc8d4f2409ab6 Mon Sep 17 00:00:00 2001 From: ahb Date: Sat, 15 Apr 2017 11:13:24 +0200 Subject: [PATCH 6/8] not a clean fix, but at least makes DHCP working with CONFIG_NETDEV_MULTINIC --- net/netdev/netdev_findbyaddr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/netdev/netdev_findbyaddr.c b/net/netdev/netdev_findbyaddr.c index 25fbc02b8d1..67ee9b558bd 100644 --- a/net/netdev/netdev_findbyaddr.c +++ b/net/netdev/netdev_findbyaddr.c @@ -217,9 +217,11 @@ 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. + * For now, simply return the first network interface in order + * to have working DHCP with CONFIG_NETDEV_MULTINIC. */ - return NULL; + return g_netdevices; } else { From eee89102d8a8f07738895690e1d974b55beba411 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 15 Apr 2017 06:00:42 -0600 Subject: [PATCH 7/8] networking: IPv4 change of last PR should also be applied to corresponding IPv6 logic. --- net/netdev/netdev_findbyaddr.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/net/netdev/netdev_findbyaddr.c b/net/netdev/netdev_findbyaddr.c index 67ee9b558bd..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,8 +217,10 @@ 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. - * For now, simply return the first network interface in order - * to have working DHCP with CONFIG_NETDEV_MULTINIC. + * + * 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 g_netdevices; @@ -337,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 { From 0652cbfd12ac20915bce9ba13b9a9ff1632430e3 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 15 Apr 2017 07:40:14 -0600 Subject: [PATCH 8/8] Update TODO list and README files. --- Documentation/README.html | 8 +++++++- README.txt | 6 ++++++ TODO | 18 ++++++++++++++++-- configs/nucleo-f303re/README.txt | 26 ++++++++++++++++++++++++++ configs/nucleo-f334r8/README.txt | 26 ++++++++++++++++++++++++++ configs/nucleo-f4x1re/README.txt | 28 ++++++++++++++++++++++++++++ configs/nucleo-l476rg/README.txt | 28 ++++++++++++++++++++++++++++ 7 files changed, 137 insertions(+), 3 deletions(-) create mode 100644 configs/nucleo-f303re/README.txt create mode 100644 configs/nucleo-f334r8/README.txt 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/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 =======================