boards: arm: add gd32l233r_eval board
Add initial support for gd32l233r_eval board. Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
This commit is contained in:
parent
2b75aa1f8d
commit
9eabd992e1
9 changed files with 297 additions and 0 deletions
6
boards/arm/gd32l233r_eval/Kconfig.board
Normal file
6
boards/arm/gd32l233r_eval/Kconfig.board
Normal file
|
@ -0,0 +1,6 @@
|
|||
# Copyright (c) 2022 BrainCo Inc.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config BOARD_GD32L233R_EVAL
|
||||
bool "GigaDevice GD32L233R Evaluation Kit"
|
||||
depends on SOC_GD32L233
|
9
boards/arm/gd32l233r_eval/Kconfig.defconfig
Normal file
9
boards/arm/gd32l233r_eval/Kconfig.defconfig
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Copyright (c) 2022 BrainCo Inc.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if BOARD_GD32L233R_EVAL
|
||||
|
||||
config BOARD
|
||||
default "gd32l233r_eval"
|
||||
|
||||
endif # BOARD_GD32L233R_EVAL
|
5
boards/arm/gd32l233r_eval/board.cmake
Normal file
5
boards/arm/gd32l233r_eval/board.cmake
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Copyright (c) 2022 BrainCo Inc.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
board_runner_args(jlink "--device=GD32L233RCT6" "--iface=SWD" "--speed=4000")
|
||||
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
|
BIN
boards/arm/gd32l233r_eval/doc/img/gd32l233r_eval.jpg
Normal file
BIN
boards/arm/gd32l233r_eval/doc/img/gd32l233r_eval.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 76 KiB |
142
boards/arm/gd32l233r_eval/doc/index.rst
Normal file
142
boards/arm/gd32l233r_eval/doc/index.rst
Normal file
|
@ -0,0 +1,142 @@
|
|||
.. _gd32l233r_eval:
|
||||
|
||||
GigaDevice GD32L233R-EVA
|
||||
#########################
|
||||
|
||||
Overview
|
||||
********
|
||||
|
||||
The GD32L233R-EVAL board is a hardware platform that enables design and debug
|
||||
of the GigaDevice GD32L233 Cortex-M23 Low Power MCU.
|
||||
|
||||
The GD32RCT6 features a single-core ARM Cortex-M4F MCU which can run up
|
||||
to 64-MHz with flash accesses zero wait states, 256kB of Flash, 32kB of
|
||||
SRAM and 59 GPIOs.
|
||||
|
||||
.. image:: img/gd32l233r_eval.jpg
|
||||
:align: center
|
||||
:alt: gd32l233r_eval
|
||||
|
||||
Hardware
|
||||
********
|
||||
|
||||
- GD32L233RCT6 MCU
|
||||
- AT24C02C 2Kb EEPROM
|
||||
- 4 x User LEDs
|
||||
- 2 x User Push buttons
|
||||
- 1 x USART (Mini-USB)
|
||||
- 1 x POT connected to an ADC input
|
||||
- Headphone interface
|
||||
- SLCD segment code screen
|
||||
- GD-Link on board programmer
|
||||
- J-Link/SWD connector
|
||||
|
||||
For more information about the GD32L233 SoC and GD32L233R-EVAL board:
|
||||
|
||||
- `GigaDevice Cortex-M23 Low Power SoC Website`_
|
||||
- `GD32L233xx Datasheet`_
|
||||
- `GD32L23x User Manual`_
|
||||
- `GD32L23x Demo Suites`_
|
||||
|
||||
Supported Features
|
||||
==================
|
||||
|
||||
The board configuration supports the following hardware features:
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
|
||||
* - Peripheral
|
||||
- Kconfig option
|
||||
- Devicetree compatible
|
||||
* - EXTI
|
||||
- :kconfig:option:`CONFIG_GD32_EXTI`
|
||||
- :dtcompatible:`gd,gd32-exti`
|
||||
* - GPIO
|
||||
- :kconfig:option:`CONFIG_GPIO`
|
||||
- :dtcompatible:`gd,gd32-gpio`
|
||||
* - NVIC
|
||||
- N/A
|
||||
- :dtcompatible:`arm,v8m-nvic`
|
||||
* - SYSTICK
|
||||
- N/A
|
||||
- N/A
|
||||
* - USART
|
||||
- :kconfig:option:`CONFIG_SERIAL`
|
||||
- :dtcompatible:`gd,gd32-usart`
|
||||
* - PINMUX
|
||||
- :kconfig:option:`CONFIG_PINCTRL`
|
||||
- :dtcompatible:`gd,gd32-pinctrl-af`
|
||||
* - ADC
|
||||
- :kconfig:option:`CONFIG_ADC`
|
||||
- :dtcompatible:`gd,gd32-adc`
|
||||
|
||||
Serial Port
|
||||
===========
|
||||
|
||||
The GD32L233R-EVAL board has one serial communication port. The default port
|
||||
is USART1 with TX connected at PA2 and RX at PA3. USART1 have connect to a
|
||||
CH04E serial connector with Mini-USB.
|
||||
|
||||
Programming and Debugging
|
||||
*************************
|
||||
|
||||
Using J-Link
|
||||
=============
|
||||
|
||||
The GD32L233R-EVAL includes an onboard programmer/debugger (GD-Link) which
|
||||
allows flash programming and debugging over USB. There is also a SWD header
|
||||
which can be used with tools like Segger J-Link(latest version required).
|
||||
|
||||
#. Build the Zephyr kernel and the :ref:`hello_world` sample application:
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/hello_world
|
||||
:board: gd32l233r_eval
|
||||
:goals: build
|
||||
:compact:
|
||||
|
||||
#. Run your favorite terminal program to listen for output. On Linux the
|
||||
terminal should be something like ``/dev/ttyUSB0``. For example:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
minicom -D /dev/ttyUSB0 -o
|
||||
|
||||
The -o option tells minicom not to send the modem initialization
|
||||
string. Connection should be configured as follows:
|
||||
|
||||
- Speed: 115200
|
||||
- Data: 8 bits
|
||||
- Parity: None
|
||||
- Stop bits: 1
|
||||
|
||||
#. To flash an image:
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/hello_world
|
||||
:board: gd32l233r_eval
|
||||
:goals: flash
|
||||
:compact:
|
||||
|
||||
You should see "Hello World! gd32l233r_eval" in your terminal.
|
||||
|
||||
#. To debug an image:
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/hello_world
|
||||
:board: gd32l233r_eval
|
||||
:goals: debug
|
||||
:compact:
|
||||
|
||||
.. _GigaDevice Cortex-M23 Low Power SoC Website:
|
||||
https://www.gigadevice.com/products/microcontrollers/gd32/arm-cortex-m23/low-power-line/
|
||||
|
||||
.. _GD32L233xx Datasheet:
|
||||
https://gd32mcu.com/download/down/document_id/289/path_type/1
|
||||
|
||||
.. _GD32L23x User Manual:
|
||||
https://gd32mcu.com/download/down/document_id/293/path_type/1
|
||||
|
||||
.. _GD32L23x Demo Suites:
|
||||
https://gd32mcu.com/download/down/document_id/292/path_type/1
|
20
boards/arm/gd32l233r_eval/gd32l233r_eval-pinctrl.dtsi
Normal file
20
boards/arm/gd32l233r_eval/gd32l233r_eval-pinctrl.dtsi
Normal file
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* Copyright (c) 2022 BrainCo Inc.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <dt-bindings/pinctrl/gd32l233r(b-c)xx-pinctrl.h>
|
||||
|
||||
&pinctrl {
|
||||
usart1_default: usart1_default {
|
||||
group1 {
|
||||
pinmux = <USART1_TX_PA2>, <USART1_RX_PA3>;
|
||||
};
|
||||
};
|
||||
|
||||
adc0_default: adc0_default {
|
||||
group1 {
|
||||
pinmux = <ADC_IN1_PA1>;
|
||||
};
|
||||
};
|
||||
};
|
92
boards/arm/gd32l233r_eval/gd32l233r_eval.dts
Normal file
92
boards/arm/gd32l233r_eval/gd32l233r_eval.dts
Normal file
|
@ -0,0 +1,92 @@
|
|||
/*
|
||||
* Copyright (c) 2022 BrainCo Inc.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include <gigadevice/gd32l23x/gd32l233rc.dtsi>
|
||||
#include "gd32l233r_eval-pinctrl.dtsi"
|
||||
|
||||
/ {
|
||||
model = "GigaDevice GD32L233R Evaluation Kit";
|
||||
compatible = "gd,gd32l233r-eval";
|
||||
|
||||
chosen {
|
||||
zephyr,sram = &sram;
|
||||
zephyr,flash = &flash0;
|
||||
zephyr,console = &usart1;
|
||||
zephyr,shell-uart = &usart1;
|
||||
zephyr,flash-controller = &fmc;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
led2: led2 {
|
||||
gpios = <&gpioc 7 GPIO_ACTIVE_HIGH>;
|
||||
label = "LED2";
|
||||
};
|
||||
led3: led3 {
|
||||
gpios = <&gpioc 8 GPIO_ACTIVE_HIGH>;
|
||||
label = "LED3";
|
||||
};
|
||||
led4: led4 {
|
||||
gpios = <&gpioc 9 GPIO_ACTIVE_HIGH>;
|
||||
label = "LED4";
|
||||
};
|
||||
led5: led5 {
|
||||
gpios = <&gpioc 11 GPIO_ACTIVE_HIGH>;
|
||||
label = "LED5";
|
||||
};
|
||||
};
|
||||
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
wakeup_key: wakeup_key {
|
||||
label = "WAKEUP_KEY";
|
||||
gpios = <&gpioa 0 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
tamper_key: tamper_key {
|
||||
label = "TAMPER_KEY";
|
||||
gpios = <&gpioc 13 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
aliases {
|
||||
led0 = &led2;
|
||||
led1 = &led3;
|
||||
};
|
||||
};
|
||||
|
||||
&gpioa {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpiob {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpioc {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpiod {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpiof {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usart1 {
|
||||
status = "okay";
|
||||
current-speed = <115200>;
|
||||
pinctrl-0 = <&usart1_default>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&adc0 {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&adc0_default>;
|
||||
pinctrl-names = "default";
|
||||
};
|
13
boards/arm/gd32l233r_eval/gd32l233r_eval.yaml
Normal file
13
boards/arm/gd32l233r_eval/gd32l233r_eval.yaml
Normal file
|
@ -0,0 +1,13 @@
|
|||
# Copyright (c) 2022 BrainCO Inc.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
identifier: gd32l233r_eval
|
||||
name: GigaDevice GD32L233R Evaluation Kit
|
||||
type: mcu
|
||||
arch: arm
|
||||
ram: 32
|
||||
flash: 256
|
||||
toolchain:
|
||||
- zephyr
|
||||
- gnuarmemb
|
||||
- xtools
|
10
boards/arm/gd32l233r_eval/gd32l233r_eval_defconfig
Normal file
10
boards/arm/gd32l233r_eval/gd32l233r_eval_defconfig
Normal file
|
@ -0,0 +1,10 @@
|
|||
# Copyright (c) 2022 BrainCo Inc.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
CONFIG_SOC_SERIES_GD32L23X=y
|
||||
CONFIG_SOC_GD32L233=y
|
||||
CONFIG_BOARD_GD32L233R_EVAL=y
|
||||
|
||||
CONFIG_SERIAL=y
|
||||
CONFIG_CONSOLE=y
|
||||
CONFIG_UART_CONSOLE=y
|
Loading…
Add table
Add a link
Reference in a new issue