libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
assert.c
Go to the documentation of this file.
1/*
2 * This file is part of the libopencm3 project.
3 *
4 * Copyright (C) 2012 Tomaz Solc <tomaz.solc@tablix.org>
5 *
6 * This library is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this library. If not, see <http://www.gnu.org/licenses/>.
18 */
19
21
22void __attribute__((weak)) cm3_assert_failed(void)
23{
24 while (1);
25}
26
27void __attribute__((weak)) cm3_assert_failed_verbose(
28 const char *file __attribute__((unused)),
29 int line __attribute__((unused)),
30 const char *func __attribute__((unused)),
31 const char *assert_expr __attribute__((unused)))
32{
34}
void cm3_assert_failed_verbose(const char *file, int line, const char *func, const char *assert_expr)
Called on a failed assertion with verbose messages enabled.
Definition: assert.c:27
void cm3_assert_failed(void)
Called on a failed assertion.
Definition: assert.c:22