Commit 32ef59a4 authored by Nathan Tsoi's avatar Nathan Tsoi Committed by Kumar Gala
Browse files

boards: arm: add support for STM32F0DISCOVERY



Support the ST STM32F0DISCOVERY board with STM32F051R8T6 SoC

Tested with:
  - `samples/basic/blinky`
  - `samples/basic/button`

Includes flash config in `stm32f0_disco.rst` for use with mcuboot

Signed-off-by: default avatarNathan Tsoi <nathan@vertile.com>
parent 28758fe9
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
+10 −0
Original line number Diff line number Diff line
# Kconfig - STM32F0DISCOVERY development board with STM32F051R8 MCU configuration
#
# Copyright (c) 2018 Nathan Tsoi <nathan@vertile.com>
#
# SPDX-License-Identifier: Apache-2.0
#

config BOARD_STM32F0_DISCO
	bool "STM32F0DISCOVERY Development Board"
	depends on SOC_STM32F051X8
+20 −0
Original line number Diff line number Diff line
# Kconfig - STM32F0 development board with STM32F051R8T6 MCU
#
# Copyright (c) 2018 Nathan Tsoi <nathan@vertile.com>
#
# SPDX-License-Identifier: Apache-2.0
#

if BOARD_STM32F0_DISCO

config BOARD
	default stm32f0_disco

if UART_CONSOLE

config UART_STM32_PORT_1
	default y

endif # UART_CONSOLE

endif # BOARD_STM32F0_DISCO
+1 −0
Original line number Diff line number Diff line
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
+32 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2018 Nathan Tsoi <nathan@vertile.com>
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#ifndef __INC_BOARD_H
#define __INC_BOARD_H

#include <soc.h>

/* USER push button */
#define USER_PB_GPIO_PORT   "GPIOA"
#define USER_PB_GPIO_PIN    0

/* LD3 green LED */
#define GREEN_LED_GPIO_PORT "GPIOC"
#define GREEN_LED_GPIO_PIN  9

/* LD4 blue LED */
#define BLUE_LED_GPIO_PORT  "GPIOC"
#define BLUE_LED_GPIO_PIN   8

/* Create aliases to make the basic samples work */
#define SW0_GPIO_NAME       USER_PB_GPIO_PORT
#define SW0_GPIO_PIN        USER_PB_GPIO_PIN
#define LED0_GPIO_PORT      GREEN_LED_GPIO_PORT
#define LED0_GPIO_PIN       GREEN_LED_GPIO_PIN
#define LED1_GPIO_PORT      BLUE_LED_GPIO_PORT
#define LED1_GPIO_PIN       BLUE_LED_GPIO_PIN

#endif /* __INC_BOARD_H */
Loading