summaryrefslogtreecommitdiff
path: root/libcpu
diff options
context:
space:
mode:
authorGuEe-GUI <[email protected]>2024-11-20 15:10:05 +0800
committerRbb666 <[email protected]>2024-11-20 16:11:10 +0800
commit5dda65c21b207c5337297f04e8e8fda3f324b47c (patch)
tree6ca527963e184f4914634408381dd3f59fc18827 /libcpu
parent33785ca68aa5febcfd8c63b0c8067c01fcad79f6 (diff)
[DM/FIXUP] add cortex-m23's cpuport.h
Signed-off-by: GuEe-GUI <[email protected]>
Diffstat (limited to 'libcpu')
-rw-r--r--libcpu/arm/cortex-m23/cpuport.c29
-rw-r--r--libcpu/arm/cortex-m23/cpuport.h45
2 files changed, 46 insertions, 28 deletions
diff --git a/libcpu/arm/cortex-m23/cpuport.c b/libcpu/arm/cortex-m23/cpuport.c
index 20c611a6f0..c5525d2a88 100644
--- a/libcpu/arm/cortex-m23/cpuport.c
+++ b/libcpu/arm/cortex-m23/cpuport.c
@@ -14,34 +14,7 @@
#include <rtthread.h>
-struct exception_stack_frame
-{
- rt_uint32_t r0;
- rt_uint32_t r1;
- rt_uint32_t r2;
- rt_uint32_t r3;
- rt_uint32_t r12;
- rt_uint32_t lr;
- rt_uint32_t pc;
- rt_uint32_t psr;
-};
-
-struct stack_frame
-{
- /* r4 ~ r7 low register */
- rt_uint32_t r4;
- rt_uint32_t r5;
- rt_uint32_t r6;
- rt_uint32_t r7;
-
- /* r8 ~ r11 high register */
- rt_uint32_t r8;
- rt_uint32_t r9;
- rt_uint32_t r10;
- rt_uint32_t r11;
-
- struct exception_stack_frame exception_stack_frame;
-};
+#include "cpuport.h"
/* flag in interrupt handling */
rt_uint32_t rt_interrupt_from_thread, rt_interrupt_to_thread;
diff --git a/libcpu/arm/cortex-m23/cpuport.h b/libcpu/arm/cortex-m23/cpuport.h
new file mode 100644
index 0000000000..d5bd7645a4
--- /dev/null
+++ b/libcpu/arm/cortex-m23/cpuport.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2006-2024, RT-Thread Development Team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Change Logs:
+ * Date Author Notes
+ * 2024-11-17 RT-Thread first version
+ */
+
+#ifndef __CPUPORT_H__
+#define __CPUPORT_H__
+
+#include <rtdef.h>
+
+struct exception_stack_frame
+{
+ rt_uint32_t r0;
+ rt_uint32_t r1;
+ rt_uint32_t r2;
+ rt_uint32_t r3;
+ rt_uint32_t r12;
+ rt_uint32_t lr;
+ rt_uint32_t pc;
+ rt_uint32_t psr;
+};
+
+struct stack_frame
+{
+ /* r4 ~ r7 low register */
+ rt_uint32_t r4;
+ rt_uint32_t r5;
+ rt_uint32_t r6;
+ rt_uint32_t r7;
+
+ /* r8 ~ r11 high register */
+ rt_uint32_t r8;
+ rt_uint32_t r9;
+ rt_uint32_t r10;
+ rt_uint32_t r11;
+
+ struct exception_stack_frame exception_stack_frame;
+};
+
+#endif /* __CPUPORT_H__ */