-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplatformio.ini
More file actions
45 lines (41 loc) · 1.66 KB
/
Copy pathplatformio.ini
File metadata and controls
45 lines (41 loc) · 1.66 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
; Validation build for the codec2 library itself. Consumers pull this repo in
; through lib_deps and never see this file.
;
; pio test -e native full mode set
; pio test -e native-meshtastic-modes only the modes Meshtastic ships
;
; Runs natively on Windows; needs a gcc on PATH (MSYS2 ucrt64 works):
; export PATH="/c/msys64/ucrt64/bin:$PATH"
;
; There are no cross-compile envs here on purpose. An Arduino env needs a sketch
; to link and a library has none, so scaffolding one up would test the sketch
; rather than the library. Cross validation happens where the library is
; actually consumed, in the firmware build matrix.
[platformio]
src_dir = src
[env]
; -lm because glibc keeps the math library separate. Codec 2 is float throughout
; and pulls in expf, cosf, sqrtf, atan2f, log10f and sincosf; MSYS2 folds those
; into libc, so leaving it off still links on Windows and nowhere else.
build_flags = -I src -lm
; The library under test lives in src/; pio test skips src_dir without this.
test_build_src = yes
[env:native]
platform = native
test_framework = unity
build_flags = ${env.build_flags} -O2 -Wall
; Same suite with only the shipped modes. Modes compiled out are skipped rather
; than failed, so this proves the switches neither break the build nor make
; codec2_create() misbehave - it must return NULL, which the audio module relies
; on when a stored config names a mode this build does not carry.
[env:native-meshtastic-modes]
platform = native
test_framework = unity
build_flags =
${env.build_flags}
-O2 -Wall
-DCODEC2_MODE_EN_DEFAULT=0
-DCODEC2_MODE_2400_EN=1
-DCODEC2_MODE_1400_EN=1
-DCODEC2_MODE_700C_EN=1
-DCODEC2_MODE_450_EN=1