add reboot cmd for arm and delete shutcmd

This commit is contained in:
Wang_Weigen
2021-05-13 10:59:05 +08:00
parent 9fb9a3a2ec
commit ed1010d84b
7 changed files with 14 additions and 98 deletions

View File

@@ -16,6 +16,7 @@
#include "svc_handle.h"
#include "stm32f4xx.h"
#include <board.h>
#include <shell.h>
#if (defined ( __GNUC__ ) && defined ( __VFP_FP__ ) && !defined(__SOFTFP__))
#define USE_FPU 1
@@ -410,13 +411,8 @@ void MemFaultHandle(uintptr_t *sp)
}
void ShutdownCpu(void)
{
KPrintf("shutdown...\n");
CHECK(0);
}
__attribute__((weak)) void HwCpuReset(void)
{
SCB_AIRCR = SCB_RESET_VALUE;
}
SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC)|SHELL_CMD_PARAM_NUM(0), Reboot, HwCpuReset, reset machine );