3
3
Sipeed Longan Nano
4
4
##################
5
5
6
+ .. image :: img/longan_nano.png
7
+ :align: center
8
+ :alt: longan_nano
9
+
6
10
Overview
7
11
********
8
12
@@ -17,21 +21,68 @@ More information can be found on:
17
21
- `Nuclei Bumblebee core documents <https://github.com/nucleisys/Bumblebee_Core_Doc >`_
18
22
- `Nuclei ISA Spec <https://doc.nucleisys.com/nuclei_spec/ >`_
19
23
20
- Programming and debugging
21
- *************************
22
-
23
- Building
24
- ========
24
+ Hardware
25
+ ********
25
26
26
- Applications for the ``logan_nano `` board configuration can be built as usual
27
- (see :ref: `build_an_application `) using the corresponding board name:
27
+ - 4 x universal 16-bit timer
28
+ - 2 x basic 16-bit timer
29
+ - 1 x advanced 16-bit timer
30
+ - Watchdog timer
31
+ - RTC
32
+ - Systick
33
+ - 3 x USART
34
+ - 2 x I2C
35
+ - 3 x SPI
36
+ - 2 x I2S
37
+ - 2 x CAN
38
+ - 1 x USBFS(OTG)
39
+ - 2 x ADC(10 channel)
40
+ - 2 x DAC
41
+
42
+ Supported Features
43
+ ==================
44
+
45
+ The board configuration supports the following hardware features:
46
+
47
+ .. list-table ::
48
+ :header-rows: 1
49
+
50
+ * - Peripheral
51
+ - Kconfig option
52
+ - Devicetree compatible
53
+ * - GPIO
54
+ - :kconfig:option: `CONFIG_GPIO `
55
+ - :dtcompatible: `gd,gd32-gpio `
56
+ * - Machine timer
57
+ - :kconfig:option: `CONFIG_RISCV_MACHINE_TIMER `
58
+ - :dtcompatible: `riscv,machine-timer `
59
+ * - Nuclei ECLIC Interrupt Controller
60
+ - :kconfig:option: `CONFIG_NUCLEI_ECLIC `
61
+ - :dtcompatible: `nuclei,eclic `
62
+ * - PWM
63
+ - :kconfig:option: `CONFIG_PWM `
64
+ - :dtcompatible: `gd,gd32-pwm `
65
+ * - USART
66
+ - :kconfig:option: `CONFIG_SERIAL `
67
+ - :dtcompatible: `gd,gd32-usart `
68
+ * - I2C
69
+ - :kconfig:option: `CONFIG_I2C `
70
+ - :dtcompatible: `gd,gd32-i2c `
71
+ * - DAC
72
+ - :kconfig:option: `CONFIG_DAC `
73
+ - :dtcompatible: `gd,gd32-dac `
74
+
75
+ Serial Port
76
+ ===========
77
+
78
+ USART0 is on the opposite end of the USB.
79
+ Connect to TX0 (PA9) and RX0 (PA10).
28
80
29
- .. zephyr-app-commands ::
30
- :board: logan_nano
31
- :goals: build
81
+ Programming and debugging
82
+ *************************
32
83
33
- Flashing
34
- ========
84
+ Building & Flashing
85
+ ===================
35
86
36
87
In order to upload the application to the device, you'll need OpenOCD with
37
88
GD32V support. Download the tarball for your OS from the
@@ -40,25 +91,28 @@ GD32V support. Download the tarball for your OS from the
40
91
41
92
The Zephyr SDK uses a bundled version of OpenOCD by default. You can
42
93
overwrite that behavior by adding the
43
- ``-DOPENOCD=<path/to/riscv-openocd/bin/openocd> ``
94
+ ``-DOPENOCD=<path/to/riscv-openocd/bin/openocd> -DOPENOCD_DEFAULT_PATH=<path/to/riscv-openocd/share/openocd/scripts> ``
44
95
parameter when building:
45
96
97
+ Here is an example for building the :ref: `blinky-sample ` application.
98
+
46
99
.. zephyr-app-commands ::
100
+ :zephyr-app: samples/basic/blinky
47
101
:board: longan_nano
48
- :goals: build
49
- :gen-args: -DOPENOCD=<path/to/riscv-openocd/bin/openocd>
102
+ :goals: build flash
103
+ :gen-args: -DOPENOCD=<path/to/riscv-openocd/bin/openocd> -DOPENOCD_DEFAULT_PATH=<path/to/riscv-openocd/share/openocd/scripts>
50
104
51
105
When using a custom toolchain it should be enough to have the downloaded
52
106
version of the binary in your ``PATH ``.
53
107
54
- Now you can flash the application as usual (see :ref: `build_an_application ` and
55
- :ref: `application_run ` for more details):
56
-
57
- .. code-block :: console
58
-
59
- west flash
60
-
61
108
Debugging
62
109
=========
63
110
64
- Refer to the detailed overview about :ref: `application_debugging `.
111
+ You can debug an application in the usual way. Here is an example for the
112
+ :ref: `blinky-sample ` application.
113
+
114
+ .. zephyr-app-commands ::
115
+ :zephyr-app: samples/basic/blinky
116
+ :board: longan_nano
117
+ :maybe-skip-config:
118
+ :goals: debug
0 commit comments