-
Notifications
You must be signed in to change notification settings - Fork 6
/
platformio.ini
55 lines (47 loc) · 1.83 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
[platformio]
default_envs = Generic_GD32F130_bootloader
[env]
src_filter = +<*.c>
monitor_speed = 9600
build_flags =
-D DEBUG=0
-Wl,-Map,firmware.map
# -----------------------------
[env_gd32f130]
platform = [email protected]
platform_packages =
maxgerhardt/[email protected]
platformio/[email protected]
platformio/[email protected]
platformio/[email protected]
platformio/[email protected]
framework = spl
board = gd32f130g6
src_filter =
${env.src_filter}
+<gd32f1x0/*.c>
build_flags =
${env.build_flags}
-I src/gd32f1x0
--specs=nano.specs
#-D HXTAL_VALUE=8000000
#-D __SYSTEM_CLOCK_72M_PLL_HXTAL=72000000U
# -----------------------------
[env:Generic_GD32F130_bootloader]
extends = env_gd32f130
upload_protocol = custom
upload_command =
openocd -d2 -f interface/stlink.cfg -c "transport select hla_swd" -f target/stm32f1x.cfg -c "init; reset halt; stm32f1x unlock 0; reset halt; exit;"
openocd -d2 -f interface/stlink.cfg -c "transport select hla_swd" -f target/stm32f1x.cfg -c "init; reset halt; wait_halt; stm32f1x mass_erase 0; sleep 200; reset halt; exit;"
openocd -d2 -f interface/stlink.cfg -c "transport select hla_swd" -f target/stm32f1x.cfg -c "program {${BUILD_DIR}/${PROGNAME}.elf} verify reset; shutdown;"
[env:Generic_GD32F130_remove_protections]
platform = ststm32
board = gd32f130g6
src_filter = -<*>
upload_protocol = custom
upload_command =
openocd -d2 -f interface/stlink.cfg -c "transport select hla_swd" -f target/stm32f1x.cfg -c "init; reset halt; stm32f1x unlock 0; reset halt; exit;"
openocd -d2 -f interface/stlink.cfg -c "transport select hla_swd" -f target/stm32f1x.cfg -c "init; reset halt; wait_halt; stm32f1x mass_erase 0; sleep 200; reset halt; exit;"
[env:Generic_GD32F130_bootloader_only]
extends = env_gd32f130
# -----------------------------