-
-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathplatformio.ini
More file actions
165 lines (136 loc) · 4.36 KB
/
Copy pathplatformio.ini
File metadata and controls
165 lines (136 loc) · 4.36 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
; PlatformIO Project Configuration File
;
; Structure:
; [env] — shared settings (platform, framework, libraries, partitions, checks)
; [board_*] — board-specific settings (board, build flags)
; [mode_*] — build mode settings (debug, ota, release)
; [env:<board>-<mode>] — concrete targets combining board + mode
;
; To add a new board, create a [board_xyz] section and new env entries
; that extend both the board and a mode (e.g. [env:xyz-debug]).
;
; *-release envs auto-generate release artifacts (firmware.bin + full.tar.gz)
; via a post-build hook in scripts/env_config.py. GoReleaser picks these up
; from .pio/build/*-release/ via extra_files globs. CHIP_MODEL build flag is
; required for each board — the hook reads it to name the artifacts.
;
; https://docs.platformio.org/page/projectconf.html
[platformio]
src_dir = firmware/src
lib_dir = firmware/lib
; --- Shared across all boards and modes ---------------------------------------
[env]
platform = espressif32 @ 7.0.1
framework = arduino
extra_scripts = pre:scripts/env_config.py
board_build.partitions = firmware/partition.csv
board_build.filesystem = spiffs
upload_speed = 115200
monitor_speed = 115200
check_tool = clangtidy
check_flags =
clangtidy: --config-file=.clang-tidy
check_skip_packages = yes
lib_compat_mode = strict
lib_ldf_mode = chain
lib_deps =
ESP32Async/AsyncTCP @ 3.4.10
ESP32Async/ESPAsyncWebServer @ 3.11.0
; --- Build modes --------------------------------------------------------------
[mode_ota]
upload_protocol = custom
upload_command = bash -c 'HASH=$$(md5sum "$SOURCE" | cut -d" " -f1) && curl -f --progress-bar -F "file=@$SOURCE" "http://$UPLOAD_PORT/api/firmware/update?hash=$$HASH"'
; --- Board: ESP32-C3-DevKitM-1 -----------------------------------------------
[board_c3]
board = esp32-c3-devkitm-1
build_flags =
-Wno-attributes
-DARDUINO_USB_MODE=1
-DARDUINO_USB_CDC_ON_BOOT=1
-DCHIP_MODEL=\"ESP32-C3\"
-std=gnu++17
; --- Targets (C3) -------------------------------------------------------------
[env:c3-debug]
extends = board_c3
[env:c3-ota]
extends = board_c3, mode_ota
build_flags =
${board_c3.build_flags}
-DENABLE_LOGGING=0
[env:c3-release]
extends = board_c3
build_flags =
${board_c3.build_flags}
-DENABLE_LOGGING=0
; --- Board: Seeed Studio XIAO ESP32C3 ----------------------------------------
; Seeed documents D6 as UART TX/GPIO21 and D7 as UART RX/GPIO20:
; https://wiki.seeedstudio.com/XIAO_ESP32C3_Getting_Started/#pin-map
; PlatformIO board ID:
; https://docs.platformio.org/en/latest/boards/espressif32/seeed_xiao_esp32c3.html
[board_xiao_c3]
board = seeed_xiao_esp32c3
build_flags =
-Wno-attributes
-DARDUINO_USB_MODE=1
-DARDUINO_USB_CDC_ON_BOOT=1
-DCHIP_MODEL=\"ESP32-C3\"
-DOPENNEATO_BOARD_XIAO_ESP32C3
-DOPENNEATO_RELEASE_ID=\"seeed-xiao-esp32c3\"
-std=gnu++17
; --- Targets (Seeed Studio XIAO ESP32C3) -------------------------------------
[env:xiao-c3-debug]
extends = board_xiao_c3
[env:xiao-c3-ota]
extends = board_xiao_c3, mode_ota
build_flags =
${board_xiao_c3.build_flags}
-DENABLE_LOGGING=0
[env:xiao-c3-release]
extends = board_xiao_c3
build_flags =
${board_xiao_c3.build_flags}
-DENABLE_LOGGING=0
; --- Board: ESP32-S3-DevKitC-1 (Xtensa LX7, dual-core, native USB) -----------
[board_s3]
board = esp32-s3-devkitc-1
board_build.flash_size = 4MB
board_upload.flash_size = 4MB
build_flags =
-Wno-attributes
-DARDUINO_USB_MODE=1
-DARDUINO_USB_CDC_ON_BOOT=1
-DCHIP_MODEL=\"ESP32-S3\"
-std=gnu++17
; --- Targets (S3) -------------------------------------------------------------
[env:s3-debug]
extends = board_s3
[env:s3-ota]
extends = board_s3, mode_ota
build_flags =
${board_s3.build_flags}
-DENABLE_LOGGING=0
[env:s3-release]
extends = board_s3
build_flags =
${board_s3.build_flags}
-DENABLE_LOGGING=0
; --- Board: ESP32-D0WD-V3 (original ESP32, Xtensa LX6) ----------------------
[board_esp32]
board = esp32dev
build_flags =
-Wno-attributes
-DCHIP_MODEL=\"ESP32\"
-std=gnu++17
; --- Targets (ESP32) ----------------------------------------------------------
[env:esp32-debug]
extends = board_esp32
[env:esp32-ota]
extends = board_esp32, mode_ota
build_flags =
${board_esp32.build_flags}
-DENABLE_LOGGING=0
[env:esp32-release]
extends = board_esp32
build_flags =
${board_esp32.build_flags}
-DENABLE_LOGGING=0