Cosmetic updates from review of last pull request

This commit is contained in:
Gregory Nutt 2016-01-18 08:03:03 -06:00
parent 84de4986a9
commit 365d2a79ba
17 changed files with 81 additions and 94 deletions

View File

@ -429,6 +429,12 @@ configs/olimex-stm32-h405
further information. This board features the STMicro STM32F405RGT6 MCU. further information. This board features the STMicro STM32F405RGT6 MCU.
Contributed by Martin Lederhilger. Contributed by Martin Lederhilger.
configs/olimex-stm32-h407
This port uses the Olimex STM32 H407 board and a GNU arm-nuttx-elf
toolchain* under Linux or Cygwin. See the http://www.olimex.com for
further information. This board features the STMicro STM32F407ZGT6 (144
pins). Contributed by Neil Hancock.
configs/olimex-stm32-p107 configs/olimex-stm32-p107
This port uses the Olimex STM32-P107 board (STM32F107VC) and a GNU arm-nuttx-elf This port uses the Olimex STM32-P107 board (STM32F107VC) and a GNU arm-nuttx-elf
toolchain* under Linux or Cygwin. See the https://www.olimex.com/dev/stm32-p107.html toolchain* under Linux or Cygwin. See the https://www.olimex.com/dev/stm32-p107.html

View File

@ -11,6 +11,3 @@ nsh - Only basic shell response tested on USART2
This realease provides baseline for H407 12MHZ clock in include/board.h This realease provides baseline for H407 12MHZ clock in include/board.h
TODO: Update to use mini USB-OTG and USB HOST TODO: Update to use mini USB-OTG and USB HOST

View File

