You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-10Lines changed: 14 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# perf_counter (v2.5.3-dev)
1
+
# perf_counter (v2.5.3)
2
2
A dedicated performance counter mainly for micro-controllers.
3
3
4
4
For Cortex-M processors, the Systick will be used by default. The `perf_counter` shares the SysTick with users' original SysTick function(s) without interfering with it. This library will bring new functionalities, such as performance counter,` perfc_delay_us`, `perfc_delay_ms` and `clock()` service defined in `time.h`.
@@ -23,7 +23,7 @@ A dedicated template is provided to port the perf_counter to different architect
23
23
24
24
- Easy to port to a different architecture with a porting template
25
25
-**Provide Free Services**
26
-
-Do**NOT** interfere with existing SysTick-based applications
26
+
-Would**NOT** interfere with existing SysTick-based applications
27
27
-**Support most of the arm compilers**
28
28
- Arm Compiler 5 (armcc), Arm Compiler 6 (armclang)
29
29
- arm gcc
@@ -37,10 +37,13 @@ A dedicated template is provided to port the perf_counter to different architect
37
37
-`perfc_delay_us()` and `perfc_delay_ms()` with **64bit return value**.
38
38
- Adds weak entries `perfc_delay_us_user_code_in_loop()` and `perfc_delay_ms_user_code_in_loop()` for users to override, e.g. feeding the watchdog.
39
39
- Provides Timestamp services via `get_system_ticks()`, `get_system_us` and `get_system_ms()`.
40
+
-**[new]** When passing `false` to `perfc_init()`, it is possible to use perf_counter in ISRs or global interrupt handling is disabled.
41
+
-**[new]** Users can call micro-seconds related APIs even when the system timer clock is less than 1MHz.
40
42
-**Support both RTOS and bare-metal environments**
41
-
- Support SysTick Reconfiguration
42
-
- Support changing System Frequency
43
-
- Support stack-overflow detection in RTOS environment via `perfc_check_task_stack_canary_safe()`
43
+
- Supports SysTick Reconfiguration
44
+
- Supports changing System Frequency
45
+
- Supports stack-overflow detection in RTOS environment via `perfc_check_task_stack_canary_safe()`
46
+
-**[new]** Adds macro `__PERFC_SAFE ` to avoid blocking high priority ISRs and tasks. Users should define the system timer priority level with macro `__PERFC_SYSTIMER_PRIORITY__ `. In Cortex-M, `0` means the highest configurable exception level.
44
47
-**Utilities for C language enhancement**
45
48
- Macros to detect compilers, e.g. `__IS_COMPILER_ARM_COMPILER_6__`, `__IS_COMPILER_LLVM__` etc.
46
49
- Macros to detect compiler features:
@@ -57,18 +60,19 @@ A dedicated template is provided to port the perf_counter to different architect
57
60
- A dedicated macro `__perfc_sync_barrier__()` for code barrier.
58
61
- Macros to measure stack usage
59
62
- Adds a macro `__stack_usage__()` and `__stack_usage_max__()` to measure the stack usage for a given code segment.
60
-
-**[new]**Adds a macro `ISR()` to measure the stack usage of a given Cortex-M Exception handling.
63
+
- Adds a macro `ISR()` to measure the stack usage of a given Cortex-M Exception handling.
61
64
- You can define macro `__PERFC_STACK_CHECK_IN_ISR__` in project configuration to enable this feature.
62
-
-**[new]**You can define macro `__PERFC_STACK_WATERMARK_U32__` in your project configuration to override the default watermark, i.e. `0xDEADBEEF`.
63
-
-**[new]**Supports for architectures that use growing-upward stacks. You can define macro `__PERFC_STACK_GROWS_UPWARD__` to switch.
65
+
- You can define macro `__PERFC_STACK_WATERMARK_U32__` in your project configuration to override the default watermark, i.e. `0xDEADBEEF`.
66
+
- Supports for architectures that use growing-upward stacks. You can define macro `__PERFC_STACK_GROWS_UPWARD__` to switch.
64
67
- Adds C Language Extensions
65
68
- Adds Coroutine support
66
69
- Adds watermark to stack and users can call `perfc_coroutine_stack_remain()` to get the stack usage info.
67
70
- Defining macro `__PERFC_COROUTINE_NO_STACK_CHECK__` in **compilation command line** disables the stack-checking feature.
68
71
- Adds protoThread support with/without the coroutine.
72
+
-**[new]** Adds timeout feature in **wait_xxxx**
69
73
70
74
71
-
### Updates
75
+
### Important Updates
72
76
73
77
- Following functions/macros are **deprecated**, please use the version with `perfc_` as prefix:
74
78
-`init_cycle_counter()` -> `perfc_init()`
@@ -79,7 +83,7 @@ A dedicated template is provided to port the perf_counter to different architect
79
83
-`with()` -> `perfc_with()`
80
84
-`foreach()` -> `perfc_foreach()`
81
85
82
-
-**[new]**You can define the macro `__PERFC_NO_DEPRECATED__` to disable the alias of the deprecated APIs.
86
+
- You can define the macro `__PERFC_NO_DEPRECATED__` to disable the alias of the deprecated APIs.
0 commit comments