-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathplatformio.ini
105 lines (83 loc) · 2.69 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
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[platformio]
include_dir = firmware/include
lib_dir = firmware/lib
src_dir = firmware/src
test_dir = firmware/test
[env]
platform = platformio/ststm32@^17.3.0
; WARNING: For whatever reason, this CANNOT be the
; disco_b_g431b_esc1 board you probably anticipate
; it can be. This took my morning don't let it take yours.
board = genericSTM32G431CB
framework = arduino
monitor_dtr = 1
monitor_speed = 115200
build_flags =
-DPIO_FRAMEWORK_ARDUINO_ENABLE_CDC
-DUSBCON
-DUSBD_VID=0x0483
-DUSBD_PID=0x5740
-DUSB_MANUFACTURER="ATO"
-DUSB_PRODUCT=""SPIN""
-DHAL_PCD_MODULE_ENABLED
-DHSE_VALUE=8000000
-DSIMPLEFOC_STM32_DEBUG
-DSPIN_SERVO_FIRMWARE_VERSION=\"1.0.0\"
-DHAL_CORDIC_MODULE_ENABLED
-DHAL_FDCAN_MODULE_ENABLED
monitor_filters =
send_on_enter
colorize
build_src_filter = +<*> -<.git/> -<.svn/> -<debug_builds/>
[servo_common]
lib_deps =
; these both need to be on the dev branch, but we cannot spec a branch for deps
; instead we've taken the tip of the dev branches for each libs (as of 22-feb-2024)
https://github.com/simplefoc/Arduino-FOC-drivers.git#3a11d581d73018d3836614d674210e017da43661
https://github.com/simplefoc/Arduino-FOC.git#83e52478c14b6fffa8a547fe74f3b41e7bbfde0e
[dfu_manual]
; NOTE: platformio firwmare UPLOAD doesn't work with this board
; use dfu-util instead
; dfu-util -e -d 0483:df11 -a 0 -s 0x08000000 -D .pio/build/genericSTM32G431CB/firmware.bin
upload_protocol = custom
upload_flags =
-e
-d
0483:df11
-a
0
-s
0x08000000
upload_command = dfu-util $UPLOAD_FLAGS -D $SOURCE
; Main firmware build for the full servo projects
[env:servo-dfu-manual]
extends = servo_common, dfu_manual
[env:servo-dfu]
extends = servo_common
upload_protocol = dfu
[env:servo-debug]
; You need to use the debug panel of VSCode for debugging
extends = servo_common
build_type = debug
debug_tool = stlink
upload_protocol = stlink
; These are smaller builds used to bring things up for
; development or debugging without the full servo project
[develop]
; NOTE: platformio firwmare UPLOAD doesn't work with this board
; use dfu-util instead
; dfu-util -e -d 0483:df11 -a 0 -s 0x08000000 -D .pio/build/genericSTM32G431CB/firmware.bin
extends = dfu_manual
build_src_filter = -<main.cpp>
[env:develop-CAN]
extends = develop
build_src_filter = +<debug_builds/CAN.cpp>