Skip to content

Commit 31f9017

Browse files
committed
Copied Nacelle project config updates over
1 parent d1b606b commit 31f9017

1 file changed

Lines changed: 35 additions & 19 deletions

File tree

platformio.ini

Lines changed: 35 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
; Please visit documentation for the other options and examples
99
; https://docs.platformio.org/page/projectconf.html
1010

11+
[platformio]
12+
default_envs = Prod_Load
13+
1114
; Common - https://docs.platformio.org/en/latest/projectconf/sections/env/index.html#common-env
1215
[env]
1316
; See also: https://esp32s3.com/getting-started.html
@@ -23,11 +26,24 @@ lib_deps =
2326
ayushsharma82/ElegantOTA @ ^3.1.7
2427
etlcpp/Embedded Template Library @ ^20.44.1
2528
lennarthennigs/ESP Telnet @ ^2.2.3
29+
; https://docs.platformio.org/en/latest/projectconf/sections/env/options/build/build_flags.html
2630
; https://techoverflow.net/2021/12/14/how-to-print-all-preprocessor-flags-in-platformio/
27-
; build_flags = -O3 -std=gnu++23 -Wall -E -dM -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG -D ELEGANTOTA_USE_ASYNC_WEBSERVER=1 -D CONFIG_ASYNC_TCP_STACK_SIZE=4096
28-
; build_flags = -O3 -std=gnu++23 -latomic -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG -D ELEGANTOTA_USE_ASYNC_WEBSERVER=1 -D CONFIG_ASYNC_TCP_STACK_SIZE=4096
29-
build_flags = -O3 -std=gnu++23 -Wall -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG -D ELEGANTOTA_USE_ASYNC_WEBSERVER=1 -D CONFIG_ASYNC_TCP_STACK_SIZE=4096
30-
build_unflags = -Os -std=gnu++11 -std=gnu++14 -std=gnu++17 -std=gnu++20 -std=gnu++2b -std=gnu++2a
31+
; See also: https://interrupt.memfault.com/blog/best-and-worst-gcc-clang-compiler-flags
32+
; Note: Not using -Wpedantic, -Wundef, -Wconversion, -Wsign-conversion, & -Wpadded as it causes to warnings in libraries. -Wshadow is also a bit too much. -Wstack-usage=<stack_limit> not used because it varies.
33+
; build_flags =
34+
; -O3 -ffunction-sections -fdata-sections -Wl,--gc-sections
35+
; -std=gnu++23
36+
; -Wall -Wextra -Wdouble-promotion -Wformat=2 -Wformat-overflow=2 -Wformat-truncation=2 -fno-common -fstack-usage -Woverloaded-virtual
37+
; -E -dM -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG -D ELEGANTOTA_USE_ASYNC_WEBSERVER=1 -D CONFIG_ASYNC_TCP_STACK_SIZE=4096
38+
; build_flags = -O3 -ffunction-sections -fdata-sections -Wl,--gc-sections -std=gnu++23 -latomic -D ELEGANTOTA_USE_ASYNC_WEBSERVER=1 -D CONFIG_ASYNC_TCP_STACK_SIZE=4096
39+
build_flags =
40+
-O3 -ffunction-sections -fdata-sections -Wl,--gc-sections
41+
-std=gnu++23
42+
-Wall -Wextra -Wdouble-promotion -Wformat=2 -Wformat-overflow=2 -Wformat-truncation=2 -fno-common -fstack-usage -Woverloaded-virtual
43+
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG -D ELEGANTOTA_USE_ASYNC_WEBSERVER=1 -D CONFIG_ASYNC_TCP_STACK_SIZE=4096
44+
build_unflags =
45+
-Os
46+
-std=gnu++11 -std=gnu++14 -std=gnu++17 -std=gnu++20 -std=gnu++2b -std=gnu++2a
3147
; https://docs.platformio.org/en/latest/advanced/static-code-analysis/index.html
3248
; MISRA Rules: https://github.com/speeduino/speeduino/tree/master/misra
3349
; PVS-Studio License Comments: https://pvs-studio.com/en/blog/posts/0614/
@@ -46,9 +62,9 @@ check_flags =
4662
board = um_pros3
4763
; Extra options already in boards file
4864
build_flags =
49-
-O3
50-
-std=gnu++23
51-
-Wall
65+
-O3 -ffunction-sections -fdata-sections -Wl,--gc-sections
66+
-std=gnu++23
67+
-Wall
5268
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
5369
-I"${platformio.packages_dir}/framework-arduinoespressif32-libs/esp32s3/include/esp_driver_tsens/include/driver"
5470
; -D ARDUINO_USB_MODE=1 ; CDC/JTAG USB mode
@@ -72,17 +88,17 @@ build_flags =
7288
; board = esp32-c3-devkitm-1
7389
; Extra options already in boards file
7490
; build_flags =
75-
; -O3
91+
; -O3 -ffunction-sections -fdata-sections -Wl,--gc-sections
7692
; -std=gnu++23
77-
; -Wall
78-
; -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
79-
; -I"${platformio.packages_dir}/framework-arduinoespressif32-libs/esp32/include/esp_driver_tsens/include/driver"
80-
; ; -D ARDUINO_USB_MODE=1 ; CDC/JTAG USB mode
81-
; ; -D ARDUINO_USB_CDC_ON_BOOT=1 ; Needed for USB to enumerate when user code starts
82-
; -D ELEGANTOTA_USE_ASYNC_WEBSERVER=1
83-
; ; -D CONFIG_ASYNC_TCP_MAX_ACK_TIME=5000 ; (keep default)
84-
; ; -D CONFIG_ASYNC_TCP_PRIORITY=10 ; (keep default)
85-
; ; -D CONFIG_ASYNC_TCP_QUEUE_SIZE=64 ; (keep default)
86-
; -D CONFIG_ASYNC_TCP_RUNNING_CORE=1 ; force async_tcp task to be on same core as the app (default is core 0)
87-
; -D CONFIG_ASYNC_TCP_STACK_SIZE=4096 ; reduce the stack size (default is 16K)
93+
; -Wall -Wextra -Wdouble-promotion -Wformat=2 -Wformat-overflow=2 -Wformat-truncation=2 -fno-common -fstack-usage -Woverloaded-virtual
94+
; -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
95+
; -I"${platformio.packages_dir}/framework-arduinoespressif32-libs/esp32/include/esp_driver_tsens/include/driver"
96+
; ; -D ARDUINO_USB_MODE=1 ; CDC/JTAG USB mode
97+
; ; -D ARDUINO_USB_CDC_ON_BOOT=1 ; Needed for USB to enumerate when user code starts
98+
; -D ELEGANTOTA_USE_ASYNC_WEBSERVER=1
99+
; ; -D CONFIG_ASYNC_TCP_MAX_ACK_TIME=5000 ; (keep default)
100+
; ; -D CONFIG_ASYNC_TCP_PRIORITY=10 ; (keep default)
101+
; ; -D CONFIG_ASYNC_TCP_QUEUE_SIZE=64 ; (keep default)
102+
; -D CONFIG_ASYNC_TCP_RUNNING_CORE=1 ; force async_tcp task to be on same core as the app (default is core 0)
103+
; -D CONFIG_ASYNC_TCP_STACK_SIZE=4096 ; reduce the stack size (default is 16K)
88104

0 commit comments

Comments
 (0)