1 /* 2 * Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd. 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #pragma once 8 9 extern void mcuboot_assert_handler(const char *file, int line, const char *func); 10 11 #ifdef assert 12 #undef assert 13 #endif 14 #define assert(arg) \ 15 do { \ 16 if (!(arg)) { \ 17 mcuboot_assert_handler(__FILE__, __LINE__, __func__); \ 18 } \ 19 } while(0) 20