1.. zephyr:board:: gd32vf103v_eval 2 3Overview 4******** 5 6The GD32V103V-EVAL board is a hardware platform that enables prototyping 7on GD32VF103VB RISC-V MCU. 8 9The GD32VF103VB features a single-core RISC-V 32-bit MCU which can run up 10to 108 MHz with flash accesses zero wait states, 128 KiB of Flash, 32 KiB of 11SRAM and 80 GPIOs. 12 13Hardware 14******** 15 16- GD32VF103VBT6 MCU 17- AT24C02C 2Kb EEPROM 18- GD25Q16 16Mbit SPI and QSPI NOR Flash 19- 4 x User LEDs 20- 1 x Joystick (L/R/U/D/C) 21- 2 x USART (RS-232 at J1/J2 connectors) 22- 1 x POT connected to an ADC input 23- USB FS connector 24- Headphone interface 25- 1 x CAN 26- 3.2" RGB-LCD (320x240) 27- GD-Link on board programmer 28- J-Link/JTAG connector 29 30For more information about the GD32VF103 SoC and GD32VF103V-EVAL board: 31 32- `GigaDevice RISC-V Mainstream SoC Website`_ 33- `GD32VF103 Datasheet`_ 34- `GD32VF103 User Manual`_ 35- `GD32VF103V-EVAL Documents`_ 36 37Supported Features 38================== 39 40The board configuration supports the following hardware features: 41 42.. list-table:: 43 :header-rows: 1 44 45 * - Peripheral 46 - Kconfig option 47 - Devicetree compatible 48 * - GPIO 49 - :kconfig:option:`CONFIG_GPIO` 50 - :dtcompatible:`gd,gd32-gpio` 51 * - Machine timer 52 - :kconfig:option:`CONFIG_RISCV_MACHINE_TIMER` 53 - :dtcompatible:`riscv,machine-timer` 54 * - Nuclei ECLIC Interrupt Controller 55 - :kconfig:option:`CONFIG_NUCLEI_ECLIC` 56 - :dtcompatible:`nuclei,eclic` 57 * - PWM 58 - :kconfig:option:`CONFIG_PWM` 59 - :dtcompatible:`gd,gd32-pwm` 60 * - USART 61 - :kconfig:option:`CONFIG_SERIAL` 62 - :dtcompatible:`gd,gd32-usart` 63 * - ADC 64 - :kconfig:option:`CONFIG_ADC` 65 - :dtcompatible:`gd,gd32-adc` 66 67Serial Port 68=========== 69 70The GD32VF103V-EVAL board has two serial communications port. The default port 71is USART0 with TX connected at PA9 and RX at PA10. 72 73Programming and Debugging 74************************* 75 76Before programming your board make sure to configure boot and serial jumpers 77as follows: 78 79- JP2/3: Select 2-3 for both (boot from user memory) 80- JP5/6: Select 1-2 positions (labeled as ``USART0``) 81 82Using GD-Link 83============= 84 85The GD32VF103V-EVAL includes an onboard programmer/debugger (GD-Link) which 86allows flash programming and debugging over USB. There is also a JTAG header 87(JP1) which can be used with tools like Segger J-Link. 88 89#. Build the Zephyr kernel and the :zephyr:code-sample:`hello_world` sample application: 90 91 .. zephyr-app-commands:: 92 :zephyr-app: samples/hello_world 93 :board: gd32vf103v_eval 94 :goals: build 95 :compact: 96 97#. Run your favorite terminal program to listen for output. On Linux the 98 terminal should be something like ``/dev/ttyUSB0``. For example: 99 100 .. code-block:: console 101 102 minicom -D /dev/ttyUSB0 -o 103 104 The -o option tells minicom not to send the modem initialization 105 string. Connection should be configured as follows: 106 107 - Speed: 115200 108 - Data: 8 bits 109 - Parity: None 110 - Stop bits: 1 111 112#. To flash an image: 113 114 .. zephyr-app-commands:: 115 :zephyr-app: samples/hello_world 116 :board: gd32vf103v_eval 117 :goals: flash 118 :compact: 119 120 You should see "Hello World! gd32vf103v_eval" in your terminal. 121 122#. To debug an image: 123 124 .. zephyr-app-commands:: 125 :zephyr-app: samples/hello_world 126 :board: gd32vf103v_eval 127 :goals: debug 128 :compact: 129 130 131.. _GigaDevice RISC-V Mainstream SoC Website: 132 https://www.gigadevice.com/products/microcontrollers/gd32/risc-v/mainstream-line/ 133 134.. _GD32VF103 Datasheet: 135 https://www.gigadevice.com/datasheet/gd32vf103xxxx-datasheet/ 136 137.. _GD32VF103 User Manual: 138 https://www.gd32mcu.com/data/documents/userManual/GD32VF103_User_Manual_Rev1.4.pdf 139 140.. _GD32VF103V-EVAL Documents: 141 https://github.com/riscv-mcu/GD32VF103_Demo_Suites/tree/master/GD32VF103V_EVAL_Demo_Suites/Docs 142