| 1 |
# |
| 2 |
# Copyright © 2017-2022 The Crust Firmware Authors. |
| 3 |
# SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-only |
| 4 |
# |
| 5 |
|
| 6 |
menu "Debugging options" |
| 7 |
|
| 8 |
config ASSERT |
| 9 |
bool "Enable runtime assertion checking" |
| 10 |
default y |
| 11 |
help |
| 12 |
Enable assert() logic to validate assumptions and find |
| 13 |
bugs at runtime. If in doubt, say Y. |
| 14 |
|
| 15 |
config ASSERT_VERBOSE |
| 16 |
bool "Verbose logging of assertion failures" |
| 17 |
depends on ASSERT |
| 18 |
help |
| 19 |
When an assertion fails, print detailed information |
| 20 |
about it to the console. This includes the expression |
| 21 |
that was checked, as well as the file and line number of |
| 22 |
the call to assert(). |
| 23 |
|
| 24 |
The address of the failed assertion is printed with or |
| 25 |
without this option. Since all of the other details can |
| 26 |
be derived from the address and debug info (see below), |
| 27 |
enabling this option is only necessary when debug info |
| 28 |
is unavailable. |
| 29 |
|
| 30 |
Note that this option significantly increases the size |
| 31 |
of the final firmware binary. If in doubt, say N. |
| 32 |
|
| 33 |
config COMPILE_TEST |
| 34 |
bool "Allow compiling a firmware that does not run" |
| 35 |
help |
| 36 |
Some combinations of options may not make sense or may |
| 37 |
not produce a functional firmware, for example if the |
| 38 |
firmware becomes too large, or if it contains multiple |
| 39 |
drivers for the same piece of hardware. |
| 40 |
|
| 41 |
This is mostly useful for development and automated |
| 42 |
testing. Users should say N. |
| 43 |
|
| 44 |
config DEBUG_INFO |
| 45 |
bool "Compile the firmware with debug info" |
| 46 |
default y |
| 47 |
help |
| 48 |
When compiling the firmware, generate debug information |
| 49 |
for use with gdb. These are stripped out of the final |
| 50 |
firmware binary, so this option does not affect the |
| 51 |
loaded firmware size. If in doubt, say Y. |
| 52 |
|
| 53 |
config DEBUG_LOG |
| 54 |
bool "Print additional debug-level log messages" |
| 55 |
help |
| 56 |
This enables the debug() logging macro to print verbose |
| 57 |
informational messages that may aid in debugging. |
| 58 |
|
| 59 |
config DEBUG_MONITOR |
| 60 |
bool "Provide an interactive debug monitor while off/asleep" |
| 61 |
help |
| 62 |
While the system is off or asleep, accept simple commands |
| 63 |
on the serial port. Parsing is extremely basic, and line |
| 64 |
editing is not supported. Available commands are: |
| 65 |
m <address> [value] -- read/write memory |
| 66 |
w -- trigger wakeup |
| 67 |
|
| 68 |
With a PMIC present, additional commands are supported: |
| 69 |
p <address> [value] -- read/write PMIC registers |
| 70 |
|
| 71 |
config DEBUG_MONITOR_PMIC |
| 72 |
bool |
| 73 |
depends on DEBUG_MONITOR |
| 74 |
default MFD_AXP20X |
| 75 |
|
| 76 |
config DEBUG_PRINT_BATTERY |
| 77 |
bool "Print battery consumption periodically while off/asleep" |
| 78 |
depends on MFD_AXP223 || MFD_AXP803 |
| 79 |
help |
| 80 |
While the system is off or asleep and the battery is |
| 81 |
discharging, print the battery voltage, discharge |
| 82 |
current, and calculated power usage every 30 seconds. |
| 83 |
|
| 84 |
config DEBUG_PRINT_LATENCY |
| 85 |
bool "Print average latency after each state transition" |
| 86 |
help |
| 87 |
After each system state transition, calculate the |
| 88 |
average latency of the main loop, in AR100 clock cycles. |
| 89 |
The latency will be printed after the firmware has |
| 90 |
performed 10000 iterations in that state. |
| 91 |
|
| 92 |
config DEBUG_PRINT_SPRS |
| 93 |
bool "Print the contents of Special Purpose Registers at boot" |
| 94 |
depends on ARCH_OR1K |
| 95 |
help |
| 96 |
The OpenRISC 1000 architecture defines various Special |
| 97 |
Purpose Registers, or SPRs, that describe the particular |
| 98 |
CPU implementation. Enable this option to print a subset |
| 99 |
of these SPRs in a human-readable format during boot. |
| 100 |
|
| 101 |
config DEBUG_RECORD_STEPS |
| 102 |
bool "Record steps of the suspend/resume process in the RTC" |
| 103 |
depends on !PLATFORM_A83T # No RTC |
| 104 |
help |
| 105 |
Record the start of various steps of the suspend and |
| 106 |
resume processes in one of the RTC's general purpose |
| 107 |
registers. This provides an approximation of what the |
| 108 |
firmware was doing at the time of a hang. The last step |
| 109 |
will remain available in the RTC until a clean shutdown |
| 110 |
or reboot, or until power is removed. |
| 111 |
|
| 112 |
config DEBUG_VERIFY_DRAM |
| 113 |
bool "Verify DRAM contents after controller resume" |
| 114 |
help |
| 115 |
After reinitializing the DRAM controller during system |
| 116 |
resume, verify that DRAM contents were preserved via a |
| 117 |
simple checksum. |
| 118 |
|
| 119 |
The algorithm is very simplistic, and only a small |
| 120 |
portion of DRAM is checked, so there is no guarantee |
| 121 |
that corruption will be detected. |
| 122 |
|
| 123 |
endmenu |