Antonio de Angelis | 6bceab8 | 2025-07-10 17:05:14 +0100 | [diff] [blame] | 1 | /* |
| 2 | * SPDX-FileCopyrightText: Copyright The TrustedFirmware-M Contributors |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | * |
| 6 | */ |
| 7 | |
| 8 | #include <stddef.h> |
| 9 | #include <assert.h> |
| 10 | #include "tfm_tests_log_msg.h" |
| 11 | |
| 12 | #ifndef __ARMCC_VERSION |
| 13 | void __assert_func(const char *file, int line, const char *func, const char *reason) |
| 14 | { |
| 15 | LOG_MSG("Assertion failed: (%s), file %s, line %d\r\n", reason, file, line); |
| 16 | |
| 17 | while (1) { |
| 18 | ; |
| 19 | } |
| 20 | } |
| 21 | #else /* __ARMCC_VERSION */ |
| 22 | void __assert_puts(const char *msg) |
| 23 | { |
| 24 | LOG_MSG("%s\r\n", msg); |
| 25 | |
| 26 | while (1) { |
| 27 | ; |
| 28 | } |
| 29 | } |
| 30 | #endif /* __ARMCC_VERSION*/ |