aboutsummaryrefslogtreecommitdiffstats
path: root/src/hc32f460/main.c
diff options
context:
space:
mode:
authorSteven Gotthardt <gotthardt@gmail.com>2022-12-18 15:05:51 -0700
committerKevin O'Connor <kevin@koconnor.net>2023-02-13 12:12:27 -0500
commit72b6bd7efa1ae282220b4bdcfb789075807ebfd2 (patch)
treed420a1b2f33e41868662ec4d5f9cc6b9e794ebe4 /src/hc32f460/main.c
parent94cbf5ff48199f4652450fbb8de682f662a2cc5a (diff)
downloadkutter-72b6bd7efa1ae282220b4bdcfb789075807ebfd2.tar.gz
kutter-72b6bd7efa1ae282220b4bdcfb789075807ebfd2.tar.xz
kutter-72b6bd7efa1ae282220b4bdcfb789075807ebfd2.zip
hc32f460: Add support for hc32f460 micro-controllers
Signed-off-by: Steven Gotthardt <gotthardt@gmail.com>
Diffstat (limited to 'src/hc32f460/main.c')
-rw-r--r--src/hc32f460/main.c28
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 (;;) ;
+}