From b9e4fcfc6878aa05cca277ea3557299e59207965 Mon Sep 17 00:00:00 2001 From: Yaochenger <75192526+Yaochenger@users.noreply.github.com> Date: Wed, 1 Mar 2023 14:32:43 +0800 Subject: [libcpu][riscv]整合libcpu/riscv中的移植文件 提供一份公共代码于common (#6941) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 整合libcpu/riscv中的移植文件 提供一份公共代码于common 在提交本pr时,除hpmicro的内核,rv32内核bsp已完成去除大部分的冗余,大部分代码采用common中的实现。本pr的作用是进一步统一common中的文件,从而提供一份公用代码,新移植的RV32内核的BSP可以全部使用common代码。 - 在common中提供一份公用文件:interrupt_gcc.S - 修改原有的文件,将原有的中断中上下文切换代码替换为interrupt_gcc.S - 基于上述修改,修改仓库中risc-v内核的BSP与移植相关的部分 (主要包含中断入口函数 中断栈等) - 在common中提供一份公用文件:trap_common.c;提供统一中断入口函数,中断入口函数初始化,中断入口注册等函数,并完善异常时的信息输出 - 在common中提供一份公用文件:rt_hw_stack_frame.h;将栈帧结构体剥离,供用户使用 - 在上述工作完成后,在上述工作的基础上测试仓库中risc-v内核的BSP - 完善函数中的命名,完善中断栈的获取 - 提供一份详细的基于现有common文件的移植指南 #### 在什么测试环境下测试通过 - 1.CH32V307V-R1-R0 - 2.CH32V208W-R0-1V4 - 3.HPM6750EVKMINI - 4.GD32VF103V-EVAL - 5.qemu(CORE-V-MCU ) > 与上述开发板使用同样芯片的BSP均测试通过 在CH32V307V-R1-R0与HPM6750EVKMINI上基于现有移植文件进行多线程复杂场景下的长时间测试,测试过程系统运行正常。 --- libcpu/risc-v/SConscript | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'libcpu/risc-v/SConscript') diff --git a/libcpu/risc-v/SConscript b/libcpu/risc-v/SConscript index 4d74c9aff2..2883d63ce5 100644 --- a/libcpu/risc-v/SConscript +++ b/libcpu/risc-v/SConscript @@ -10,14 +10,10 @@ group = [] list = os.listdir(cwd) # add common code files -if rtconfig.CPU == "nuclei" : - group = group -elif rtconfig.CPU == "virt64" : +if rtconfig.CPU == "virt64" : group = group elif rtconfig.CPU == "c906" : group = group -elif rtconfig.CPU == "hpmicro": - group = group else : group = group + SConscript(os.path.join('common', 'SConscript')) -- cgit v1.3.1