From fc2e122ee291ee4240305e9f795e4eb274c80705 Mon Sep 17 00:00:00 2001 From: Yaochenger <1516081466@qq.com> Date: Thu, 2 Mar 2023 14:29:10 +0800 Subject: [PATCH] =?UTF-8?q?[libcpu/risc-v]=E8=BF=81=E7=A7=BBlibcpu/risc-v/?= =?UTF-8?q?hpmicro=E4=B8=AD=E7=9A=84=E6=96=87=E4=BB=B6=E8=87=B3bsp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp/hpmicro/hpm6750evk/board/SConscript | 1 + .../hpmicro/hpm6750evk/board}/trap_gcc.S | 0 bsp/hpmicro/hpm6750evkmini/board/SConscript | 1 + bsp/hpmicro/hpm6750evkmini/board/trap_gcc.S | 12 ++++++++++++ libcpu/risc-v/hpmicro/SConscript | 18 ------------------ 5 files changed, 14 insertions(+), 18 deletions(-) rename {libcpu/risc-v/hpmicro => bsp/hpmicro/hpm6750evk/board}/trap_gcc.S (100%) create mode 100644 bsp/hpmicro/hpm6750evkmini/board/trap_gcc.S delete mode 100644 libcpu/risc-v/hpmicro/SConscript diff --git a/bsp/hpmicro/hpm6750evk/board/SConscript b/bsp/hpmicro/hpm6750evk/board/SConscript index b0557f0945..9837cef2fc 100644 --- a/bsp/hpmicro/hpm6750evk/board/SConscript +++ b/bsp/hpmicro/hpm6750evk/board/SConscript @@ -10,6 +10,7 @@ src = Split(""" eth_phy_port.c fal_flash_port.c hpm_sgtl5000.c + trap_gcc.S """) CPPPATH = [cwd] diff --git a/libcpu/risc-v/hpmicro/trap_gcc.S b/bsp/hpmicro/hpm6750evk/board/trap_gcc.S similarity index 100% rename from libcpu/risc-v/hpmicro/trap_gcc.S rename to bsp/hpmicro/hpm6750evk/board/trap_gcc.S diff --git a/bsp/hpmicro/hpm6750evkmini/board/SConscript b/bsp/hpmicro/hpm6750evkmini/board/SConscript index 6245c5f443..1444a9e948 100644 --- a/bsp/hpmicro/hpm6750evkmini/board/SConscript +++ b/bsp/hpmicro/hpm6750evkmini/board/SConscript @@ -10,6 +10,7 @@ src = Split(""" rw007_port.c eth_phy_port.c fal_flash_port.c + trap_gcc.S """) CPPPATH = [cwd] diff --git a/bsp/hpmicro/hpm6750evkmini/board/trap_gcc.S b/bsp/hpmicro/hpm6750evkmini/board/trap_gcc.S new file mode 100644 index 0000000000..40de7b31c5 --- /dev/null +++ b/bsp/hpmicro/hpm6750evkmini/board/trap_gcc.S @@ -0,0 +1,12 @@ +#include "cpuport.h" + + .globl rt_hw_do_after_save_above + .type rt_hw_do_after_save_above,@function +rt_hw_do_after_save_above: + addi sp, sp, -4 + STORE ra, 0 * REGBYTES(sp) + csrr a0, mscratch + call trap_entry + LOAD ra, 0 * REGBYTES(sp) + addi sp, sp, 4 + ret \ No newline at end of file diff --git a/libcpu/risc-v/hpmicro/SConscript b/libcpu/risc-v/hpmicro/SConscript deleted file mode 100644 index 7a7620168b..0000000000 --- a/libcpu/risc-v/hpmicro/SConscript +++ /dev/null @@ -1,18 +0,0 @@ -# RT-Thread building script for component - -from building import * - -Import('rtconfig') - -cwd = GetCurrentDir() -src = Glob('*.c') + Glob('*.cpp') - -if rtconfig.PLATFORM == 'gcc': - src += Glob('*_gcc.S') - -CPPPATH = [cwd] -ASFLAGS = ' -I ' + cwd - -group = DefineGroup('CPU', src, depend = [''], CPPPATH = CPPPATH, ASFLAGS = ASFLAGS) - -Return('group')