minor update

This commit is contained in:
Gabriel Wang 2023-04-03 22:44:54 +01:00
parent a05b2d2c24
commit 9c06e5bc58
5 changed files with 8 additions and 4 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<package schemaVersion="1.4" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="PACK.xsd">
<package schemaVersion="1.7.7" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="https://raw.githubusercontent.com/Open-CMSIS-Pack/Open-CMSIS-Pack-Spec/v1.7.7/schema/PACK.xsd">
<vendor>GorgonMeducer</vendor>
<name>perf_counter</name>
<description>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</description>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<package schemaVersion="1.4" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="PACK.xsd">
<package schemaVersion="1.7.7" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="https://raw.githubusercontent.com/Open-CMSIS-Pack/Open-CMSIS-Pack-Spec/v1.7.7/schema/PACK.xsd">
<vendor>GorgonMeducer</vendor>
<name>perf_counter</name>
<description>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</description>

View File

@ -22,7 +22,7 @@ if [ `uname -s` = "Linux" ]
PATH_TO_ADD="$CMSIS_PACK_PATH/CMSIS/Utilities/Linux64/"
else
CMSIS_PACK_PATH="/C/Users/gabriel/AppData/Local/Arm/Packs/ARM/CMSIS/5.9.0"
PATH_TO_ADD="/C/Program Files (x86)/7-Zip/:$CMSIS_PACK_PATH/CMSIS/Utilities/Win32/:/C/xmllint/"
PATH_TO_ADD="/C/Program Files/7-Zip/:$CMSIS_PACK_PATH/CMSIS/Utilities/Win32/:/C/xmllint/"
fi
[[ ":$PATH:" != *":$PATH_TO_ADD}:"* ]] && PATH="${PATH}:${PATH_TO_ADD}"
echo $PATH_TO_ADD appended to PATH

View File

@ -80,10 +80,12 @@ task_cycle_info_t * get_rtos_task_cycle_info(void)
void __perf_os_patch_init(void)
{
#ifdef PKG_USING_PERF_COUNTER
#ifdef PKG_PERF_COUNTER_USING_THREAD_STATISTIC
rt_tick_sethook(user_code_insert_to_systick_handler);
#endif
#if !defined(PKG_USING_PERF_COUNTER) || (defined(PKG_PERF_COUNTER_USING_THREAD_STATISTIC))
rt_scheduler_sethook(__rt_thread_scheduler_hook);
#endif
}
#ifdef PKG_USING_PERF_COUNTER
@ -91,6 +93,7 @@ void __ensure_systick_wrapper(void)
{
}
#ifdef PKG_PERF_COUNTER_USING_THREAD_STATISTIC
#define DBG_TAG "perf_counter"
#define DBG_LVL DBG_INFO
#include <rtdbg.h>
@ -103,4 +106,5 @@ static int _perf_counter_init(void)
return 0;
}
INIT_PREV_EXPORT(_perf_counter_init);
#endif /* PKG_PERF_COUNTER_USING_THREAD_STATISTIC */
#endif /* PKG_USING_PERF_COUNTER */