Merge pull request #5 from mysterywolf/presupport

pre-support rt-thread software package
This commit is contained in:
Gabriel Wang 2022-06-13 01:00:42 +01:00 committed by GitHub
commit 5c2023f0d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 20 additions and 2 deletions

18
SConscript Normal file
View File

@ -0,0 +1,18 @@
Import('rtconfig')
from building import *
src = ['perf_counter.c', 'os/rt-thread/perf_os_patch_rt_thread.c']
if rtconfig.PLATFORM in ['armcc', 'armclang']: # Keil-MDK
src += ['systick_wrapper_ual.s']
if rtconfig.PLATFORM == 'gcc':
src += ['systick_wrapper_gcc.s']
cwd = GetCurrentDir()
path = [cwd]
group = []
group = DefineGroup('perf_counter', src, depend = ['PKG_USING_PERFCOUNTER'], CPPPATH = path)
Return('group')

View File

@ -28,10 +28,10 @@
__wrap_SysTick_Handler:
push {r4, r5}
push {r4, lr}
push {r4, lr}
ldr R0, =user_code_insert_to_systick_handler
blx R0
pop {r4, r5}
pop {r4, r5}
mov lr, r5
pop {r4, r5}
ldr R0, =__real_SysTick_Handler