diff options
Diffstat (limited to 'utility/execution_profile_kit/tx_execution_profile.h')
| -rw-r--r-- | utility/execution_profile_kit/tx_execution_profile.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/utility/execution_profile_kit/tx_execution_profile.h b/utility/execution_profile_kit/tx_execution_profile.h index fa09ac2e..0b82082c 100644 --- a/utility/execution_profile_kit/tx_execution_profile.h +++ b/utility/execution_profile_kit/tx_execution_profile.h @@ -56,10 +56,28 @@ typedef unsigned long EXECUTION_TIME_SOURCE_TYPE; /* Define basic constants for the execution profile kit. */ +#if defined(__XTENSA__) + +/* Example for Xtensa targets: */ +#ifndef TX_EXECUTION_TIME_SOURCE +#include <xtensa/config/core.h> +#if XCHAL_HAVE_CCOUNT +#include <xtensa/tie/xt_timer.h> +#define TX_EXECUTION_TIME_SOURCE (EXECUTION_TIME_SOURCE_TYPE) XT_RSR_CCOUNT() +#else +#define TX_EXECUTION_TIME_SOURCE 0 +#endif +#endif + +#else /* __XTENSA__ */ + /* Example for Cortex-M targets: */ #ifndef TX_EXECUTION_TIME_SOURCE #define TX_EXECUTION_TIME_SOURCE (EXECUTION_TIME_SOURCE_TYPE) *((volatile ULONG *) 0xE0001004) #endif + +#endif /* __XTENSA__ */ + #ifndef TX_EXECUTION_MAX_TIME_SOURCE #define TX_EXECUTION_MAX_TIME_SOURCE 0xFFFFFFFF #endif |
