A fork of https://github.com/crosspoint-reader/crosspoint-reader
1# Testing and Debugging
2
3CrossPoint runs on real hardware, so debugging usually combines local build checks and on-device logs.
4
5## Local checks
6
7Make sure `clang-format` 21+ is installed and available in `PATH` before running the formatting step.
8If needed, see [Getting Started](./getting-started.md).
9
10```sh
11./bin/clang-format-fix
12pio check --fail-on-defect low --fail-on-defect medium --fail-on-defect high
13pio run
14```
15
16## Flash and monitor
17
18Flash firmware:
19
20```sh
21pio run --target upload
22```
23
24Open serial monitor:
25
26```sh
27pio device monitor
28```
29
30Optional enhanced monitor:
31
32```sh
33python3 -m pip install pyserial colorama matplotlib
34python3 scripts/debugging_monitor.py
35```
36
37## Useful bug report contents
38
39- Firmware version and build environment
40- Exact steps to reproduce
41- Expected vs actual behavior
42- Serial logs from boot through failure
43- Whether issue reproduces after clearing `.crosspoint/` cache on SD card
44
45## Common troubleshooting references
46
47- [User Guide troubleshooting section](../../USER_GUIDE.md#7-troubleshooting-issues--escaping-bootloop)
48- [Webserver troubleshooting](../troubleshooting.md)