@ -1,9 +1,9 @@
/************************************************************************************ /************************************************************************************
* configs/olimex-stm32-h407/include/board.h * configs/olimex-stm32-h407/include/board.h
* *
* Copyright (C) 2014 Gregory Nutt. All rights reserved. * Copyright (C) 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* Modified for H407 Neil Hancock * Modified for H407 Neil Hancock
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
@ -204,23 +204,27 @@
/* Alternate function pin selections ************************************************/ /* Alternate function pin selections ************************************************/
//USART3: /* USART3: */
//#define GPIO_USART3_RX GPIO_USART3_RX_1 //PB11 #if 0
//#define GPIO_USART3_TX GPIO_USART3_TX_1 //PB10 #define GPIO_USART3_RX GPIO_USART3_RX_1 /* PB11 */
//#define GPIO_USART3_CTS GPIO_USART3_CTS_1 //PB13 #define GPIO_USART3_TX GPIO_USART3_TX_1 /* PB10 */
//#define GPIO_USART3_RTS GPIO_USART3_RTS_1 //PB14 #define GPIO_USART3_CTS GPIO_USART3_CTS_1 /* PB13 */
#define GPIO_USART3_RTS GPIO_USART3_RTS_1 /* PB14 */
#endif
//USART2 /* USART2: */
#define GPIO_USART2_RX GPIO_USART2_RX_1 //
#define GPIO_USART2_TX GPIO_USART2_TX_1 //
#define GPIO_USART2_CTS GPIO_USART2_CTS_1 //
#define GPIO_USART2_RTS GPIO_USART2_RTS_1 //
//CAN: #define GPIO_USART2_RX GPIO_USART2_RX_1
#define GPIO_CAN1_RX GPIO_CAN1_RX_2 //PB8 #define GPIO_USART2_TX GPIO_USART2_TX_1
#define GPIO_CAN1_TX GPIO_CAN1_TX_2 //PB9 #define GPIO_USART2_CTS GPIO_USART2_CTS_1
#define GPIO_CAN2_RX GPIO_CAN1_RX_2 //PB5 #define GPIO_USART2_RTS GPIO_USART2_RTS_1
#define GPIO_CAN2_TX GPIO_CAN1_TX_2 //PB6
/* CAN: */
#define GPIO_CAN1_RX GPIO_CAN1_RX_2 /* PB8 */
#define GPIO_CAN1_TX GPIO_CAN1_TX_2 /* PB9 */
#define GPIO_CAN2_RX GPIO_CAN1_RX_2 /* PB5 */
#define GPIO_CAN2_TX GPIO_CAN1_TX_2 /* PB6 */
/************************************************************************************ /************************************************************************************
* Public Data * Public Data

View File

@ -1,7 +1,7 @@
############################################################################ ############################################################################
# configs/olimex-stm32-h407/nsh/Make.defs # configs/olimex-stm32-h407/nsh/Make.defs
# #
# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. # Copyright (C) 2016 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org> # Author: Gregory Nutt <gnutt@nuttx.org>
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# configs/stm32f4discovery/nsh/setenv.sh # configs/stm32f4discovery/nsh/setenv.sh
# #
# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. # Copyright (C) 2016 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org> # Author: Gregory Nutt <gnutt@nuttx.org>
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* configs/olimex-stm32-h405/scripts/ld.script * configs/olimex-stm32-h405/scripts/ld.script
* *
* Copyright (C) 2014 Gregory Nutt. All rights reserved. * Copyright (C) 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -33,12 +33,12 @@
* *
****************************************************************************/ ****************************************************************************/
/* The STM32F405RGT6 has 1024Kb of FLASH beginning at address 0x0800:0000 and /* The STM32F407ZGT6 has 1024Kb of FLASH beginning at address 0x0800:0000 and
* 192Kb of SRAM. SRAM is split up into two blocks: * 192Kb of SRAM. SRAM is split up into two blocks:
* *
* 1) 112Kb of SRAM beginning at address 0x2000:0000 * 1) 112Kb of SRAM beginning at address 0x2000:0000
* 2) 16Kb of SRAM beginning at address 0x2001:c000 * 2) 16Kb of SRAM beginning at address 0x2001:c000
3) 64Kb of SRAM beginning at address 0x2002:0000 * 3) 64Kb of SRAM beginning at address 0x2002:0000
* *
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000 * When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
* where the code expects to begin execution by jumping to the entry point in * where the code expects to begin execution by jumping to the entry point in
@ -48,8 +48,8 @@
MEMORY MEMORY
{ {
flash (rx) : ORIGIN = 0x08000000, LENGTH = 1024K flash (rx) : ORIGIN = 0x08000000, LENGTH = 1024K
sram (rwx) : ORIGIN = 0x20000000, LENGTH = 112K sram (rwx) : ORIGIN = 0x20000000, LENGTH = 112K
} }
OUTPUT_ARCH(arm) OUTPUT_ARCH(arm)

View File

@ -1,7 +1,7 @@
############################################################################ ############################################################################
# configs/olimex-stm32-h407/src/Makefile # configs/olimex-stm32-h407/src/Makefile
# #
# Copyright (C) 2014 Gregory Nutt. All rights reserved. # Copyright (C) 2016 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org> # Author: Gregory Nutt <gnutt@nuttx.org>
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* configs/olimex-stm32-h405/src/olimex-stm32-h405.h * configs/olimex-stm32-h407/src/olimex-stm32-h407.h
* *
* Copyright (C) 2014 Max Holtzberg. All rights reserved. * Copyright (C) 2014 Max Holtzberg. All rights reserved.
* Author: Max Holtzberg <mholtzberg@uvc-ingenieure.de> * Author: Max Holtzberg <mholtzberg@uvc-ingenieure.de>

View File

@ -1,7 +1,7 @@
/************************************************************************************ /************************************************************************************
* configs/olimex-stm32-h405/src/stm32_adc.c * configs/olimex-stm32-h407/src/stm32_adc.c
* *
* Copyright (C) 2014 Gregory Nutt. All rights reserved. * Copyright (C) 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -87,22 +87,22 @@
* ADC123_IN10 * ADC123_IN10
*/ */
/* Identifying number of each ADC channel: Variable Resistor. */ /* Identifying number of each ADC channel: Variable Resistor.
*
* {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15};
*/
#ifdef CONFIG_STM32_ADC1 #ifdef CONFIG_STM32_ADC1
static const uint8_t g_chanlist[ADC1_NCHANNELS] = {1};/*, 2, 3, static const uint8_t g_chanlist[ADC1_NCHANNELS] = {1};
4, 5, 6,
7, 8, 9,
10, 11, 12,
13, 15};*/
/* Configurations of pins used byte each ADC channels */ /* Configurations of pins used byte each ADC channels
*
* {GPIO_ADC1_IN1, GPIO_ADC1_IN2, GPIO_ADC1_IN3, GPIO_ADC1_IN4, GPIO_ADC1_IN5,
* GPIO_ADC1_IN6, GPIO_ADC1_IN7, GPIO_ADC1_IN8, GPIO_ADC1_IN9, GPIO_ADC1_IN10,
* GPIO_ADC1_IN11, GPIO_ADC1_IN12, GPIO_ADC1_IN13, GPIO_ADC1_IN15};
*/
static const uint32_t g_pinlist[ADC1_NCHANNELS] = {GPIO_ADC1_IN1};/*, GPIO_ADC1_IN2, GPIO_ADC1_IN3, static const uint32_t g_pinlist[ADC1_NCHANNELS] = {GPIO_ADC1_IN1};
GPIO_ADC1_IN4, GPIO_ADC1_IN5, GPIO_ADC1_IN6,
GPIO_ADC1_IN7, GPIO_ADC1_IN8, GPIO_ADC1_IN9,
GPIO_ADC1_IN10, GPIO_ADC1_IN11, GPIO_ADC1_IN12,
GPIO_ADC1_IN13, GPIO_ADC1_IN15};*/
#endif #endif
/************************************************************************************ /************************************************************************************

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* configs/olimex-stm32-h407/src/stm32_autoleds.c * configs/olimex-stm32-h407/src/stm32_autoleds.c
* *
* Copyright (C) 2014-2015 Gregory Nutt. All rights reserved. * Copyright (C) 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -70,14 +70,6 @@
# define ledvdbg(x...) # define ledvdbg(x...)
#endif #endif
/****************************************************************************
* Private Data
****************************************************************************/
/****************************************************************************
* Private Functions
****************************************************************************/
/**************************************************************************** /****************************************************************************
* Public Functions * Public Functions
****************************************************************************/ ****************************************************************************/
@ -99,11 +91,15 @@ void board_autoled_initialize(void)
void board_autoled_on(int led) void board_autoled_on(int led)
{ {
if(led == LED_STARTED) if (led == LED_STARTED)
stm32_gpiowrite(GPIO_LED_STATUS, true); {
stm32_gpiowrite(GPIO_LED_STATUS, true);
}
if(led == LED_ASSERTION || led == LED_PANIC) if (led == LED_ASSERTION || led == LED_PANIC)
{
stm32_gpiowrite(GPIO_LED_STATUS, false); stm32_gpiowrite(GPIO_LED_STATUS, false);
}
} }
/**************************************************************************** /****************************************************************************
@ -112,11 +108,15 @@ void board_autoled_on(int led)
void board_autoled_off(int led) void board_autoled_off(int led)
{ {
if(led == LED_STARTED) if (led == LED_STARTED)
{
stm32_gpiowrite(GPIO_LED_STATUS, false); stm32_gpiowrite(GPIO_LED_STATUS, false);
}
if(led == LED_ASSERTION || led == LED_PANIC) if (led == LED_ASSERTION || led == LED_PANIC)
stm32_gpiowrite(GPIO_LED_STATUS, true); {
stm32_gpiowrite(GPIO_LED_STATUS, true);
}
} }
#endif /* CONFIG_ARCH_LEDS */ #endif /* CONFIG_ARCH_LEDS */

