Lines Matching +full:if +full:- +full:label +full:- +full:build

8 --------
10 In certain situations, execution of the program can not be continued in a well defined way. In ESP-
12 - CPU Exceptions: |CPU_EXCEPTIONS_LIST|
13 - System level checks and safeguards:
17 - :doc:`Interrupt watchdog <../api-reference/system/wdts>` timeout
18- :doc:`Task watchdog <../api-reference/system/wdts>` timeout (only fatal if :ref:`CONFIG_ESP_TASK…
19 - Cache access error
20 :CONFIG_ESP_SYSTEM_MEMPROT_FEATURE: - Memory protection fault
21 - Brownout detection event
22 - Stack overflow
23 - Stack smashing protection check
24 - Heap integrity check
25 - Undefined behavior sanitizer (UBSAN) checks
27 - Failed assertions, via ``assert``, ``configASSERT`` and similar macros.
29 This guide explains the procedure used in ESP-IDF for handling these errors, and provides suggestio…
32 -------------
38 .. parsed-literal::
44 .. parsed-literal::
52 - Print registers and reboot (``CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT``) — default option.
56 - Print registers and halt (``CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT``)
60 - Silent reboot (``CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT``)
64 - Invoke GDB Stub (``CONFIG_ESP_SYSTEM_PANIC_GDBSTUB``)
66 …h GDB over console UART port. This option will only provide read-only debugging or post-mortem deb…
68 - Invoke dynamic GDB Stub (``ESP_SYSTEM_GDBSTUB_RUNTIME``)
74 - If :ref:`CONFIG_{IDF_TARGET_CFG_PREFIX}_DEBUG_OCDAWARE` is enabled (which is the default), the pa…
76 - If the :doc:`Core Dump <core_dump>` feature is enabled, then the system state (task stacks and re…
78 - If :ref:`CONFIG_ESP_PANIC_HANDLER_IRAM` is disabled (disabled by default), the panic handler code…
80If this option is enabled, the panic handler code (including required UART functions) is placed in…
89 blockdiag panic-handler {
96 cpu_exception [label = "CPU Exception", shape=roundedbox];
97 sys_check [label = "Cache error,\nInterrupt WDT,\nabort()", shape=roundedbox];
98 check_ocd [label = "JTAG debugger\nconnected?", shape=diamond, height=80];
99 print_error_cause [label = "Print error/\nexception cause"];
100 use_jtag [label = "Send signal to\nJTAG debugger", shape=roundedbox];
101 dump_registers [label = "Print registers\nand backtrace"];
102 check_coredump [label = "Core dump\nenabled?", shape=diamond, height=80];
103 do_coredump [label = "Core dump\nto UART or Flash"];
104 check_gdbstub [label = "GDB Stub\nenabled?", shape=diamond, height=80];
105 do_gdbstub [label = "Start GDB Stub", shape=roundedbox];
106 halt [label = "Halt", shape=roundedbox];
107 reboot [label = "Reboot", shape=roundedbox];
108 check_halt [label = "Halt?", shape=diamond, height=80];
112 cpu_exception -> print_error_cause;
113 sys_check -> print_error_cause;
114 print_error_cause -> check_ocd;
115 check_ocd -> use_jtag [label = "Yes"];
116 check_ocd -> dump_registers [label = "No"];
117 dump_registers -> check_coredump
118 check_coredump -> do_coredump [label = "Yes"];
119 do_coredump -> check_gdbstub;
120 check_coredump -> check_gdbstub [label = "No"];
121 check_gdbstub -> check_halt [label = "No"];
122 check_gdbstub -> do_gdbstub [label = "Yes"];
123 check_halt -> halt [label = "Yes"];
124 check_halt -> reboot [label = "No"];
128 ---------------------------
164 A Register dump is not printed if the panic handler has been executed as a result of an ``abort()``…
168 …watchdog timeout, the panic handler may print additional CPU registers (EPC1-EPC4) and the registe…
170 …Counter and SP is Stack Pointer, for each stack frame of the current task. If a fatal error happen…
172 If :doc:`IDF Monitor <tools/idf-monitor>` is used, Program Counter values will be converted to code…
185 0x40082d1c: _calloc_r at /Users/user/esp/esp-idf/components/newlib/syscalls.c:51
193 … 0x400d0802: main_task at /Users/user/esp/esp-idf/components/{IDF_TARGET_PATH_NAME}/cpu_start.c:470
209 0x42001fd6: uart_write at /Users/user/esp/esp-idf/components/vfs/vfs_uart.c:201
217 …Moreover, the :doc:`IDF Monitor <tools/idf-monitor>` is also capable of generating and printing a …
234 …bove is very handy, it requires the user to use :doc:`IDF Monitor <tools/idf-monitor>`. Thus, in o…
245 …rated by the board itself (without the need for :doc:`IDF Monitor <tools/idf-monitor>`). However, …
249 .. _GDB-Stub:
252 --------
254 If the ``CONFIG_ESP_SYSTEM_PANIC_GDBSTUB`` option is enabled, the panic handler will not reset the …
256 If :doc:`IDF Monitor <tools/idf-monitor>` is used, GDB is started automatically when a GDB Stub pro…
259 $T0b#e6GNU gdb (crosstool-NG crosstool-ng-1.22.0-80-gff1f415) 7.10
265 …This GDB was configured as "--host=x86_64-build_apple-darwin16.3.0 --target={IDF_TARGET_TOOLCHAIN_…
273 Reading symbols from /Users/user/esp/example/build/example.elf...done.
274 Remote debugging using /dev/cu.usbserial-31301
280 …tion. To reset the program, exit GDB and perform an external reset: Ctrl-T Ctrl-R in IDF Monitor, …
282 .. _Guru-Meditation-Errors:
285 ----------------------
301 - FreeRTOS task function has returned. In FreeRTOS, if a task function needs to terminate, it shoul…
303 - Failure to read next instruction from SPI flash. This usually happens if:
305- Application has reconfigured the SPI flash pins as some other function (GPIO, UART, etc.). Consu…
307- Some external device has accidentally been connected to the SPI flash pins, and has interfered w…
321If this address is zero, it usually means that the application has attempted to dereference a NULL…
331 …re size. For example, a 32-bit read can only be done from a 4-byte aligned address, and a 16-bit w…
338- If the application has attempted to do an 8- or 16- bit read to, or write from, a memory region …
340 - If the application has attempted to write to a read-only memory region, such as IROM or DROM.
356 … This CPU exception indicates that the address of the instruction to execute is not 2-byte aligned.
361If this address is zero, it usually means that application attempted to dereference a NULL pointer…
371 …store size. For example, 32-bit load can only be done from 4-byte aligned address, and 16-bit load…
376 Indicates that an interrupt watchdog timeout has occurred. See :doc:`Watchdogs <../api-reference/sy…
381-IDF will temporarily disable access to external SPI Flash and SPI RAM via caches. For example, th…
388 …{IDF_TARGET_NAME} Permission Control feature is used in ESP-IDF to prevent the following types of …
393 …lities harder to exploit. Applications which rely on dynamic loading or self-modifying code may di…
398 ------------------
403 …_TARGET_NAME} has a built-in brownout detector, which is enabled by default. The brownout detector…
411 Note that if the supply voltage is dropping at a fast rate, only part of the message may be seen on…
416-IDF's heap implementation contains a number of run-time checks of the heap structure. Additional …
419 …assertion "head != NULL" failed: file "/Users/user/esp/esp-idf/components/heap/multi_heap_poisonin…
422 Consult :doc:`Heap Memory Debugging <../api-reference/system/heap_debug>` documentation for further…
427 …tion (based on GCC ``-fstack-protector*`` flags) can be enabled in ESP-IDF using :ref:`CONFIG_COMP…
453 Undefined behavior sanitizer (UBSAN) is a compiler feature which adds run-time checks for potential…
455 - overflows (multiplication overflow, signed integer overflow)
456 - shift base or exponent errors (e.g. shift by more than 32 bits)
457 - integer conversion errors
459 See `GCC documentation <https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html>`_ of ``-fs…
464 … file, component, or project level by adding the ``-fsanitize=undefined`` compiler option in the b…
466 …s recommended to disable shift-base sanitizer using ``-fno-sanitize=shift-base`` option. This is d…
470 idf_build_set_property(COMPILE_OPTIONS "-fsanitize=undefined" "-fno-sanitize=shift-base" APPEND)
479 target_compile_options(${lib} PRIVATE "-fsanitize=undefined" "-fno-sanitize=shift-base")
481 …e build system documentation for more information about :ref:`build properties<cmake-build-propert…
485 … target_compile_options(${COMPONENT_LIB} PRIVATE "-fsanitize=undefined" "-fno-sanitize=shift-base")
496 When using :doc:`IDF Monitor <tools/idf-monitor>`, the backtrace will be decoded to function names …
498 0x4008b383: panic_abort at /path/to/esp-idf/components/esp_system/panic.c:367
500 0x4008c791: esp_system_abort at /path/to/esp-idf/components/esp_system/system_api.c:106
502 0x4008c587: __ubsan_default_handler at /path/to/esp-idf/components/esp_system/ubsan.c:152
504 0x4008c6be: __ubsan_handle_out_of_bounds at /path/to/esp-idf/components/esp_system/ubsan.c:223
512 .. list-table::
514 :header-rows: 1
516 * - Name
517 - Meaning
518 * - ``type_mismatch``, ``type_mismatch_v1``
519 - Incorrect pointer value: null, unaligned, not compatible with the given type.
520 * - ``add_overflow``, ``sub_overflow``, ``mul_overflow``, ``negate_overflow``
521 - Integer overflow during addition, subtraction, multiplication, negation.
522 * - ``divrem_overflow``
523 - Integer division by 0 or ``INT_MIN``.
524 * - ``shift_out_of_bounds``
525 - Overflow in left or right shift operators.
526 * - ``out_of_bounds``
527 - Access outside of bounds of an array.
528 * - ``unreachable``
529 - Unreachable code executed.
530 * - ``missing_return``
531 - Non-void function has reached its end without returning a value (C++ only).
532 * - ``vla_bound_not_positive``
533 - Size of variable length array is not positive.
534 * - ``load_invalid_value``
535 - Value of ``bool`` or ``enum`` (C++ only) variable is invalid (out of bounds).
536 * - ``nonnull_arg``
537 - Null argument passed to a function which is declared with a ``nonnull`` attribute.
538 * - ``nonnull_return``
539 - Null value returned from a function which is declared with ``returns_nonnull`` attribute.
540 * - ``builtin_unreachable``
541 - ``__builtin_unreachable`` function called.
542 * - ``pointer_overflow``
543 - Overflow in pointer arithmetic.