-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplatformio.ini
More file actions
135 lines (121 loc) · 3.67 KB
/
platformio.ini
File metadata and controls
135 lines (121 loc) · 3.67 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
; PlatformIO Configuration for ArduinoASTInterpreter
;
; v21.2.0: ESP32-S3 Environments - RTTI-Free Default with RTTI Opt-In
; =============================================================================
; RTTI-free (static_cast) is the default for ESP32 for practical embedded deployment.
; Choose environment based on your requirements:
; - esp32-s3 (default): RTTI-free mode (~868KB binary)
; - esp32-s3-rtti (opt-in): RTTI enabled (~896KB binary, +28KB)
;
; Platform Defaults:
; Linux: RTTI (safety-first for development)
; WASM: RTTI (embind requirement + browser safety)
; ESP32: RTTI-free (practical embedded deployment)
[platformio]
default_envs = esp32-s3
; ESP32-S3 Default (RTTI-Free Mode - Size Optimized)
; ===================================================
; Uses static_cast with NO runtime checking
; Binary size: ~868KB
;
; ✅ Recommended for:
; • Production deployments (practical default)
; • Works immediately without platform.txt edits
; • Flash-constrained applications
; • Standard embedded deployment
;
; Build: pio run -e esp32-s3
; Upload: pio run -e esp32-s3 -t upload
; Monitor: pio device monitor
[env:esp32-s3]
platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino
; Build flags
build_flags =
-D ARDUINO_ARCH_ESP32
-D ESP32
-D ENABLE_DEBUG_OUTPUT=1
-D ENABLE_FILE_TRACING=0
-Os
-ffunction-sections
-fdata-sections
-Wl,--gc-sections
-std=gnu++17
-D AST_NO_RTTI ; Enable RTTI-free mode (default)
-fno-rtti ; Disable RTTI compiler feature
; Upload and monitor settings
upload_speed = 921600
monitor_speed = 115200
monitor_filters = esp32_exception_decoder
; Library configuration
lib_deps =
; No external dependencies required
lib_ldf_mode = deep+
lib_extra_dirs =
src/cpp
libs/CompactAST/src
; ESP32-S3 specific settings
board_build.flash_mode = qio
board_build.f_flash = 80000000L
board_build.f_cpu = 240000000L
board_build.mcu = esp32s3
board_build.partitions = default.csv
[env:esp32-s3-debug]
extends = env:esp32-s3
build_type = debug
build_flags =
${env:esp32-s3.build_flags}
-D ENABLE_DEBUG_OUTPUT=1
-D ENABLE_FILE_TRACING=1
-g
-O0
; ESP32-S3 RTTI Mode (Runtime Type Safety - Opt-In)
; ==================================================
; Uses dynamic_cast for runtime type verification
; Binary size: ~896KB (+28KB vs RTTI-free mode)
;
; ⚙️ Recommended for:
; • Development and testing
; • Debugging type cast issues
; • When you need runtime type safety
; • When flash space permits (>1MB available)
;
; ✅ EASIEST RTTI OPT-IN METHOD (no platform.txt edits required)
;
; Build: pio run -e esp32-s3-rtti
; Upload: pio run -e esp32-s3-rtti -t upload
; Monitor: pio device monitor
[env:esp32-s3-rtti]
platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino
; Build flags
build_flags =
-D ARDUINO_ARCH_ESP32
-D ESP32
-D ENABLE_DEBUG_OUTPUT=1
-D ENABLE_FILE_TRACING=0
-Os
-ffunction-sections
-fdata-sections
-Wl,--gc-sections
-std=gnu++17
-frtti ; Enable RTTI (opt-in, overrides Arduino's -fno-rtti)
; Upload and monitor settings
upload_speed = 921600
monitor_speed = 115200
monitor_filters = esp32_exception_decoder
; Library configuration
lib_deps =
; No external dependencies required
lib_ldf_mode = deep+
lib_extra_dirs =
src/cpp
libs/CompactAST/src
; ESP32-S3 specific settings
board_build.flash_mode = qio
board_build.f_flash = 80000000L
board_build.f_cpu = 240000000L
board_build.mcu = esp32s3
board_build.partitions = default.csv