diff --git a/GorgonMeducer.perf_counter.pdsc b/GorgonMeducer.perf_counter.pdsc index b59caf1..143bd85 100644 --- a/GorgonMeducer.perf_counter.pdsc +++ b/GorgonMeducer.perf_counter.pdsc @@ -320,7 +320,7 @@ - + A user define system timer @@ -332,7 +332,7 @@ - +#define __PERFC_USE_PORTING__ 1 #define __PERFC_USE_USER_CUSTOM_PORTING__ 1 #define __PERFC_CFG_DISABLE_DEFAULT_SYSTICK_PORTING__ 1 #define __PERFC_CFG_PORTING_INCLUDE__ "perfc_port_user.h" @@ -340,7 +340,7 @@ - + Using the Performande Monitor Unit @@ -352,7 +352,7 @@ - +#define __PERFC_USE_PORTING__ 1 #define __PERFC_USE_PMU_PORTING__ 1 #define __PERFC_CFG_DISABLE_DEFAULT_SYSTICK_PORTING__ 1 #define __PERFC_CFG_PORTING_INCLUDE__ "perfc_port_pmu.h" diff --git a/perf_counter.h b/perf_counter.h index 43ee5b1..3a68969 100644 --- a/perf_counter.h +++ b/perf_counter.h @@ -322,13 +322,17 @@ extern "C" { __super_loop_monitor__() #endif -#if defined(__PERF_COUNTER_CFG_USE_SYSTICK_WRAPPER__) +#if defined(__PERF_COUNTER_CFG_USE_SYSTICK_WRAPPER__) \ + && ( !defined(__PERFC_USE_PORTING__) \ + || (defined(__PERFC_USE_PORTING__) && (0 == __PERFC_USE_PORTING__)) ) + # if defined(__IS_COMPILER_ARM_COMPILER_5__) && __IS_COMPILER_ARM_COMPILER_5__ # pragma import(__ensure_systick_wrapper) # elif (defined(__GNUC__) || defined(__clang__)) \ && (!defined(__IS_COMPILER_IAR__) || !__IS_COMPILER_IAR__) __asm(".global __ensure_systick_wrapper\n\t"); # endif + #endif /*! @} */ diff --git a/systick_wrapper_gcc.S b/systick_wrapper_gcc.S index 822d321..948ce28 100644 --- a/systick_wrapper_gcc.S +++ b/systick_wrapper_gcc.S @@ -1,5 +1,5 @@ ;/**************************************************************************** -;* Copyright 2022 Gorgon Meducer (Email:embedded_zhuoran@hotmail.com) * +;* Copyright 2024 Gorgon Meducer (Email:embedded_zhuoran@hotmail.com) * ;* * ;* Licensed under the Apache License, Version 2.0 (the "License"); * ;* you may not use this file except in compliance with the License. * @@ -15,7 +15,6 @@ ;* * ;****************************************************************************/ -#if !__PERFC_CFG_DISABLE_DEFAULT_SYSTICK_PORTING__ .syntax unified .arch armv6-m @@ -42,5 +41,4 @@ __wrap_SysTick_Handler: .type __ensure_systick_wrapper, %function __ensure_systick_wrapper: - bx lr -#endif \ No newline at end of file + bx lr \ No newline at end of file diff --git a/systick_wrapper_gnu.s b/systick_wrapper_gnu.s index f364451..d9c4d32 100644 --- a/systick_wrapper_gnu.s +++ b/systick_wrapper_gnu.s @@ -1,5 +1,5 @@ ;/**************************************************************************** -;* Copyright 2022 Gorgon Meducer (Email:embedded_zhuoran@hotmail.com) * +;* Copyright 2024 Gorgon Meducer (Email:embedded_zhuoran@hotmail.com) * ;* * ;* Licensed under the Apache License, Version 2.0 (the "License"); * ;* you may not use this file except in compliance with the License. * @@ -14,13 +14,7 @@ ;* limitations under the License. * ;* * ;****************************************************************************/ -#if defined(_RTE_) -# include "RTE_Components.h" -#endif -#if !defined(__RTE_PERFC_PORTING_USER_DEFINED__) && !defined(__RTE_PERFC_PORTING_PMU__) - -#if !__PERFC_CFG_DISABLE_DEFAULT_SYSTICK_PORTING__ .syntax unified .arch armv6-m @@ -47,7 +41,4 @@ $Sub$$SysTick_Handler: .type __ensure_systick_wrapper, %function __ensure_systick_wrapper: - bx lr -#endif - -#endif \ No newline at end of file + bx lr \ No newline at end of file