-
Notifications
You must be signed in to change notification settings - Fork 4
/
platformio.ini
74 lines (65 loc) · 1.99 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
; 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
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
build_flags =
; -flto
-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
monitor_filters =
send_on_enter
colorize
[env:dfu]
upload_protocol = dfu
[env: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
[env:debug]
# You need to use the debug panel of VSCode for debugging
build_type = debug
debug_tool = stlink
upload_protocol = stlink