mirror of
https://github.com/GorgonMeducer/perf_counter.git
synced 2025-01-17 19:13:03 +08:00
add macro __PERF_COUNTER_CFG_USE_SYSTICK_WRAPPER__
This commit is contained in:
parent
944d318d69
commit
fd72aa568e
@ -16,8 +16,10 @@
|
||||
<repository type="git">https://github.com/GorgonMeducer/perf_counter.git</repository>
|
||||
|
||||
<releases>
|
||||
<release date="2022-07-08" version="1.9.8-dev2" url="https://raw.githubusercontent.com/GorgonMeducer/perf_counter/CMSIS-Pack/cmsis-pack/GorgonMeducer.perf_counter.1.9.8-dev2.pack">
|
||||
<release date="2022-07-08" version="1.9.8" url="https://raw.githubusercontent.com/GorgonMeducer/perf_counter/CMSIS-Pack/cmsis-pack/GorgonMeducer.perf_counter.1.9.8.pack">
|
||||
- Improve delay accuracy
|
||||
- Fix RT-Thread stack-fully-used issue
|
||||
- introduce macro __PERF_COUNTER_CFG_USE_SYSTICK_WRAPPER__
|
||||
</release>
|
||||
<release date="2022-06-15" version="1.9.6" url="https://github.com/GorgonMeducer/perf_counter/raw/88c8db41730d0f4ab84708e828398ecaab434e24/cmsis-pack/GorgonMeducer.perf_counter.1.9.6.pack">
|
||||
- Add RT-Thread Package
|
||||
@ -175,7 +177,7 @@
|
||||
-->
|
||||
|
||||
<components>
|
||||
<bundle Cbundle="Performance Counter" Cclass="Utilities" Cversion="1.9.6">
|
||||
<bundle Cbundle="Performance Counter" Cclass="Utilities" Cversion="1.9.8">
|
||||
<description>A dedicated performance counter for Cortex-M systick.</description>
|
||||
<doc>documents/Doxygen/html/index.html</doc>
|
||||
<component Cgroup="perf_counter" Csub="Core" Cvariant="Library" isDefaultVariant="true" condition="CMSIS-CORE">
|
||||
@ -188,6 +190,7 @@
|
||||
<RTE_Components_h>
|
||||
|
||||
#define __PERF_COUNTER__
|
||||
#define __PERF_COUNTER_CFG_USE_SYSTICK_WRAPPER__
|
||||
</RTE_Components_h>
|
||||
</component>
|
||||
|
||||
@ -202,6 +205,7 @@
|
||||
<RTE_Components_h>
|
||||
|
||||
#define __PERF_COUNTER__
|
||||
#define __PERF_COUNTER_CFG_USE_SYSTICK_WRAPPER__
|
||||
</RTE_Components_h>
|
||||
</component>
|
||||
|
||||
|
10
README.md
10
README.md
@ -1,4 +1,4 @@
|
||||
# perf_counter (v1.9.8-dev)
|
||||
# perf_counter (v1.9.8)
|
||||
A dedicated performance counter for Cortex-M Systick. It shares the SysTick with users' original SysTick function(s) without interfering with it. This library will bring new functionalities, such as performance counter,` delay_us` and `clock()` service defined in `time.h`.
|
||||
|
||||
### Features:
|
||||
@ -203,14 +203,6 @@ void SysTick_Handler(void)
|
||||
...
|
||||
}
|
||||
```
|
||||
Implement an empty funciton `__ensure_systick_wrapper()` as there is no wrapper actually used in this deployment method:
|
||||
|
||||
```c
|
||||
void __ensure_systick_wrapper(void)
|
||||
{
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
7. Make sure the `SystemCoreClock` is updated with the same value as CPU frequency.
|
||||
|
@ -236,12 +236,14 @@ void init_cycle_counter(bool bIsSysTickOccupied)
|
||||
s_lSystemClockCounts = 0; // reset system cycle counter
|
||||
s_nSystemMS = 0; // reset system millisecond counter
|
||||
|
||||
#if defined(__PERF_COUNTER_CFG_USE_SYSTICK_WRAPPER__)
|
||||
#if defined(__IS_COMPILER_ARM_COMPILER_5__) \
|
||||
|| defined(__IS_COMPILER_ARM_COMPILER_6__) \
|
||||
|| defined(__IS_COMPILER_GCC__) \
|
||||
|| defined(__IS_COMPILER_LLVM__)
|
||||
extern void __ensure_systick_wrapper(void);
|
||||
__ensure_systick_wrapper();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
__perf_os_patch_init();
|
||||
|
Loading…
x
Reference in New Issue
Block a user