Added support for the Olimex STM32 P207 board. From Martin Lederhilger
This commit is contained in:
parent
ec84f19454
commit
21c59c0aa7
@ -5866,3 +5866,9 @@
|
||||
* arch/arm/include/stm32/chip.h and arch/arm/src/stm32/Kconfig:
|
||||
Add support for the STM32F207ZE chip. From Martin Lederhilger
|
||||
(2013-10-24).
|
||||
* arch/arm/src/stm32/stm32_adc.c and stm32_pwm.c: Fix some bits
|
||||
that should have been cleared in a register. From Martin Lederhilger
|
||||
(2013-10-24).
|
||||
* configs/olimex-stm32-p207 and other files: Support for the Olimex
|
||||
STM32 P207 board added by Martin Lederhilger (2017-10-24).
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
<tr align="center" bgcolor="#e4e4e4">
|
||||
<td>
|
||||
<h1><big><font color="#3c34ec"><i>NuttX README Files</i></font></big></h1>
|
||||
<p>Last Updated: August 31, 2013</p>
|
||||
<p>Last Updated: October 24, 2013</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -131,6 +131,8 @@
|
||||
| | | `- <a href="http://sourceforge.net/p/nuttx/git/ci/master/tree/nuttx/configs/olimex-lpc1766stk/README.txt"><b><i>README.txt</i></b></a>
|
||||
| | |- olimex-lpc2378/
|
||||
| | | `- <a href="http://sourceforge.net/p/nuttx/git/ci/master/tree/nuttx/configs/olimex-lpc2378/README.txt"><b><i>README.txt</i></b></a>
|
||||
| | |- olimex-stm32-p207/
|
||||
| | | `- <a href="http://sourceforge.net/p/nuttx/git/ci/master/tree/nuttx/configs/olimex-stm32-p207/README.txt"><b><i>README.txt</i></b></a>
|
||||
| | |- olimex-strp711/
|
||||
| | | `- <a href="http://sourceforge.net/p/nuttx/git/ci/master/tree/nuttx/configs/olimex-strp711/README.txt"><b><i>README.txt</i></b></a>
|
||||
| | |- open1788/
|
||||
|
@ -1059,6 +1059,8 @@ nuttx
|
||||
| | `- README.txt
|
||||
| |- olimex-lpc2378/
|
||||
| | `- README.txt
|
||||
| |- olimex-stm32-p207/
|
||||
| | `- README.txt
|
||||
| |- olimex-strp711/
|
||||
| | `- README.txt
|
||||
| |- open1788/
|
||||
|
@ -391,6 +391,17 @@ config ARCH_BOARD_OLIMEX_STM32P107
|
||||
Linux or Cygwin. See the http://www.olimex.com for further information. This
|
||||
board features the STMicro STM32F107VC MCU
|
||||
|
||||
config ARCH_BOARD_OLIMEX_STM32P207
|
||||
bool "Olimex STM32 P207 board"
|
||||
depends on ARCH_CHIP_STM32F207ZE
|
||||
select ARCH_HAVE_LEDS
|
||||
select ARCH_HAVE_BUTTONS
|
||||
select ARCH_HAVE_IRQBUTTONS
|
||||
---help---
|
||||
This port uses the Olimex STM32 P207 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 STM32F207ZE MCU
|
||||
|
||||
config ARCH_BOARD_OPEN1788
|
||||
bool "Wave Share Open1788"
|
||||
depends on ARCH_CHIP_LPC1788
|
||||
@ -829,6 +840,7 @@ config ARCH_BOARD
|
||||
default "olimex-lpc1766stk" if ARCH_BOARD_LPC1766STK
|
||||
default "olimex-lpc2378" if ARCH_BOARD_OLIMEXLPC2378
|
||||
default "olimex-stm32-p107" if ARCH_BOARD_OLIMEX_STM32P107
|
||||
default "olimex-stm32-p207" if ARCH_BOARD_OLIMEX_STM32P207
|
||||
default "olimex-strp711" if ARCH_BOARD_OLIMEX_STRP711
|
||||
default "open1788" if ARCH_BOARD_OPEN1788
|
||||
default "p112" if ARCH_BOARD_P112
|
||||
@ -1043,6 +1055,9 @@ endif
|
||||
if ARCH_BOARD_OLIMEX_STM32P107
|
||||
source "configs/olimex-stm32-p107/Kconfig"
|
||||
endif
|
||||
if ARCH_BOARD_OLIMEX_STM32P207
|
||||
source "configs/olimex-stm32-p207/Kconfig"
|
||||
endif
|
||||
if ARCH_BOARD_OLIMEX_STRP711
|
||||
source "configs/olimex-strp711/Kconfig"
|
||||
endif
|
||||
|
@ -1892,8 +1892,12 @@ configs/olimex-lpc2378
|
||||
configs/olimex-stm32-p107
|
||||
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
|
||||
for further information. Contributed by Max Holtzberg. STATUS: Configurations
|
||||
for the basic OS test and NSH are available and verified.
|
||||
for further information. Contributed by Max Holtzberg.
|
||||
|
||||
configs/olimex-stm32-p207
|
||||
This port uses the Olimex STM32-P207 board (STM32F207ZE) and a GNU arm-nuttx-elf
|
||||
toolchain* under Linux or Cygwin. See the https://www.olimex.com/dev/stm32-p207.html
|
||||
for further information. Contributed by Martin Lederhilger.
|
||||
|
||||
configs/olimex-strp711
|
||||
This port uses the Olimex STR-P711 board and a GNU arm-nuttx-elf toolchain* under
|
||||
|
@ -266,7 +266,7 @@ extern "C" {
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
EXTERN void stm32_boardinitialize(void);
|
||||
void stm32_boardinitialize(void);
|
||||
|
||||
/************************************************************************************
|
||||
* Name: stm32_ledinit, stm32_setled, and stm32_setleds
|
||||
|
@ -103,9 +103,7 @@ ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||
LDFLAGS += -g
|
||||
endif
|
||||
|
||||
|
||||
HOSTCC = gcc
|
||||
HOSTINCLUDES = -I.
|
||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
||||
HOSTLDFLAGS =
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/******************************************************************************
|
||||
* configs/olimex-stm32-p107/src/p207-internal.h
|
||||
* configs/olimex-stm32-p107/src/olimex-stm32-p207.h
|
||||
*
|
||||
* Copyright (C) 2013 Max Holtzberg. All rights reserved.
|
||||
* Author: Max Holtzberg <mholtzberg@uvc-ingenieure.de>
|
||||
@ -32,6 +32,7 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef __CONFIGS_OLIMEX_STM32_P207_SRC_INTERNAL_H
|
||||
#define __CONFIGS_OLIMEX_STM32_P207_SRC_INTERNAL_H
|
||||
|
||||
@ -47,7 +48,7 @@
|
||||
* Definitions
|
||||
******************************************************************************/
|
||||
|
||||
/* Olimex-STM32-P207 GPIOs **************************************************************************/
|
||||
/* Olimex-STM32-P207 GPIOs ****************************************************/
|
||||
/* LEDs */
|
||||
|
||||
#define GPIO_LED1 (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
|
||||
@ -96,33 +97,34 @@
|
||||
* Public Functions
|
||||
************************************************************************************/
|
||||
|
||||
/****************************************************************************************************
|
||||
/************************************************************************************
|
||||
* Name: stm32_usbinitialize
|
||||
*
|
||||
* Description:
|
||||
* Called from stm32_usbinitialize very early in inialization to setup USB-related
|
||||
* GPIO pins for the STM32F4Discovery board.
|
||||
*
|
||||
****************************************************************************************************/
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_STM32_OTGFS
|
||||
void weak_function stm32_usbinitialize(void);
|
||||
#endif
|
||||
|
||||
/****************************************************************************************************
|
||||
/************************************************************************************
|
||||
* Name: stm32_usbhost_initialize
|
||||
*
|
||||
* Description:
|
||||
* Called at application startup time to initialize the USB host functionality. This function will
|
||||
* start a thread that will monitor for device connection/disconnection events.
|
||||
* Called at application startup time to initialize the USB host functionality.
|
||||
* This function will start a thread that will monitor for device connection/
|
||||
* disconnection events.
|
||||
*
|
||||
****************************************************************************************************/
|
||||
************************************************************************************/
|
||||
|
||||
#if defined(CONFIG_STM32_OTGFS) && defined(CONFIG_USBHOST)
|
||||
int stm32_usbhost_initialize(void);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
/************************************************************************************
|
||||
* Name: nsh_archinitialize
|
||||
*
|
||||
* Description:
|
||||
@ -135,32 +137,31 @@ int stm32_usbhost_initialize(void);
|
||||
* CONFIG_NSH_ARCHINIT=n :
|
||||
* Called from board_initialize().
|
||||
*
|
||||
****************************************************************************/
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NSH_LIBRARY
|
||||
int nsh_archinitialize(void);
|
||||
#endif
|
||||
|
||||
|
||||
/****************************************************************************************************
|
||||
/************************************************************************************
|
||||
* Name: stm32_adc_initialize
|
||||
*
|
||||
* Description:
|
||||
* Called at application startup time to initialize the ADC functionality.
|
||||
*
|
||||
****************************************************************************************************/
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ADC
|
||||
int stm32_adc_initialize(void);
|
||||
#endif
|
||||
|
||||
/****************************************************************************************************
|
||||
/************************************************************************************
|
||||
* Name: stm32_can_initialize
|
||||
*
|
||||
* Description:
|
||||
* Called at application startup time to initialize the CAN functionality.
|
||||
*
|
||||
****************************************************************************************************/
|
||||
************************************************************************************/
|
||||
|
||||
#if defined(CONFIG_CAN) && (defined(CONFIG_STM32_CAN1) || defined(CONFIG_STM32_CAN2))
|
||||
int stm32_can_initialize(void);
|
@ -46,7 +46,7 @@
|
||||
#include <arch/board/board.h>
|
||||
#include "chip.h"
|
||||
#include "stm32_adc.h"
|
||||
#include "p207-internal.h"
|
||||
#include "olimex-stm32-p207.h"
|
||||
|
||||
#ifdef CONFIG_ADC
|
||||
|
||||
@ -54,7 +54,7 @@
|
||||
* Definitions
|
||||
************************************************************************************/
|
||||
|
||||
/* Configuration ************************************************************/
|
||||
/* Configuration ********************************************************************/
|
||||
/* Up to 3 ADC interfaces are supported */
|
||||
|
||||
#if STM32_NADC < 3
|
||||
@ -117,13 +117,13 @@ int adc_devinit(void)
|
||||
return stm32_adc_initialize();
|
||||
}
|
||||
|
||||
/****************************************************************************************************
|
||||
/************************************************************************************
|
||||
* Name: stm32_adc_initialize
|
||||
*
|
||||
* Description:
|
||||
* Called at application startup time to initialize the ADC functionality.
|
||||
*
|
||||
****************************************************************************************************/
|
||||
************************************************************************************/
|
||||
|
||||
int stm32_adc_initialize(void)
|
||||
{
|
||||
|
@ -45,7 +45,7 @@
|
||||
#include <debug.h>
|
||||
#include <arch/board/board.h>
|
||||
#include "stm32.h"
|
||||
#include "p207-internal.h"
|
||||
#include "olimex-stm32-p207.h"
|
||||
|
||||
#ifdef CONFIG_ARCH_LEDS
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
||||
#include <nuttx/arch.h>
|
||||
#include <debug.h>
|
||||
#include <arch/board/board.h>
|
||||
#include "p207-internal.h"
|
||||
#include "olimex-stm32-p207.h"
|
||||
|
||||
/************************************************************************************
|
||||
* Definitions
|
||||
@ -92,7 +92,6 @@ void stm32_boardinitialize(void)
|
||||
#ifdef CONFIG_ARCH_BUTTONS
|
||||
up_buttoninit();
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
@ -119,7 +118,5 @@ void board_initialize(void)
|
||||
#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_NSH_ARCHINIT)
|
||||
nsh_archinitialize();
|
||||
#endif
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -41,12 +41,12 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <arch/board/board.h>
|
||||
#include "p207-internal.h"
|
||||
#include "olimex-stm32-p207.h"
|
||||
|
||||
#ifdef CONFIG_ARCH_BUTTONS
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
@ -110,20 +110,41 @@ uint8_t up_buttons(void)
|
||||
uint8_t ret = 0;
|
||||
|
||||
/* Check that state of each key */
|
||||
if(!stm32_gpioread(g_buttons[BUTTON_TAMPER]))
|
||||
|
||||
if (!stm32_gpioread(g_buttons[BUTTON_TAMPER]))
|
||||
{
|
||||
ret |= BUTTON_TAMPER_BIT;
|
||||
if(stm32_gpioread(g_buttons[BUTTON_WKUP]))
|
||||
}
|
||||
|
||||
if (stm32_gpioread(g_buttons[BUTTON_WKUP]))
|
||||
{
|
||||
ret |= BUTTON_WKUP_BIT;
|
||||
if(stm32_gpioread(g_buttons[BUTTON_RIGHT]))
|
||||
}
|
||||
|
||||
if (stm32_gpioread(g_buttons[BUTTON_RIGHT]))
|
||||
{
|
||||
ret |= BUTTON_RIGHT_BIT;
|
||||
if(stm32_gpioread(g_buttons[BUTTON_UP]))
|
||||
}
|
||||
|
||||
if (stm32_gpioread(g_buttons[BUTTON_UP]))
|
||||
{
|
||||
ret |= BUTTON_UP_BIT;
|
||||
if(stm32_gpioread(g_buttons[BUTTON_LEFT]))
|
||||
}
|
||||
|
||||
if (stm32_gpioread(g_buttons[BUTTON_LEFT]))
|
||||
{
|
||||
ret |= BUTTON_LEFT_BIT;
|
||||
if(stm32_gpioread(g_buttons[BUTTON_DOWN]))
|
||||
}
|
||||
|
||||
if (stm32_gpioread(g_buttons[BUTTON_DOWN]))
|
||||
{
|
||||
ret |= BUTTON_DOWN_BIT;
|
||||
if(stm32_gpioread(g_buttons[BUTTON_CENTER]))
|
||||
}
|
||||
|
||||
if (stm32_gpioread(g_buttons[BUTTON_CENTER]))
|
||||
{
|
||||
ret |= BUTTON_CENTER_BIT;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
@ -162,6 +183,7 @@ xcpt_t up_irqbutton(int id, xcpt_t irqhandler)
|
||||
{
|
||||
oldhandler = stm32_gpiosetevent(g_buttons[id], true, true, true, irqhandler);
|
||||
}
|
||||
|
||||
return oldhandler;
|
||||
}
|
||||
#endif
|
||||
|
@ -46,7 +46,7 @@
|
||||
#include <arch/board/board.h>
|
||||
#include "stm32.h"
|
||||
#include "stm32_can.h"
|
||||
#include "p207-internal.h"
|
||||
#include "olimex-stm32-p207.h"
|
||||
|
||||
#if defined(CONFIG_CAN) && (defined(CONFIG_STM32_CAN1) || defined(CONFIG_STM32_CAN2))
|
||||
|
||||
|
@ -152,4 +152,3 @@ void up_cxxinitialize(void)
|
||||
}
|
||||
|
||||
#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */
|
||||
|
||||
|
@ -54,7 +54,7 @@
|
||||
#endif
|
||||
|
||||
#include "stm32.h"
|
||||
#include "p207-internal.h"
|
||||
#include "olimex-stm32-p207.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-Processor Definitions
|
||||
|
@ -51,7 +51,7 @@
|
||||
#include <nuttx/usb/usbdev_trace.h>
|
||||
#include "stm32.h"
|
||||
#include "stm32_otgfs.h"
|
||||
#include "p207-internal.h"
|
||||
#include "olimex-stm32-p207.h"
|
||||
|
||||
#ifdef CONFIG_STM32_OTGFS
|
||||
|
||||
@ -287,6 +287,3 @@ void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume)
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_STM32_OTGFS */
|
||||
|
||||
|
||||
|
||||
|
@ -45,7 +45,7 @@
|
||||
#include <debug.h>
|
||||
#include <arch/board/board.h>
|
||||
#include "stm32.h"
|
||||
#include "p207-internal.h"
|
||||
#include "olimex-stm32-p207.h"
|
||||
|
||||
#ifndef CONFIG_ARCH_LEDS
|
||||
|
||||
@ -79,17 +79,14 @@ static uint32_t g_ledcfg[BOARD_NLEDS] =
|
||||
* Private Function Protototypes
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
Loading…
Reference in New Issue
Block a user