boards: add initial support for STM3210C-EVAL board with SoC STM32F107VC
Change-Id: Ib120e0088b009d1e07a756470742fb29a606857e Signed-off-by: Adam Podogrocki <adam.podogrocki@rndity.com>
This commit is contained in:
parent
72782f542c
commit
7aeea1a124
20
boards/arm/stm3210c_eval/Kconfig.board
Normal file
20
boards/arm/stm3210c_eval/Kconfig.board
Normal file
|
@ -0,0 +1,20 @@
|
|||
# Kconfig - STM3210C-EVAL board configuration
|
||||
#
|
||||
# Copyright (c) 2016 RnDity Sp. z o.o.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
config BOARD_STM3210C_EVAL
|
||||
bool "STM3210C-EVAL Evaluation Board"
|
||||
depends on SOC_STM32F107XC
|
23
boards/arm/stm3210c_eval/Kconfig.defconfig
Normal file
23
boards/arm/stm3210c_eval/Kconfig.defconfig
Normal file
|
@ -0,0 +1,23 @@
|
|||
# Kconfig - STM3210C-EVAL board configuration
|
||||
#
|
||||
# Copyright (c) 2016 RnDity Sp. z o.o.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
if BOARD_STM3210C_EVAL
|
||||
|
||||
config BOARD
|
||||
default stm3210c_eval
|
||||
|
||||
endif # BOARD_STM3210C_EVAL
|
2
boards/arm/stm3210c_eval/Makefile
Normal file
2
boards/arm/stm3210c_eval/Makefile
Normal file
|
@ -0,0 +1,2 @@
|
|||
# No C files (yet)
|
||||
obj- += dummy.o
|
6
boards/arm/stm3210c_eval/Makefile.board
Normal file
6
boards/arm/stm3210c_eval/Makefile.board
Normal file
|
@ -0,0 +1,6 @@
|
|||
FLASH_SCRIPT = openocd.sh
|
||||
|
||||
OPENOCD_LOAD_CMD = "flash write_image erase ${O}/${KERNEL_BIN_NAME} ${CONFIG_FLASH_BASE_ADDRESS}"
|
||||
OPENOCD_VERIFY_CMD = "verify_image ${O}/${KERNEL_BIN_NAME} ${CONFIG_FLASH_BASE_ADDRESS}"
|
||||
|
||||
export FLASH_SCRIPT OPENOCD_LOAD_CMD OPENOCD_VERIFY_CMD
|
42
boards/arm/stm3210c_eval/board.h
Normal file
42
boards/arm/stm3210c_eval/board.h
Normal file
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* Copyright (c) 2016 RnDity Sp. z o.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __INC_BOARD_H
|
||||
#define __INC_BOARD_H
|
||||
|
||||
#include <soc.h>
|
||||
|
||||
/* User Button. */
|
||||
#define BTN_USER_GPIO_NAME "GPIOB"
|
||||
#define BTN_USER_GPIO_PIN 9
|
||||
|
||||
/* Push button switch 0. Create an alias to tamper button
|
||||
* to make the basic button sample work.
|
||||
*/
|
||||
#define SW0_GPIO_NAME BTN_USER_GPIO_NAME
|
||||
#define SW0_GPIO_PIN BTN_USER_GPIO_PIN
|
||||
|
||||
/* LED 2 */
|
||||
#define LED2_GPIO_NAME "GPIOD"
|
||||
#define LED2_GPIO_PIN 13
|
||||
|
||||
/* LED0. Create an alias to the LED2 to make the basic
|
||||
* blinky sample work.
|
||||
*/
|
||||
#define LED0_GPIO_PORT LED2_GPIO_NAME
|
||||
#define LED0_GPIO_PIN LED2_GPIO_PIN
|
||||
|
||||
#endif /* __INC_BOARD_H */
|
61
boards/arm/stm3210c_eval/stm3210c_eval_defconfig
Normal file
61
boards/arm/stm3210c_eval/stm3210c_eval_defconfig
Normal file
|
@ -0,0 +1,61 @@
|
|||
# Zephyr Kernel Configuration
|
||||
CONFIG_ARM=y
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_SOC_SERIES="stm32f1"
|
||||
CONFIG_SOC_FAMILY="st_stm32"
|
||||
CONFIG_BOARD="stm3210c_eval"
|
||||
CONFIG_SOC_SERIES_STM32F1X=y
|
||||
|
||||
# Platform Configuration
|
||||
CONFIG_SOC_FAMILY_STM32=y
|
||||
CONFIG_SOC_STM32F107XC=y
|
||||
CONFIG_SOC_STM32F10X_CONNECTIVITY_LINE_DEVICE=y
|
||||
CONFIG_BOARD_STM3210C_EVAL=y
|
||||
|
||||
# General Kernel Options
|
||||
CONFIG_CORTEX_M_SYSTICK=y
|
||||
# 72MHz system clock
|
||||
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000
|
||||
|
||||
# Serial Drivers
|
||||
CONFIG_SERIAL=y
|
||||
CONFIG_SERIAL_HAS_DRIVER=y
|
||||
CONFIG_UART_INTERRUPT_DRIVEN=y
|
||||
CONFIG_UART_STM32=y
|
||||
# enable USART2 - passthrough to STLINK v2 connector
|
||||
CONFIG_UART_STM32_PORT_2=y
|
||||
CONFIG_UART_STM32_PORT_2_BAUD_RATE=115200
|
||||
# enable console on this port by default
|
||||
CONFIG_CONSOLE=y
|
||||
CONFIG_UART_CONSOLE=y
|
||||
CONFIG_UART_CONSOLE_ON_DEV_NAME="UART_2"
|
||||
|
||||
# Pinmux Driver
|
||||
CONFIG_PINMUX=y
|
||||
CONFIG_PINMUX_STM32=y
|
||||
|
||||
# GPIO Controller
|
||||
CONFIG_GPIO=y
|
||||
CONFIG_GPIO_STM32=y
|
||||
CONFIG_GPIO_STM32_PORTA=y
|
||||
CONFIG_GPIO_STM32_PORTB=y
|
||||
CONFIG_GPIO_STM32_PORTC=y
|
||||
|
||||
# RCC configuration
|
||||
CONFIG_CLOCK_CONTROL=y
|
||||
CONFIG_CLOCK_CONTROL_STM32F10X=n
|
||||
CONFIG_CLOCK_CONTROL_STM32F10X_CONN_LINE=y
|
||||
CONFIG_CLOCK_STM32F10X_CONN_LINE_SYSCLK_SRC_PLLCLK=y
|
||||
# use PREDIV1 as PLL input
|
||||
CONFIG_CLOCK_STM32F10X_CONN_LINE_PLL_SRC_PREDIV1=y
|
||||
# however, the board does not have an external oscillator, so just use
|
||||
# the 8MHz clock signal coming from integrated STLink
|
||||
CONFIG_CLOCK_STM32F10X_CONN_LINE_PREDIV1_SRC_HSE=y
|
||||
CONFIG_CLOCK_STM32F10X_CONN_LINE_HSE_BYPASS=y
|
||||
# produce 72MHz clock at PLL output
|
||||
CONFIG_CLOCK_STM32F10X_CONN_LINE_PREDIV1=0
|
||||
CONFIG_CLOCK_STM32F10X_CONN_LINE_PLL_MULTIPLIER=9
|
||||
CONFIG_CLOCK_STM32F10X_CONN_LINE_AHB_PRESCALER=0
|
||||
# APB1 clock must not to exceed 36MHz limit
|
||||
CONFIG_CLOCK_STM32F10X_CONN_LINE_APB1_PRESCALER=2
|
||||
CONFIG_CLOCK_STM32F10X_CONN_LINE_APB2_PRESCALER=0
|
12
boards/arm/stm3210c_eval/support/openocd.cfg
Normal file
12
boards/arm/stm3210c_eval/support/openocd.cfg
Normal file
|
@ -0,0 +1,12 @@
|
|||
source [find board/st3210c_eval.cfg]
|
||||
|
||||
$_TARGETNAME configure -event gdb-attach {
|
||||
echo "Debugger attaching: halting execution"
|
||||
reset halt
|
||||
gdb_breakpoint_override hard
|
||||
}
|
||||
|
||||
$_TARGETNAME configure -event gdb-detach {
|
||||
echo "Debugger detaching: resuming execution"
|
||||
resume
|
||||
}
|
|
@ -5,6 +5,7 @@ platforms = qemu_cortex_m3 frdm_k64f arduino_due nucleo_f103rb stm32_mini_a15
|
|||
nrf51_pca10028 nucleo_f401re 96b_carbon nrf51_blenano
|
||||
arduino_101_ble cc3200_launchxl quark_se_c1000_ble bbc_microbit
|
||||
v2m_beetle nucleo_l476rg nrf52840_pca10056 nucleo_f411re
|
||||
stm3210c_eval
|
||||
supported_toolchains = zephyr gccarmemb
|
||||
|
||||
[qemu_cortex_m3]
|
||||
|
|
Loading…
Reference in a new issue