feat(boards): 添加 atguigu mini_keyboard 开发板支持
- 添加 nrf52840_qiaa SoC 配置支持 - 配置 JLink 和 pyOCD 调试器参数 - 定义开发板引脚控制和设备树配置 - 设置 Flash 分区和内存布局 - 配置 LED 灯和 GPIO 控制器 - 添加预编译设备树配置选项
This commit is contained in:
2
boards/atguigu/mini_keyboard/Kconfig.mini_keyboard
Normal file
2
boards/atguigu/mini_keyboard/Kconfig.mini_keyboard
Normal file
@@ -0,0 +1,2 @@
|
||||
config BOARD_MINI_KEYBOARD
|
||||
select SOC_NRF52840_QIAA
|
||||
9
boards/atguigu/mini_keyboard/board.cmake
Normal file
9
boards/atguigu/mini_keyboard/board.cmake
Normal file
@@ -0,0 +1,9 @@
|
||||
set(OPENOCD_NRF5_SUBFAMILY "nrf52")
|
||||
board_runner_args(jlink "--device=nRF52840_xxAA" "--speed=4000")
|
||||
board_runner_args(pyocd "--target=nrf52840" "--frequency=4000000")
|
||||
|
||||
include(${ZEPHYR_BASE}/boards/common/nrfutil.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd-nrf5.board.cmake)
|
||||
5
boards/atguigu/mini_keyboard/board.yml
Normal file
5
boards/atguigu/mini_keyboard/board.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
board:
|
||||
name: mini_keyboard
|
||||
vendor: atguigu
|
||||
socs:
|
||||
- name: nrf52840
|
||||
2
boards/atguigu/mini_keyboard/mini_keyboard-pinctrl.dtsi
Normal file
2
boards/atguigu/mini_keyboard/mini_keyboard-pinctrl.dtsi
Normal file
@@ -0,0 +1,2 @@
|
||||
&pinctrl {
|
||||
};
|
||||
61
boards/atguigu/mini_keyboard/mini_keyboard.dts
Normal file
61
boards/atguigu/mini_keyboard/mini_keyboard.dts
Normal file
@@ -0,0 +1,61 @@
|
||||
/dts-v1/;
|
||||
#include <nordic/nrf52840_qiaa.dtsi>
|
||||
#include "mini_keyboard-pinctrl.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Mini keyboard";
|
||||
compatible = "atguigu,mini-keyboard";
|
||||
|
||||
chosen {
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
zephyr,code-partition = &slot0_partition;
|
||||
};
|
||||
|
||||
aliases {
|
||||
led0 = &myled0;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
myled0: led_0 {
|
||||
gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&flash0 {
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
boot_partition: partition@0 {
|
||||
label = "mcuboot";
|
||||
reg = <0x00000000 DT_SIZE_K(48)>;
|
||||
};
|
||||
|
||||
slot0_partition: partition@c000 {
|
||||
label = "image-0";
|
||||
reg = <0x0000c000 DT_SIZE_K(472)>;
|
||||
};
|
||||
|
||||
slot1_partition: partition@82000 {
|
||||
label = "image-1";
|
||||
reg = <0x00082000 DT_SIZE_K(472)>;
|
||||
};
|
||||
|
||||
storage_partition: partition@f8000 {
|
||||
label = "storage";
|
||||
reg = <0x000f8000 DT_SIZE_K(32)>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gpio1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpiote {
|
||||
status = "okay";
|
||||
};
|
||||
10
boards/atguigu/mini_keyboard/mini_keyboard.yaml
Normal file
10
boards/atguigu/mini_keyboard/mini_keyboard.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
identifier: mini_keyboard/nrf52840
|
||||
name: Mini keyboard
|
||||
vendor: atguigu
|
||||
type: mcu
|
||||
arch: arm
|
||||
ram: 256
|
||||
flash: 1024
|
||||
toolchain:
|
||||
- zephyr
|
||||
supported: []
|
||||
2
boards/atguigu/mini_keyboard/mini_keyboard_defconfig
Normal file
2
boards/atguigu/mini_keyboard/mini_keyboard_defconfig
Normal file
@@ -0,0 +1,2 @@
|
||||
CONFIG_ARM_MPU=y
|
||||
CONFIG_HW_STACK_PROTECTION=y
|
||||
2
boards/atguigu/mini_keyboard/pre_dt_board.cmake
Normal file
2
boards/atguigu/mini_keyboard/pre_dt_board.cmake
Normal file
@@ -0,0 +1,2 @@
|
||||
# Suppress "unique_unit_address_if_enabled" to handle some overlaps
|
||||
list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled")
|
||||
Reference in New Issue
Block a user