test_panic.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #pragma once
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10. /* Utility functions */
  11. void die(const char* msg) __attribute__ ((noreturn));
  12. /* Functions causing an exception/panic in different ways */
  13. void test_abort(void);
  14. void test_abort_cache_disabled(void);
  15. void test_int_wdt(void);
  16. void test_task_wdt_cpu0(void);
  17. void test_hw_stack_guard_cpu0(void);
  18. #if CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH && CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY
  19. void test_panic_extram_stack(void);
  20. #endif
  21. #if !CONFIG_FREERTOS_UNICORE
  22. void test_task_wdt_cpu1(void);
  23. void test_task_wdt_both_cpus(void);
  24. #endif
  25. void test_storeprohibited(void);
  26. void test_cache_error(void);
  27. void test_int_wdt_cache_disabled(void);
  28. void test_stack_overflow(void);
  29. void test_illegal_instruction(void);
  30. void test_instr_fetch_prohibited(void);
  31. void test_ub(void);
  32. void test_assert(void);
  33. void test_assert_cache_disabled(void);
  34. void test_illegal_access(void);
  35. #ifdef __cplusplus
  36. }
  37. #endif