summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFan Yang <[email protected]>2024-04-30 20:11:47 +0800
committerGitHub <[email protected]>2024-04-30 20:11:47 +0800
commitc21ba6985d5a9d6f6926799ada4faa92c20cb8a0 (patch)
tree56925ef9e80afb228561cb273204c4efab48c0f5
parent0ccc315bced299555e478a7ee6b886341a1c227e (diff)
Fix compiling eror in hpmicro bsp (#8889)
- added 'DEVICE' to rtconfig.py - fixed compiling error cuased by change in interrupt_gcc.S Signed-off-by: Fan YANG <[email protected]>
-rw-r--r--bsp/hpmicro/hpm6200evk/rtconfig.py3
-rw-r--r--bsp/hpmicro/hpm6300evk/rtconfig.py3
-rw-r--r--bsp/hpmicro/hpm6750evk/rtconfig.py3
-rw-r--r--bsp/hpmicro/hpm6750evk2/rtconfig.py3
-rw-r--r--bsp/hpmicro/hpm6750evkmini/rtconfig.py3
-rw-r--r--libcpu/risc-v/common/interrupt_gcc.S1
-rw-r--r--libcpu/risc-v/common/trap_common.c7
7 files changed, 18 insertions, 5 deletions
diff --git a/bsp/hpmicro/hpm6200evk/rtconfig.py b/bsp/hpmicro/hpm6200evk/rtconfig.py
index 8239c953e7..098ea53e71 100644
--- a/bsp/hpmicro/hpm6200evk/rtconfig.py
+++ b/bsp/hpmicro/hpm6200evk/rtconfig.py
@@ -66,7 +66,8 @@ if PLATFORM == 'gcc':
STRIP = PREFIX + 'strip'
ARCH_ABI = ' -mcmodel=medlow '
- CFLAGS = ARCH_ABI + ' -DUSE_NONVECTOR_MODE=1 ' + ' -ffunction-sections -fdata-sections -fno-common '
+ DEVICE = ARCH_ABI + ' -DUSE_NONVECTOR_MODE=1 ' + ' -ffunction-sections -fdata-sections -fno-common '
+ CFLAGS = DEVICE
AFLAGS = CFLAGS
LFLAGS = ARCH_ABI + ' --specs=nano.specs --specs=nosys.specs -u _printf_float -u _scanf_float -nostartfiles -Wl,--gc-sections '
diff --git a/bsp/hpmicro/hpm6300evk/rtconfig.py b/bsp/hpmicro/hpm6300evk/rtconfig.py
index 149fa5ff5f..45a1fbff7a 100644
--- a/bsp/hpmicro/hpm6300evk/rtconfig.py
+++ b/bsp/hpmicro/hpm6300evk/rtconfig.py
@@ -66,7 +66,8 @@ if PLATFORM == 'gcc':
STRIP = PREFIX + 'strip'
ARCH_ABI = ' -mcmodel=medlow '
- CFLAGS = ARCH_ABI + ' -DUSE_NONVECTOR_MODE=1 ' + ' -ffunction-sections -fdata-sections -fno-common '
+ DEVICE = ARCH_ABI + ' -DUSE_NONVECTOR_MODE=1 ' + ' -ffunction-sections -fdata-sections -fno-common '
+ CFLAGS = DEVICE
AFLAGS = CFLAGS
LFLAGS = ARCH_ABI + ' --specs=nano.specs --specs=nosys.specs -u _printf_float -u _scanf_float -nostartfiles -Wl,--gc-sections '
diff --git a/bsp/hpmicro/hpm6750evk/rtconfig.py b/bsp/hpmicro/hpm6750evk/rtconfig.py
index 77251ab7eb..f199f0f365 100644
--- a/bsp/hpmicro/hpm6750evk/rtconfig.py
+++ b/bsp/hpmicro/hpm6750evk/rtconfig.py
@@ -66,7 +66,8 @@ if PLATFORM == 'gcc':
STRIP = PREFIX + 'strip'
ARCH_ABI = ' -mcmodel=medlow '
- CFLAGS = ARCH_ABI + ' -DUSE_NONVECTOR_MODE=1 ' + ' -ffunction-sections -fdata-sections -fno-common '
+ DEVICE = ARCH_ABI + ' -DUSE_NONVECTOR_MODE=1 ' + ' -ffunction-sections -fdata-sections -fno-common '
+ CFLAGS = DEVICE
AFLAGS = CFLAGS
LFLAGS = ARCH_ABI + ' --specs=nano.specs --specs=nosys.specs -u _printf_float -u _scanf_float -nostartfiles -Wl,--gc-sections '
diff --git a/bsp/hpmicro/hpm6750evk2/rtconfig.py b/bsp/hpmicro/hpm6750evk2/rtconfig.py
index 77251ab7eb..f199f0f365 100644
--- a/bsp/hpmicro/hpm6750evk2/rtconfig.py
+++ b/bsp/hpmicro/hpm6750evk2/rtconfig.py
@@ -66,7 +66,8 @@ if PLATFORM == 'gcc':
STRIP = PREFIX + 'strip'
ARCH_ABI = ' -mcmodel=medlow '
- CFLAGS = ARCH_ABI + ' -DUSE_NONVECTOR_MODE=1 ' + ' -ffunction-sections -fdata-sections -fno-common '
+ DEVICE = ARCH_ABI + ' -DUSE_NONVECTOR_MODE=1 ' + ' -ffunction-sections -fdata-sections -fno-common '
+ CFLAGS = DEVICE
AFLAGS = CFLAGS
LFLAGS = ARCH_ABI + ' --specs=nano.specs --specs=nosys.specs -u _printf_float -u _scanf_float -nostartfiles -Wl,--gc-sections '
diff --git a/bsp/hpmicro/hpm6750evkmini/rtconfig.py b/bsp/hpmicro/hpm6750evkmini/rtconfig.py
index 77251ab7eb..f199f0f365 100644
--- a/bsp/hpmicro/hpm6750evkmini/rtconfig.py
+++ b/bsp/hpmicro/hpm6750evkmini/rtconfig.py
@@ -66,7 +66,8 @@ if PLATFORM == 'gcc':
STRIP = PREFIX + 'strip'
ARCH_ABI = ' -mcmodel=medlow '
- CFLAGS = ARCH_ABI + ' -DUSE_NONVECTOR_MODE=1 ' + ' -ffunction-sections -fdata-sections -fno-common '
+ DEVICE = ARCH_ABI + ' -DUSE_NONVECTOR_MODE=1 ' + ' -ffunction-sections -fdata-sections -fno-common '
+ CFLAGS = DEVICE
AFLAGS = CFLAGS
LFLAGS = ARCH_ABI + ' --specs=nano.specs --specs=nosys.specs -u _printf_float -u _scanf_float -nostartfiles -Wl,--gc-sections '
diff --git a/libcpu/risc-v/common/interrupt_gcc.S b/libcpu/risc-v/common/interrupt_gcc.S
index 6204e4be44..fc916dd821 100644
--- a/libcpu/risc-v/common/interrupt_gcc.S
+++ b/libcpu/risc-v/common/interrupt_gcc.S
@@ -214,6 +214,7 @@ SW_handler:
.section .text.trap_entry
.align 2
+ .weak trap_entry
.global trap_entry
trap_entry:
#ifdef ARCH_RISCV_FPU
diff --git a/libcpu/risc-v/common/trap_common.c b/libcpu/risc-v/common/trap_common.c
index 6f7352cd56..3cbbfeb008 100644
--- a/libcpu/risc-v/common/trap_common.c
+++ b/libcpu/risc-v/common/trap_common.c
@@ -109,3 +109,10 @@ rt_weak void rt_show_stack_frame(void)
rt_kprintf("t6 : 0x%08x\r\n", s_stack_frame->t6);
#endif
}
+
+/**
+ * Trap Handler
+ */
+rt_weak void handle_trap(rt_uint32_t mcause, rt_uint32_t mepc, rt_uint32_t sp)
+{
+} \ No newline at end of file