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, APIs for delay, clock() defined in time.h etc.
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
Active development ...
- Add support for RT-Thread-nano
- Add an API for checking stack overflow
- Improve the support for the Arm Compiler 6.21
- Other minor updates
- Mitigate time-rolling-back issue when calling get_system_ticks in exception handlers that have higher priorities than the SysTick_Handler.
- Other minor updates
- Add __cpu_time__
- Support reconfiguring the SysTick
- Suppress warnings
- Other minor updates
- Update perfc_is_time_out_ms and perf_is_time_out_us
- Enhance Timer Services
- Other minor changes
- Update stop_cycle_counter prototype to solve return-value-overflow issue
- Provide timer service for EventRecorder automatically
- Remove the bundle from cmsis-pack
- Add Coremark
- Fix the source variant support for Armv8-M processors
- Other minor fixes
- Fix the support for RT-Thread
- Improve the way to import systick wrapper
- Add get_system_us to avoid 64bit integer divider.
- Minor Update
- Improve delay accuracy
- Fix RT-Thread stack-fully-used issue
- introduce macro __PERF_COUNTER_CFG_USE_SYSTICK_WRAPPER__
- Add RT-Thread Package
- Add new API update_perf_counter() for notifying perf_counter that SystemCoreClock has been updated
- Add a macro __perf_counter_printf__ to retarget printf
- Add a macor __PERF_COUNT_PLATFORM_SPECIFIC_HEADER__ for people to insert a platform specific header file.
- Add Doxygen
- Other minor changes
- Add support for Cortex-M85, Star-MC1 and all other Armv8.1-M processors
- Update Readme
- Mitigate some clang warnings
- Minor update for RTOS support
- Fix CONNECT macro cannot connect two parameters issue.
- Add UNUSED_PARAM
- Add support for C++ env
- Other minor updates
- Add API get_system_ms() to avoid int64_t divide operation.
- Add API delay_ms()
- 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.
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.
#define __PERF_COUNTER__ 1
#define __PERF_COUNTER_CFG_USE_SYSTICK_WRAPPER__ 1
A dedicated performance counter for Cortex-M systick.
#define __PERF_COUNTER__ 1
#define __PERF_COUNTER_CFG_USE_SYSTICK_WRAPPER__ 1
Coremark
//! \brief Enable Coremark
#define __PERF_COUNTER_COREMARK__ 1
#define MAIN_HAS_NOARGC 1
#define MAIN_HAS_NORETURN 1
#define HAS_FLOAT 1
A Patch for RTX5
//! \brief Enable RTOS Patch for perf_counter
#define __PERF_CNT_USE_RTOS__ 1
A Patch for FreeRTOS
//! \brief Enable RTOS Patch for perf_counter
#define __PERF_CNT_USE_RTOS__ 1
#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__ 1
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__ 1
#define TX_ENABLE_EXECUTION_CHANGE_NOTIFY
A dedicated performance counter for Cortex-M systick.