summaryrefslogtreecommitdiff
path: root/boards
diff options
context:
space:
mode:
authorAdam Podogrocki <adam.podogrocki@rndity.com>2016-10-28 12:27:22 +0200
committerKumar Gala <kumar.gala@linaro.org>2017-01-23 15:15:53 -0600
commitd8992f576e35f92d5327ab01a9d6a10e5bae9dba (patch)
tree1c60d0b655e263fd3d513aabd2b6089bc51515c2 /boards
parent5f2fa051a65e5d5b73922c3d38972ea34f21334b (diff)
boards: add initial support for STM32373C-EVAL with SoC STM32F373VC
Change-Id: Iec92b0c7e2c244bd82ee9c318f6f2cb3ed2d7397 Signed-off-by: Adam Podogrocki <adam.podogrocki@rndity.com>
Diffstat (limited to 'boards')
-rw-r--r--boards/arm/stm32373c_eval/Kconfig.board20
-rw-r--r--boards/arm/stm32373c_eval/Kconfig.defconfig23
-rw-r--r--boards/arm/stm32373c_eval/Makefile2
-rw-r--r--boards/arm/stm32373c_eval/Makefile.board6
-rw-r--r--boards/arm/stm32373c_eval/board.h42
-rw-r--r--boards/arm/stm32373c_eval/stm32373c_eval_defconfig62
-rw-r--r--boards/arm/stm32373c_eval/support/openocd.cfg12
7 files changed, 167 insertions, 0 deletions
diff --git a/boards/arm/stm32373c_eval/Kconfig.board b/boards/arm/stm32373c_eval/Kconfig.board
new file mode 100644
index 000000000..99255be5b
--- /dev/null
+++ b/boards/arm/stm32373c_eval/Kconfig.board
@@ -0,0 +1,20 @@
+# Kconfig - STM32373C-EVAL evaluation board configuration
+#
+# Copyright (c) 2016 Open-RnD 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_STM32373C_EVAL
+ bool "STM32373C_EVAL Evaluation Board"
+ depends on SOC_STM32F373XC
diff --git a/boards/arm/stm32373c_eval/Kconfig.defconfig b/boards/arm/stm32373c_eval/Kconfig.defconfig
new file mode 100644
index 000000000..83a5e0c58
--- /dev/null
+++ b/boards/arm/stm32373c_eval/Kconfig.defconfig
@@ -0,0 +1,23 @@
+# Kconfig - STM32373C-EVAL evaluation board configuration
+#
+# Copyright (c) 2016 Open-RnD 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_STM32373C_EVAL
+
+config BOARD
+ default stm32373c_eval
+
+endif # BOARD_STM32373C_EVAL
diff --git a/boards/arm/stm32373c_eval/Makefile b/boards/arm/stm32373c_eval/Makefile
new file mode 100644
index 000000000..c925263c4
--- /dev/null
+++ b/boards/arm/stm32373c_eval/Makefile
@@ -0,0 +1,2 @@
+# No C files (yet)
+obj- += dummy.o
diff --git a/boards/arm/stm32373c_eval/Makefile.board b/boards/arm/stm32373c_eval/Makefile.board
new file mode 100644
index 000000000..7d02aa388
--- /dev/null
+++ b/boards/arm/stm32373c_eval/Makefile.board
@@ -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
diff --git a/boards/arm/stm32373c_eval/board.h b/boards/arm/stm32373c_eval/board.h
new file mode 100644
index 000000000..69accaf85
--- /dev/null
+++ b/boards/arm/stm32373c_eval/board.h
@@ -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>
+
+/* Key button. */
+#define BTN_KEY_GPIO_NAME "GPIOA"
+#define BTN_KEY_GPIO_PIN 2
+
+/* LED 2 */
+#define LED2_GPIO_NAME "GPIOC"
+#define LED2_GPIO_PIN 1
+
+/* Push button switch 0. Create an alias to key button
+ * to make the basic button sample work.
+ */
+#define SW0_GPIO_NAME BTN_KEY_GPIO_NAME
+#define SW0_GPIO_PIN BTN_KEY_GPIO_PIN
+
+/* 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 */
diff --git a/boards/arm/stm32373c_eval/stm32373c_eval_defconfig b/boards/arm/stm32373c_eval/stm32373c_eval_defconfig
new file mode 100644
index 000000000..c673c6e4e
--- /dev/null
+++ b/boards/arm/stm32373c_eval/stm32373c_eval_defconfig
@@ -0,0 +1,62 @@
+# Zephyr Kernel Configuration
+CONFIG_ARM=y
+CONFIG_ARCH="arm"
+CONFIG_SOC="stm32f373xc"
+CONFIG_SOC_SERIES="stm32f3"
+CONFIG_SOC_FAMILY="st_stm32"
+CONFIG_BOARD="stm32373c_eval"
+CONFIG_SOC_SERIES_STM32F3X=y
+
+# Platform Configuration
+CONFIG_SOC_FAMILY_STM32=y
+CONFIG_SOC_STM32F373XC=y
+CONFIG_BOARD_STM32373C_EVAL=y
+
+# ARM Options
+CONFIG_CPU_HAS_FPU=y
+
+# Floating Point Options
+CONFIG_FLOAT=y
+
+# General Kernel Options
+CONFIG_CORTEX_M_SYSTICK=y
+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_NAME="UART_2"
+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
+CONFIG_GPIO_STM32_PORTD=y
+CONFIG_GPIO_STM32_PORTE=y
+
+# RCC configuration
+CONFIG_CLOCK_CONTROL=y
+CONFIG_CLOCK_CONTROL_STM32F3X=y
+CONFIG_CLOCK_CONTROL_STM32F3X_DEVICE_INIT_PRIORITY=1
+CONFIG_CLOCK_STM32F3X_SYSCLK_SRC_PLL=y
+CONFIG_CLOCK_STM32F3X_PLL_SRC_HSE=y
+CONFIG_CLOCK_STM32F3X_PLL_PREDIV=0
+CONFIG_CLOCK_STM32F3X_PLL_MULTIPLIER=9
+CONFIG_CLOCK_STM32F3X_AHB_PRESCALER=0
+CONFIG_CLOCK_STM32F3X_APB1_PRESCALER=2
+CONFIG_CLOCK_STM32F3X_APB2_PRESCALER=2
diff --git a/boards/arm/stm32373c_eval/support/openocd.cfg b/boards/arm/stm32373c_eval/support/openocd.cfg
new file mode 100644
index 000000000..8aec0b4f1
--- /dev/null
+++ b/boards/arm/stm32373c_eval/support/openocd.cfg
@@ -0,0 +1,12 @@
+source [find board/st_nucleo_f3.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
+}