forked from OpenVTx/OpenVTx_bootloader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
platformio.ini
60 lines (51 loc) · 1.8 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
[platformio]
default_envs = EWRF_E7082VM_bootloader
[env]
src_filter = +<*.c>
monitor_speed = 9600
build_flags =
-D DEBUG=0
-Wl,-Map,firmware.map
# -----------------------------
[env_gd32f130]
platform = ststm32
platform_packages =
maxgerhardt/[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
# ----------
[EWRF_E7082VM_env]
extends = env_gd32f130
src_filter =
${env_gd32f130.src_filter}
+<targets/EWRF_E7082VM/*.c>
build_flags =
${env_gd32f130.build_flags}
-D EWRF_E7082VM=1
[env:EWRF_E7082VM_bootloader]
extends = EWRF_E7082VM_env
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:EWRF_E7082VM_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:EWRF_E7082VM_bootloader_only]
extends = EWRF_E7082VM_env
# -----------------------------