This repository has been archived by the owner on May 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
platformio.ini
54 lines (46 loc) · 1.71 KB
/
platformio.ini
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
; PlatformIO Project Configuration File.
;
; Usually, this file describes a standalone application that runs on its
; supported platforms. TinyWoT is only a library, so this file only
; contains a (default) environment for invoking unit tests and static
; code analysis on the current machine.
;
; SPDX-FileCopyrightText: 2023 Junde Yhi <[email protected]>
; SPDX-License-Identifier: CC0-1.0
[platformio]
default_envs = test_native
; Run unit tests on the local build machine.
[env:test_native]
platform = native
build_type = test
; These options will be passed on to compiler invocations on compliation
; units (individual files).
build_flags = -std=c99 -g -fsanitize=address,undefined -Wall -Wextra -Wpedantic
; Build code in `src/` as well. See:
; https://docs.platformio.org/en/latest/advanced/unit-testing/structure/shared-code.html
test_build_src = true
; This also enables static code analysis.
check_tool = cppcheck
; These checks are ignored:
;
; - any one that is marked inline with a cppcheck-suppress comment.
; - missingIncludeSystem: "Cppcheck does not need standard library
; headers to get proper results."
; - unusedFunction: we're a library mate.
;
; These addons are enabled for enhanced checks:
;
; - cert: Check SEI CERT C Coding Standard compliance. See:
; https://wiki.sei.cmu.edu/confluence/display/c/SEI+CERT+C+Coding+Standard
check_flags =
cppcheck: --language=c --std=c99 --enable=all
--inline-suppr --suppress=missingIncludeSystem --suppress=unusedFunction
--addon=cert
; Run unit tests on an Arduino Uno Rev3 board, which has an ATmega328p MCU.
[env:test_uno]
platform = atmelavr
framework = arduino
board = uno
build_type = test
build_flags = -std=c99 -g -Wall -Wextra -Wpedantic
test_build_src = true