pre-support rt-thread software package

This commit is contained in:
Meco Man 2022-06-12 19:43:30 -04:00
parent b33dda6f65
commit 25c2c3da7c
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