2023-02-27 17:00:23 +01:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2022, 2023 - Tillitis AB
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "assert.h"
|
2023-02-27 17:19:26 +01:00
|
|
|
#include "led.h"
|
2023-02-27 17:00:23 +01:00
|
|
|
#include "lib.h"
|
|
|
|
|
2023-03-21 14:11:08 +01:00
|
|
|
void assert_fail(const char *assertion, const char *file, unsigned int line,
|
|
|
|
const char *function)
|
2023-02-27 17:00:23 +01:00
|
|
|
{
|
|
|
|
htif_puts("assert: ");
|
2023-03-21 13:56:07 +01:00
|
|
|
htif_puts(assertion);
|
2023-02-27 17:00:23 +01:00
|
|
|
htif_puts(" ");
|
2023-03-21 13:56:07 +01:00
|
|
|
htif_puts(file);
|
2023-02-27 17:00:23 +01:00
|
|
|
htif_puts(":");
|
2023-03-21 13:56:07 +01:00
|
|
|
htif_putinthex(line);
|
2023-02-27 17:00:23 +01:00
|
|
|
htif_puts(" ");
|
2023-03-21 13:56:07 +01:00
|
|
|
htif_puts(function);
|
2023-02-27 17:00:23 +01:00
|
|
|
htif_lf();
|
|
|
|
|
2023-02-27 17:19:26 +01:00
|
|
|
forever_redflash();
|
2023-02-27 17:00:23 +01:00
|
|
|
// Not reached
|
|
|
|
}
|