zephyr/subsys/shell/modules/kernel_service/panic.c
Tomasz Bursztyka b4f9242a6a shell: kernel: Add a panic command
For testing purposes only. Testing the fatal error handler or
a coredump backend. Or just out of curiosity.

Signed-off-by: Tomasz Bursztyka <tobu@bang-olufsen.dk>
2025-03-29 07:44:11 -04:00

23 lines
368 B
C

/*
* Copyright (c) 2025 Bang & Olufsen
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "kernel_shell.h"
#include <zephyr/sys/reboot.h>
static int cmd_kernel_panic(const struct shell *sh,
size_t argc, char **argv)
{
ARG_UNUSED(argc);
ARG_UNUSED(argv);
k_panic();
return 0;
}
KERNEL_CMD_ADD(panic, NULL, "Please, panic now!", cmd_kernel_panic);