mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-08-04 04:24:09 -06:00
armcm_reset: Add a new helper file defining command_reset()
Add a generic ARM Cortex-M implementation of the "reset" command. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
80e17b1e53
commit
1c6a8267f9
7 changed files with 21 additions and 26 deletions
|
@ -20,8 +20,9 @@ CFLAGS_klipper.elf += -T $(OUT)src/generic/armcm_link.ld
|
|||
$(OUT)klipper.elf: $(OUT)src/generic/armcm_link.ld
|
||||
|
||||
# Add source files
|
||||
src-y += stm32/main.c stm32/watchdog.c stm32/gpio.c generic/armcm_boot.c
|
||||
src-y += generic/crc16_ccitt.c generic/armcm_irq.c generic/armcm_timer.c
|
||||
src-y += stm32/main.c stm32/watchdog.c stm32/gpio.c generic/crc16_ccitt.c
|
||||
src-y += generic/armcm_boot.c generic/armcm_irq.c generic/armcm_timer.c
|
||||
src-y += generic/armcm_reset.c
|
||||
src-$(CONFIG_MACH_STM32F1) += ../lib/stm32f1/system_stm32f1xx.c
|
||||
src-$(CONFIG_MACH_STM32F1) += stm32/stm32f1.c
|
||||
src-$(CONFIG_MACH_STM32F4) += ../lib/stm32f4/system_stm32f4xx.c
|
||||
|
|
|
@ -11,13 +11,6 @@
|
|||
|
||||
DECL_CONSTANT_STR("MCU", CONFIG_MCU);
|
||||
|
||||
void
|
||||
command_reset(uint32_t *args)
|
||||
{
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
DECL_COMMAND_FLAGS(command_reset, HF_IN_SHUTDOWN, "reset");
|
||||
|
||||
// Main entry point
|
||||
int
|
||||
main(void)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue