diff options
Diffstat (limited to 'src/hc32f460/main.c')
-rw-r--r-- | src/hc32f460/main.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/hc32f460/main.c b/src/hc32f460/main.c new file mode 100644 index 00000000..a641667f --- /dev/null +++ b/src/hc32f460/main.c @@ -0,0 +1,28 @@ +// Code to setup clocks on Huada HC32F460 +// +// Copyright (C) 2022 Steven Gotthardt <gotthardt@gmail.com> +// +// This file may be distributed under the terms of the GNU GPLv3 license. + +#include "autoconf.h" // CONFIG_MACH_AVR +#include "sched.h" +#include "system_hc32f460.h" + + +/**************************************************************** + * Startup + ****************************************************************/ + +// Main entry point - called from armcm_boot.c:ResetHandler() +void __attribute__((noreturn)) +armcm_main(void) +{ + // sets the system clock speed variable for library use + SystemInit(); + + // manage the system + sched_main(); + + // never get here + for (;;) ; +} |