View File

@ -1,7 +1,7 @@
/************************************************************************************ /************************************************************************************
* configs/olimex-stm32-h405/src/stm32_boot.c * configs/olimex-stm32-h407/src/stm32_boot.c
* *
* Copyright (C) 2014-2015 Gregory Nutt. All rights reserved. * Copyright (C) 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -49,14 +49,6 @@
#include "olimex-stm32-h407.h" #include "olimex-stm32-h407.h"
#include "stm32_ccm.h" #include "stm32_ccm.h"
/************************************************************************************
* Pre-processor Definitions
************************************************************************************/
/************************************************************************************
* Private Functions
************************************************************************************/
/************************************************************************************ /************************************************************************************
* Public Functions * Public Functions
************************************************************************************/ ************************************************************************************/
@ -73,27 +65,27 @@
void stm32_boardinitialize(void) void stm32_boardinitialize(void)
{ {
#if defined(CONFIG_STM32_OTGFS) || defined(CONFIG_STM32_OTGHS)
/* Initialize USB if the 1) OTG FS controller is in the configuration and 2) /* Initialize USB if the 1) OTG FS controller is in the configuration and 2)
* disabled, and 3) the weak function stm32_usbinitialize() has been brought * disabled, and 3) the weak function stm32_usbinitialize() has been brought
* into the build. Presumeably either CONFIG_USBDEV is also selected. * into the build. Presumeably either CONFIG_USBDEV is also selected.
*/ */
#if defined(CONFIG_STM32_OTGFS) || defined(CONFIG_STM32_OTGHS)
if (stm32_usbinitialize) if (stm32_usbinitialize)
{ {
stm32_usbinitialize(); stm32_usbinitialize();
} }
#endif #endif
#ifdef CONFIG_ARCH_LEDS
/* Configure on-board LEDs if LED support has been selected. */ /* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
board_autoled_initialize(); board_autoled_initialize();
#endif #endif
#ifdef CONFIG_ARCH_BUTTONS
/* Configure on-board BUTTONs if BUTTON support has been selected. */ /* Configure on-board BUTTONs if BUTTON support has been selected. */
#ifdef CONFIG_ARCH_BUTTONS
board_button_initialize(); board_button_initialize();
#endif #endif
} }
@ -114,12 +106,12 @@ void stm32_boardinitialize(void)
#ifdef CONFIG_BOARD_INITIALIZE #ifdef CONFIG_BOARD_INITIALIZE
void board_initialize(void) void board_initialize(void)
{ {
#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_NSH_ARCHINIT)
/* Perform NSH initialization here instead of from the NSH. This /* Perform NSH initialization here instead of from the NSH. This
* alternative NSH initialization is necessary when NSH is ran in user-space * alternative NSH initialization is necessary when NSH is ran in user-space
* but the initialization function must run in kernel space. * but the initialization function must run in kernel space.
*/ */
#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_NSH_ARCHINIT)
board_app_initialize(); board_app_initialize();
#endif #endif
} }

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* configs/olimex-stm32-h405/src/stm32_buttons.c * configs/olimex-stm32-h407/src/stm32_buttons.c
* *
* Copyright (C) 2014-2015 Gregory Nutt. All rights reserved. * Copyright (C) 2014-2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
@ -49,14 +49,6 @@
#ifdef CONFIG_ARCH_BUTTONS #ifdef CONFIG_ARCH_BUTTONS
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************
* Private Data
****************************************************************************/
/**************************************************************************** /****************************************************************************
* Private Functions * Private Functions
****************************************************************************/ ****************************************************************************/

View File

@ -1,7 +1,7 @@
/************************************************************************************ /************************************************************************************
* configs/olimex-stm32-405/src/stm32_can.c * configs/olimex-stm32-405/src/stm32_can.c
* *
* Copyright (C) 2014 Gregory Nutt. All rights reserved. * Copyright (C) 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -80,10 +80,6 @@
# define canllvdbg(x...) # define canllvdbg(x...)
#endif #endif
/************************************************************************************
* Private Functions
************************************************************************************/
/************************************************************************************ /************************************************************************************
* Public Functions * Public Functions
************************************************************************************/ ************************************************************************************/

View File

@ -1,7 +1,7 @@
/************************************************************************************ /************************************************************************************
* configs/olimex-stm32-h405/src/stm32_cxxinitialize.c * configs/olimex-stm32-h407/src/stm32_cxxinitialize.c
* *
* Copyright (C) 2014 Gregory Nutt. All rights reserved. * Copyright (C) 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* config/olimex-stm32-h405/src/stm32_nsh.c * config/olimex-stm32-h407/src/stm32_nsh.c
* *
* Copyright (C) 2014 Gregory Nutt. All rights reserved. * Copyright (C) 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

View File

@ -1,7 +1,7 @@
/************************************************************************************ /************************************************************************************
* configs/olimex-stm32-h405/src/stm32_usbdev.c * configs/olimex-stm32-h407/src/stm32_usbdev.c
* *
* Copyright (C) 2014 Gregory Nutt. All rights reserved. * Copyright (C) 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* configs/olimex-stm32-h405/src/stm32_leds.c * configs/olimex-stm32-h407/src/stm32_leds.c
* *
* Copyright (C) 2014-2015 Gregory Nutt. All rights reserved. * Copyright (C) 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without