Skip to content

Commit 5662be2

Browse files
Add MKS Robin Nano board support and remove custom plank board files
1 parent ef7d62d commit 5662be2

17 files changed

+137
-156
lines changed

boards/common/example_runner.board.cmake

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Copyright (c) 2021 Nordic Semiconductor ASA
22
# SPDX-License-Identifier: Apache-2.0
33

4-
config BOARD_CUSTOM_PLANK
5-
select SOC_NRF52840_QIAA
4+
config BOARD_ROBIN_NANO
5+
select SOC_STM32F407XG

boards/mks/robin_nano/board.cmake

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Copyright (c) 2021 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
board_runner_args(jlink "--device=STM32F407VG" "--speed=4000")
5+
6+
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
7+
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)

boards/mks/robin_nano/board.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
board:
2+
name: robin_nano
3+
vendor: mks
4+
socs:
5+
- name: stm32f407xx
Binary file not shown.
Binary file not shown.

boards/mks/robin_nano/robin_nano.dts

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
/*
2+
* Copyright (c) 2021 Nordic Semiconductor ASA
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
/dts-v1/;
7+
#include <st/f4/stm32f407Xg.dtsi>
8+
#include <st/f4/stm32f407v(e-g)tx-pinctrl.dtsi>
9+
10+
/ {
11+
model = "MKS Robin Nano board";
12+
compatible = "mks,robin_nano";
13+
14+
chosen {
15+
zephyr,console = &usart3;
16+
zephyr,shell-uart = &usart3;
17+
zephyr,sram = &sram0;
18+
zephyr,flash = &flash0;
19+
};
20+
21+
leds {
22+
compatible = "gpio-leds";
23+
tf_led: led_0 {
24+
gpios = <&gpiod 12 GPIO_ACTIVE_HIGH>;
25+
label = "TF Card detection LED";
26+
};
27+
};
28+
29+
aliases {
30+
led0 = &tf_led;
31+
};
32+
};
33+
34+
&clk_lsi {
35+
status = "okay";
36+
};
37+
38+
&clk_hse {
39+
clock-frequency = <DT_FREQ_M(8)>;
40+
status = "okay";
41+
};
42+
43+
&pll {
44+
div-m = <8>;
45+
mul-n = <336>;
46+
div-p = <2>;
47+
div-q = <7>;
48+
clocks = <&clk_hse>;
49+
status = "okay";
50+
};
51+
52+
&rcc {
53+
clocks = <&pll>;
54+
clock-frequency = <DT_FREQ_M(168)>;
55+
ahb-prescaler = <1>;
56+
apb1-prescaler = <4>;
57+
apb2-prescaler = <2>;
58+
};
59+
60+
&usart1 {
61+
pinctrl-0 = <&usart1_tx_pb6 &usart1_rx_pb7>;
62+
pinctrl-names = "default";
63+
current-speed = <115200>;
64+
status = "okay";
65+
};
66+
67+
&usart2 {
68+
pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>;
69+
pinctrl-names = "default";
70+
current-speed = <115200>;
71+
status = "okay";
72+
};
73+
74+
&usart3 {
75+
pinctrl-0 = <&usart3_tx_pb10 &usart3_rx_pb11>;
76+
pinctrl-names = "default";
77+
current-speed = <115200>;
78+
status = "okay";
79+
};
80+
81+
zephyr_udc0: &usbotg_fs {
82+
pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>;
83+
pinctrl-names = "default";
84+
status = "okay";
85+
};
86+
87+
&rtc {
88+
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x10000000>,
89+
<&rcc STM32_SRC_LSI RTC_SEL(2)>;
90+
status = "okay";
91+
};
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Enable MPU
2+
CONFIG_ARM_MPU=y
3+
4+
# Enable HW stack protection
5+
CONFIG_HW_STACK_PROTECTION=y
6+
7+
CONFIG_SERIAL=y
8+
9+
# console
10+
CONFIG_CONSOLE=y
11+
CONFIG_UART_CONSOLE=y
12+
13+
# enable GPIO
14+
CONFIG_GPIO=y
15+
16+
# Enable Clocks
17+
CONFIG_CLOCK_CONTROL=y
18+
19+
# enable pin controller
20+
CONFIG_PINCTRL=y
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
source [find board/stm32f4discovery.cfg]
2+
3+
$_TARGETNAME configure -event gdb-attach {
4+
echo "Debugger attaching: halting execution"
5+
reset halt
6+
gdb_breakpoint_override hard
7+
}
8+
9+
$_TARGETNAME configure -event gdb-detach {
10+
echo "Debugger detaching: resuming execution"
11+
resume
12+
}

boards/vendor/custom_plank/README.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)