GorgonMeducer perf_counter A dedicated performance counter for the Cortex-M Systick. It shares the SysTick with users' original SysTick function without interfering with it. This library will bring new functionalities, such as performance counter, delay_us and clock() service defined in time.h https://raw.githubusercontent.com/GorgonMeducer/perf_counter/CMSIS-Pack/cmsis-pack/ https://github.com/GorgonMeducer/perf_counter/issues lib/LICENSE https://github.com/GorgonMeducer/perf_counter.git - Add preprocessing in perf_counter.h to detect whether GNU extension is enabled or not. - Enhance RTOS support - Add macro __PERF_COUNTER__ in RTE_Components.h for compile-time detection. - Fix a bug found in __cycleof__. The __cycle_counter__ was not updated with the measure result. - Add macros for version info. Cortex-M SysTick Performance Analaysis Arm Compiler 5 (armcc) or Arm Compiler 6 (armclang). GNU Tools for Arm Embedded Processors. Support All Cortex-M based processors Require CMSIS-CORE Support Require RTX5 Support Require FreeRTOS Support Require Perf_Counter Core Compile Cortex-M Processors with GNU Tools for Arm Embedded Processors. Compile Cortex-M Processors with GNU Tools for Arm Embedded Processors. Compile Cortex-M Processors with GNU Tools for Arm Embedded Processors. Compile Cortex-M Processors with GNU Tools for Arm Embedded Processors. A dedicated performance counter for Cortex-M systick. A dedicated performance counter for Cortex-M systick. #define __PERF_COUNTER__ A dedicated performance counter for Cortex-M systick. #define __PERF_COUNTER__ A Patch for RTX5 //! \brief Enable RTOS Patch for perf_counter #define __PERF_CNT_USE_RTOS__ A Patch for FreeRTOS //! \brief Enable RTOS Patch for perf_counter #define __PERF_CNT_USE_RTOS__ #define traceTASK_SWITCHED_OUT_DISABLE #define traceTASK_SWITCHED_IN_DISABLE extern void __freertos_evr_on_task_switched_out (void *ptTCB); extern void __freertos_evr_on_task_switched_in(void *ptTCB, unsigned int uxTopPriority) ; # define traceTASK_SWITCHED_OUT() \ __freertos_evr_on_task_switched_out(pxCurrentTCB) # define traceTASK_SWITCHED_IN() \ __freertos_evr_on_task_switched_in(pxCurrentTCB, uxTopReadyPriority) A Patch for RT-Thread //! \brief Enable RTOS Patch for perf_counter #define __PERF_CNT_USE_RTOS__ struct rt_thread; extern void __rt_thread_scheduler_hook(struct rt_thread *from, struct rt_thread *to); #define __on_rt_scheduler_hook(from, to) __rt_thread_scheduler_hook((from), (to)) A Patch for ThreadX //! \brief Enable RTOS Patch for perf_counter #define __PERF_CNT_USE_RTOS__ #define TX_ENABLE_EXECUTION_CHANGE_NOTIFY