-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplatformio.oldini
More file actions
233 lines (198 loc) · 7.41 KB
/
Copy pathplatformio.oldini
File metadata and controls
233 lines (198 loc) · 7.41 KB
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
; PlatformIO Configuration for OnStepX on FYSETC E4
; ===================================================
; FYSETC E4 Board Specifications:
; - MCU: ESP32-WROOM-32 (Dual-core Xtensa LX6 @ 240MHz)
; - Flash: 16MB
; - RAM: 520KB SRAM
; - Wireless: WiFi 802.11 b/g/n, Bluetooth 4.2
; - Stepper Drivers: 4x TMC2209 (onboard)
[platformio]
; Default environment for FYSETC E4
default_envs = esp32dev
src_dir = staged
include_dir = staged
; following line needed to vendor specific folder of ODrive
;lib_extra_dirs = lib
; Common settings
[common]
framework = arduino
monitor_speed = 115200
monitor_filters =
esp32_exception_decoder
build_flags =
-D CORE_DEBUG_LEVEL=0
; DO NOT define VERSION here - conflicts with TMC2209 library
-D FIRMWARE_VERSION='"0.0.1"'
; Include paths for OnStepX core
;;-I src
;;-I src/lib
;;-I src/telescope
;;-I src/telescope/mount
;;-I src/telescope/auxiliary
;-I src/lib/sense
; FYSETC E4 - ESP32 Configuration
[env:esp32dev]
;https://github.com/platformio/platform-espressif32/releases
;Arduino ESP32 2.0.17 is supported since release 6.8.0
;6.12.0 is latest as of 12/4/2025
platform = espressif32@6.13.0
board = esp32dev
framework = ${common.framework}
; Board-specific settings
board_build.mcu = esp32
board_build.f_cpu = 240000000L
board_build.flash_mode = dio
board_build.partitions = huge_app.csv
; Upload settings
upload_speed = 921600
; For OTA updates, uncomment and set your E4's IP address:
; upload_port = 192.168.1.XXX
; upload_protocol = espota
; Monitor settings
monitor_speed = ${common.monitor_speed}
monitor_filters = ${common.monitor_filters}
monitor_port = /dev/ttyUSB0
; Build flags specific to FYSETC E4 / OnStepX
build_flags =
${common.build_flags}
; ESP32 specific
-D ARDUINO_ARCH_ESP32
-D ESP32
-D HAL_ESP32
-D CONFIG_ARDUINO_RUNNING_CORE=1
-D CONFIG_ARDUINO_EVENT_RUNNING_CORE=1
; FYSETC E4 specific hardware
-D FYSETC_E4
-D WIFI_ENABLED
-D BLUETOOTH_ENABLED
; Enable NVS (Non-Volatile Storage) for ESP32
;;-D NV_DRIVER=NV_ESP
;;-D NV_ENDURANCE=NVE_HIGH
; TMC2209 stepper drivers (4 onboard)
-D DRIVER_TMC2209
-D TMC_UART_MODE
; OnStepX configuration
-D AXIS1_DRIVER_MODEL=TMC2209
-D AXIS2_DRIVER_MODEL=TMC2209
; Flash size optimization
-D BOARD_HAS_PSRAM
-D ARDUINO_PARTITION_huge_app
; Additional includes for E4 plugins
;;-I src/plugins
;;-I src/plugins/website
; Source filter to include all OnStepX and plugin files
build_src_filter =
+<*>
-<.git/>
-<../onstepx-src/>
-<../onstepx-e4/>
; Library dependencies
lib_deps =
; https://github.com/Makuna/Rtc/archive/refs/tags/2.3.5.zip
; https://github.com/mikalhart/TinyGPSPlus/releases
; https://github.com/plerup/espsoftwareserial/releases
; https://github.com/adafruit/Adafruit_BME280_Library/archive/refs/tags/2.2.2.zip
; https://github.com/adafruit/Adafruit_Sensor/archive/refs/tags/1.1.7.zip
; https://github.com/adafruit/Adafruit_BMP280_Library/archive/refs/tags/2.6.6.zip
; https://github.com/hjd1964/Arduino-DS1820-Temperature-Library
; https://github.com/hjd1964/OneWire
; https://github.com/hjd1964/TMC2209
; https://github.com/teemuatlut/TMCStepper
; https://github.com/odriverobotics/ODrive/tree/master/Arduino/ODriveArduino
; https://github.com/Dlloydev/QuickPID
; https://github.com/hjd1964/Arduino-DS2413GPIO-Control-Library
; https://github.com/RobTillaart/PCF8575/releases
; https://github.com/RobTillaart/TCA9555/releases
; https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library/releases
; https://github.com/adafruit/Adafruit_BusIO/releases
; --- Direct ZIP/Release Links ---
; Makuna/Rtc (Uses direct ZIP link to ensure specific version 2.3.5)
https://github.com/Makuna/Rtc/archive/refs/tags/2.3.5.zip
; Adafruit BME280 (Uses direct ZIP link to ensure specific version 2.2.2)
https://github.com/adafruit/Adafruit_BME280_Library/archive/refs/tags/2.2.2.zip
; Adafruit Sensor (Uses direct ZIP link to ensure specific version 1.1.7)
https://github.com/adafruit/Adafruit_Sensor/archive/refs/tags/1.1.7.zip
; Adafruit BMP280 (Uses direct ZIP link to ensure specific version 2.6.6)
https://github.com/adafruit/Adafruit_BMP280_Library/archive/refs/tags/2.6.6.zip
; RobTillaart/PCF8575 (References releases, using Git URL)
https://github.com/RobTillaart/PCF8575.git
; RobTillaart/TCA9555 (References releases, using Git URL)
https://github.com/RobTillaart/TCA9555.git
; Adafruit-MCP23017 (References releases, using Git URL)
https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library.git
; Adafruit_BusIO (References releases, using Git URL)
https://github.com/adafruit/Adafruit_BusIO.git
; --- GitHub Repository References (Installed from latest main/master branch) ---
; TinyGPSPlus
https://github.com/mikalhart/TinyGPSPlus.git
; espsoftwareserial
https://github.com/plerup/espsoftwareserial.git
; Arduino-DS1820-Temperature-Library
https://github.com/hjd1964/Arduino-DS1820-Temperature-Library.git
; OneWire
https://github.com/hjd1964/OneWire.git
; TMC2209
https://github.com/hjd1964/TMC2209.git
; TMCStepper
https://github.com/teemuatlut/TMCStepper.git
; QuickPID
https://github.com/Dlloydev/QuickPID.git
; Arduino-DS2413GPIO-Control-Library
https://github.com/hjd1964/Arduino-DS2413GPIO-Control-Library.git
; --- Specific Sub-Folder/Directory Reference ---
; THIS ENDED UP BEING PROBLEMATIC, SO DEALT WITH IN workflow
; ODriveArduino (Points to the specific subdirectory containing the library files)
; Update: using more recent library url, which is not problematic
;https://github.com/odriverobotics/ODrive/tree/master/Arduino/ODriveArduino
;https://github.com/odriverobotics/ODrive.git#master:Arduino/ODriveArduino
https://github.com/odriverobotics/ODriveArduino.git#v0.10.6
; Debug build configuration
[env:esp32dev_debug]
extends = env:esp32dev
build_type = debug
build_flags =
${env:esp32dev.build_flags}
-D DEBUG
-D CORE_DEBUG_LEVEL=5
-D DEBUG_ESP_PORT=Serial
-D DEBUG_ESP_CORE
-D DEBUG_ESP_WIFI
-D DEBUG_NVS
-O0
-g3
; OTA-only build (for wireless updates)
[env:esp32dev_ota]
extends = env:esp32dev
upload_protocol = espota
upload_port = 192.168.1.XXX ; Set your E4's IP address
upload_flags =
--port=3232
--auth=onstepx
; Notes for OnStepX on FYSETC E4:
; ================================
; 0. Setting src_dir and include_dir to . points platformio away from expecting
; all code to be in src
;
; 1. NVS (Non-Volatile Storage):
; The E4 plugins use OnStepX's NVS wrapper for storing WiFi settings
; Defined with: -D NV_DRIVER=NV_ESP
; This uses ESP32's built-in NVS partition
;
; 2. Include Paths:
; Added -I flags ensure E4 plugins can find OnStepX core classes
; Critical paths: src, src/lib, src/plugins
;
; 3. VERSION Macro Conflict:
; DO NOT use -D VERSION=x.y.z (conflicts with TMC2209 library)
; Use FIRMWARE_VERSION instead
;
; 4. Pin Assignments:
; Configure in Config.h with E4-specific pins
;
; 5. Build Source Filter:
; Includes all source files (+<*>) except .git directory
; This ensures plugin files are compiled
;
; 6. TMC2209 Configuration:
; Library dependency added: TMCStepper @ ^0.7.3
; Configure UART pins in Config.h