-
Notifications
You must be signed in to change notification settings - Fork 8
/
platformio.ini
172 lines (153 loc) · 6.15 KB
/
platformio.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter, extra scripting
; Upload options: custom port, speed and extra flags
; Library options: dependencies, extra library storages
;
; Please visit documentation for the other options and examples
; http://docs.platformio.org/page/projectconf.html
[platformio]
;default_envs = gd32vf103c-start
;default_envs = sipeed-longan-nano
;default_envs = sipeed-longan-nano-alt
;default_envs = rvl-probe
src_dir = .
[env]
; platform = nuclei
; framework = nuclei-sdk
; board = gd32vf103c_longan_nano
platform = gd32v
; framework = gd32vf103-sdk
board = sipeed-longan-nano
; The target RV-Link is direcly connected to a host USB port
; Upload to the target RV-Link using USB DFU method of the built-in the bootloader
;upload_protocol = dfu
; Upload to the target RV-Link using the stm32 (compatible) serial upload protocol of the built-in the bootloader
;upload_protocol = serial
;upload_port = /dev/ttyUSB0
;upload_speed = 115200
; Upload to the target RV-Link that is connected to another RV-Link
;upload_protocol = rv-link
;upload_port = /dev/serial/by-id/usb-RV-LINK_*-if00 ; aka /dev/ttyACM0
;debug_tool = rv-link
;debug_port = /dev/serial/by-id/usb-RV-LINK_*-if00 ; aka /dev/ttyACM0
; A serial monitor can be connected to a target USART e.g.:
; - USART0_NO_REMAP (TX0-PA9, RX0-PA10) of the JTAG header
; - USART2_NO_REMAP (TX2-B10, RX2-B11) of the pin header
monitor_speed = 115200
; Monitor a target RV-Link USART connected to a generic USB-to-serial adapter
;monitor_port = /dev/ttyUSB0
; Monitor a target RV-Link USART connected to a FTDI FT232R USB-to-serial adapter
;monitor_port = /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_*-if00-port0 ; aka /dev/ttyUSB0
; Monitor a target RV-Link USART connected to another RV-Link
;monitor_port = /dev/serial/by-id/usb-RV-LINK_*61-if02 ; aka /dev/ttyACM1
extra_scripts =
pre:scripts/platformio_pre_build.py
post:scripts/platformio_post_script.py
src_filter =
-<.git/> -<.svn/> -<example/> -<examples/> -<test/> -<tests/>
+<lib/>
+<rv-link/>
-<rv-link/link/arch/gd32vf103/>
+<rv-link/link/arch/gd32vf103/*.c>
+<rv-link/link/arch/gd32vf103/details/*.c>
-<rv-link/link/arch/gd32vf103/details/gd32vf103_usb_hw_nuclei_sdk.c>
-<rv-link/link/arch/gd32vf103/details/system_gd32vf103.c>
; build_flags =
; ; Add project include path specifically needed for the Nuclei SDK library
; "-Irv-link/link/arch/gd32vf103/details"
; ; Add include path of the external libraries
; "-Ilib"
; ; Common GD32VD103 target defines for RV-Link
; "-D__SYSTEM_CLOCK_96M_PLL_HXTAL=\(uint32_t\)\(96000000\)"
; "-DSYSTEM_CLOCK=__SYSTEM_CLOCK_96M_PLL_HXTAL"
; "-DUSE_STDPERIPH_DRIVER"
; "-DRVL_TARGET_GD32VF103"
; # "-DRVL_DEBUG_EN"
; "-DRVL_ASSERT_EN"
; "-DRVL_APP_CONFIG_GDB_SERVER_VERSION=\"0.3\""
; "-DZOOMDY_FIX"
; -MMD
; ; Save intermediate assembler output
; ;-save-temps=obj
; ;-fverbose-asm
build_flags =
; Add project include path specifically needed for the Nuclei SDK library
"-Irv-link/link/arch/gd32vf103/details"
; Add include path of the external libraries
"-I."
"-Ilib"
; Add include path specifically needed to build the gd32vf103-sdk library
"-DGD32VF103_SDK"
"-Irv-link/link/arch/gd32vf103c"
"-Ilib/gd32vf103-sdk/GD32VF103_standard_peripheral"
"-Ilib/gd32vf103-sdk/GD32VF103_standard_peripheral/Include"
"-Ilib/gd32vf103-sdk/GD32VF103_usbfs_driver/Include"
"-Ilib/gd32vf103-sdk/RISCV/drivers"
; Common GD32VD103 target defines for RV-Link
"-DGD32VF103C_START"
"-D__SYSTEM_CLOCK_96M_PLL_HXTAL"
"-DUSE_STDPERIPH_DRIVER"
"-DUSE_USB_FS"
; Add project include path specifically needed for the Nuclei SDK library
"-Irv-link/link/arch/gd32vf103/details"
; Add include path of the external libraries
"-Ilib"
; Common GD32VD103 target defines for RV-Link
"-DSYSTEM_CLOCK=__SYSTEM_CLOCK_96M_PLL_HXTAL"
"-DUSE_STDPERIPH_DRIVER"
"-DRVL_TARGET_GD32VF103"
# "-DRVL_DEBUG_EN"
"-DRVL_ASSERT_EN"
"-DRVL_APP_CONFIG_GDB_SERVER_VERSION=\"0.3\""
"-DZOOMDY_FIX"
-MMD
; Save intermediate assembler output
;-save-temps=obj
;-fverbose-asm
board_build.ldscript = lib/gd32vf103-sdk/RISCV/gcc/GD32VF103xB.lds
[env:override_framework]
; platform = nuclei
; platform_packages =
; Use upstream Git version
;framework-nuclei-sdk @ https://github.com/Nuclei-Software/nuclei-sdk.git#95e70ca35799d97e4b29935d3288bd94cd529d1f
; framework-nuclei-sdk @ https://gitlab.melroy.org/micha/nuclei-sdk.git#soc-usb-fixes
[env:gd32vf103c-start]
extends = env:override_framework
build_flags = ${env.build_flags}
-DRVL_LINK_GD32VF103C_START
-DRVL_SERIAL_USING_UART0_NO_REMAP
src_filter = ${env.src_filter}
+<rv-link/link/arch/gd32vf103/gd32vf103c-start/>
[env:sipeed-longan-nano]
extends = env:override_framework
build_flags = ${env.build_flags}
"-DRVL_LINK_LONGAN_NANO"
"-DRVL_SERIAL_USING_UART0_NO_REMAP"
src_filter = ${env.src_filter}
+<rv-link/link/arch/gd32vf103/longan-nano/>
[env:sipeed-longan-nano-alt]
extends = env:override_framework
build_flags = ${env.build_flags}
"-DRVL_LINK_LONGAN_NANO_ALT"
"-DRVL_SERIAL_USING_UART0_NO_REMAP"
src_filter = ${env.src_filter}
+<rv-link/link/arch/gd32vf103/longan-nano-alt/>
+<rv-link/link/arch/gd32vf103/longan-nano/led.c>
[env:rvl-probe]
extends = env:override_framework
build_flags = ${env.build_flags}
"-DRVL_LINK_RVL_PROBE"
"-DRVL_SERIAL_USING_UART2_NO_REMAP"
"-DRVL_PROBE_LINK_CONFIG_SPI0_NO_REMAP"
src_filter = ${env.src_filter}
+<rv-link/link/arch/gd32vf103/rvl-probe/>
; The target RV-Link that is connected to another RV-Link
;upload_protocol = dfu ; USB DFU uploading is not supported in the nuclei platform
;upload_protocol = rv-link ; RV-Link uploading is not supported in the nuclei platform
;upload_port = /dev/serial/by-id/usb-RV-LINK_Longan_Nano_SNC6BDED61-if00
;debug_tool = rv-link ; RV-Link debugging is not supported in the nuclei platform
;debug_port = /dev/serial/by-id/usb-RV-LINK_Longan_Nano_SNC6BDED61-if00
; Note as a workaround use e.g.
; - scripts/dfu-rvl-probe.sh to upload the firmware using DFU
; - (gdb) load