-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplatformio.ini
More file actions
118 lines (108 loc) · 3.85 KB
/
Copy pathplatformio.ini
File metadata and controls
118 lines (108 loc) · 3.85 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
; Versions are pinned for reproducible builds. Before raising espressif32 or m5gfx, check
; the display and the audio on real hardware, not only the host tests.
[platformio]
default_envs = atoms3r-qemu
src_dir = src/main
test_dir = src/test
boards_dir = src/config/boards
[atoms3r_base]
platform = espressif32@7.0.1
board = atoms3r
framework = espidf
; Regenerate sdkconfig when a source fragment changes.
extra_scripts = pre:tools/sync-sdkconfig.py
monitor_speed = 115200
upload_speed = 460800
upload_protocol = esptool
debug_tool = esp-builtin
board_build.partitions = src/config/partitions/dev.csv
; For a first flash, and for checking the board itself.
[env:atoms3r-safe]
extends = atoms3r_base
build_type = debug
board_build.cmake_extra_args = -DSDKCONFIG_DEFAULTS="src/config/sdkconfig.base;src/config/sdkconfig.debug;src/config/sdkconfig.safe"
build_flags =
-DSTACKCHAN_SAFE_MODE=1
; For developing against real hardware.
[env:atoms3r-debug]
extends = atoms3r_base
build_type = debug
board_build.cmake_extra_args = -DSDKCONFIG_DEFAULTS="src/config/sdkconfig.base;src/config/sdkconfig.debug"
build_flags =
-DSTACKCHAN_SAFE_MODE=0
; For the emulator, which needs no hardware. The console moves to UART0
; there because the emulator does not implement USB.
[env:atoms3r-qemu]
extends = atoms3r_base
build_type = debug
board_build.cmake_extra_args = -DSDKCONFIG_DEFAULTS="src/config/sdkconfig.base;src/config/sdkconfig.debug;src/config/sdkconfig.safe;src/config/sdkconfig.qemu"
build_flags =
; Wi-Fi hangs the emulator during startup, so this flag finishes booting
; without a radio.
-DSTACKCHAN_QEMU=1
-DSTACKCHAN_SAFE_MODE=1
; For producing a release candidate. Uses the OTA partition layout.
[env:atoms3r-release]
extends = atoms3r_base
build_type = release
board_build.partitions = src/config/partitions/ota.csv
board_build.cmake_extra_args = -DSDKCONFIG_DEFAULTS="src/config/sdkconfig.base;src/config/sdkconfig.release"
build_flags =
-DNDEBUG
-DSTACKCHAN_SAFE_MODE=0
; Host tests and analysis for hardware-independent code.
; Visibility is limited to src/core (invariant 1).
[env:native]
platform = native@1.2.1
test_framework = unity
test_build_src = no
lib_extra_dirs = src/core
test_filter = test_native_*
build_flags =
-std=gnu++17
-Wall
-Wextra
-Wpedantic
-Werror=return-type
; clang-tidy is run separately by tools/run-clang-tidy.py.
check_tool = cppcheck
check_src_filters =
+<src/core/>
check_skip_packages = yes
; Inline suppressions keep a narrow explanation beside the affected line.
check_flags =
cppcheck: --inline-suppr --suppressions-list=src/cppcheck-suppressions.txt
; The same host tests under AddressSanitizer and UndefinedBehaviorSanitizer.
;
; C++ with fixed-size buffers is exactly the shape that static analysis reads
; but cannot execute. cppcheck, clang-tidy and CodeQL all run over src/core
; already; this lane is what actually runs the code and watches the memory.
;
; Kept out of [env:native] so the ordinary test lane stays fast, and because
; -fno-sanitize-recover turns a finding into a failed run rather than a line in
; a log nobody reads.
;
; Linux only in practice: the MinGW toolchains commonly used on Windows ship no
; libasan, so this is a CI lane rather than part of tools/check.ps1.
[env:native-sanitize]
extends = env:native
build_flags =
${env:native.build_flags}
-O1
-g
-fno-omit-frame-pointer
-fsanitize=address,undefined
-fno-sanitize-recover=all
; The same host tests again, instrumented, so test_most can be answered with a
; measured number instead of an impression. tools/check-coverage.py reads the
; gcov data and enforces the floor.
[env:native-coverage]
extends = env:native
build_flags =
${env:native.build_flags}
-O0
-g
--coverage
; --coverage in build_flags reaches the compiler but not the link line, which
; fails on __gcov_init. The runtime has to be asked for separately.
extra_scripts = pre:tools/coverage-link.py