forked from grblHAL/STM32F1xx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplatformio.ini
146 lines (140 loc) · 4.72 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
# This is the configuration file for PlatformIO, a cross-platform tool and IDE
# to build and develop software for embedded systems.
#
# To build the firmware with PlatformIO, install PlatformIO Core (CLI, no GUI):
# - https://docs.platformio.org/en/latest//core/installation.html
#
# For documentation on this file, see:
# - https://docs.platformio.org/en/latest/projectconf/index.html
#
# To add support for another STM32F1xx board, add a new [env:name..] section
# with the appropriate `board` and (optionally) `board_build.ldscript`.
# For a list of supported hardware, see:
# - https://docs.platformio.org/en/latest/platforms/ststm32.html
#
# To add support for additional grblHAL plugins or drivers, make the necessary
# changes to the common.build_flags, common.lib_deps and common.lib_extra_dirs
# below.
#
# By default this file sets the preprocessor directive `OVERRIDE_MY_MACHINE`
# to ignore all settings in `Inc/my_machine.h`. Instead, you should edit this
# file and add the necessary directives (e.g. `-D FOOBAR_ENABLE`) to either
# `common.build_flags` or the environment specific `build_flags`.
#
# Typical command line usage:
#
# # Build firmware for all defined environments
# pio run
# # Build only for specific environments with the -e option
# pio run -e BTT_SKR_MINI_E3_V20 -e BTT_SKR_MINI_E3_V20_USB
# # List the freshly built firmware ELF (.elf) and binary (.bin) files:
# ls -l .pio/build/*/firmware.*
# # If the target supports uploading (via `upload_protocol`):
# pio run -e bluepill_f103c8_128k -t upload
# # Clean up build related resources
# pio run -t clean
#
[platformio]
include_dir = Inc
src_dir = Src
[common]
build_flags =
-I .
-I FatFs
-I Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc
-I Middlewares/ST/STM32_USB_Device_Library/Core/Inc
-I USB_DEVICE/Target
-D RX_BUFFER_SIZE=512
-D NVS_SIZE=1536
# Ignore all settings in Inc/my_machine.h (and instead use the below build flags)
-D OVERRIDE_MY_MACHINE
# Uncomment to enable debug builds
#-D DEBUG
# Uncomment to enable support for keypad
#-D KEYPAD_ENABLE=1
# Uncomment to enable support for odometer
#-D ODOMETER_ENABLE=1
# Uncomment to enable support for running G-code from the microSD card
# You also need to uncomment FatFs and sdcard in lib_deps (see below)
#-D SDCARD_ENABLE=1
lib_deps =
grbl
keypad
motors
odometer
# To enable support for SD card uncomment `FatFs` and `sdcard` below.
#FatFs
#sdcard
# USB serial support
Core
Class
App
Target
lib_extra_dirs =
.
FatFs
Middlewares/ST/STM32_USB_Device_Library
USB_DEVICE
[env]
platform = ststm32
framework = stm32cube
# Do not produce .a files for lib deps (which would prevent them from overriding weak symbols)
lib_archive = no
lib_ldf_mode = off
[env:BTT_SKR_MINI_E3_V20]
board = genericSTM32F103RC
board_build.ldscript = STM32F103RCTX_FLASH.ld
build_flags = ${common.build_flags}
# See Inc/my_machine.h for options
-D BTT_SKR_MINI_E3_V20=
-D USB_SERIAL_CDC=0
# Relocate the vector table where the boot loader expects to find them
-D VECT_TAB_OFFSET=0x7000
-Wl,--defsym=LD_VECT_TAB_OFFSET=0x7000
lib_deps = ${common.lib_deps}
eeprom
trinamic
lib_extra_dirs = ${common.lib_extra_dirs}
# Upload is not supported for this board since BOOT0 is tied to GND.
# With the default boot loader, you must deploy new firmware by copying
# .pio/build/<env name>/firmware.bin (produced by `pio run`) to the SD card.
[env:BTT_SKR_MINI_E3_V20_USB]
board = genericSTM32F103RC
board_build.ldscript = STM32F103RCTX_FLASH.ld
build_flags = ${common.build_flags}
# See Inc/my_machine.h for options
-D BTT_SKR_MINI_E3_V20=
-D USB_SERIAL_CDC=1
# Relocate the vector table where the boot loader expects to find them
-D VECT_TAB_OFFSET=0x7000
-Wl,--defsym=LD_VECT_TAB_OFFSET=0x7000
lib_deps = ${common.lib_deps}
eeprom
trinamic
lib_extra_dirs = ${common.lib_extra_dirs}
# Upload is not supported for this board since BOOT0 is tied to GND.
# With the default boot loader, you must deploy new firmware by copying
# .pio/build/<env name>/firmware.bin (produced by `pio run`) to the SD card.
[env:bluepill_f103c8_128k]
board = bluepill_f103c8_128k
board_build.ldscript = STM32F103C8TX_FLASH.ld
build_flags = ${common.build_flags}
# See Inc/my_machine.h for options
-D BOARD_CNC3040=
-D USB_SERIAL_CDC=0
lib_deps = ${common.lib_deps}
eeprom
lib_extra_dirs = ${common.lib_extra_dirs}
upload_protocol = stlink
[env:bluepill_f103c8_128k_USB]
board = bluepill_f103c8_128k
board_build.ldscript = STM32F103C8TX_FLASH.ld
build_flags = ${common.build_flags}
# See Inc/my_machine.h for options
-D BOARD_CNC3040=
-D NO_SETTINGS_DESCRIPTIONS=
-D USB_SERIAL_CDC=1
lib_deps = ${common.lib_deps}
eeprom
lib_extra_dirs = ${common.lib_extra_dirs}
upload_protocol = stlink