[libcpu/risc-v]迁移libcpu/risc-v/hpmicro中的文件至bsp

This commit is contained in:
Yaochenger 2023-03-02 14:29:10 +08:00 committed by Man, Jianting (Meco)
parent 6aa2445522
commit fc2e122ee2
5 changed files with 14 additions and 18 deletions

View File

@ -10,6 +10,7 @@ src = Split("""
eth_phy_port.c
fal_flash_port.c
hpm_sgtl5000.c
trap_gcc.S
""")
CPPPATH = [cwd]

View File

@ -10,6 +10,7 @@ src = Split("""
rw007_port.c
eth_phy_port.c
fal_flash_port.c
trap_gcc.S
""")
CPPPATH = [cwd]

View File

@ -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

View File

@ -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')