Skip to content

Commit 03361ee

Browse files
committed
ThreadX: Add Xtensa example to EPK
- tx_execution_profile.h now defines an Xtensa example in addition to the existing Cortex example
1 parent 68ead42 commit 03361ee

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

utility/execution_profile_kit/tx_execution_profile.h

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ typedef unsigned long EXECUTION_TIME_SOURCE_TYPE;
5656

5757
/* Define basic constants for the execution profile kit. */
5858

59-
/* Xtensa target definition */
59+
#if defined(__XTENSA__)
60+
61+
/* Example for Xtensa targets: */
6062
#ifndef TX_EXECUTION_TIME_SOURCE
6163
#include <xtensa/config/core.h>
6264
#if XCHAL_HAVE_CCOUNT
@@ -66,6 +68,16 @@ typedef unsigned long EXECUTION_TIME_SOURCE_TYPE;
6668
#define TX_EXECUTION_TIME_SOURCE 0
6769
#endif
6870
#endif
71+
72+
#else /* __XTENSA__ */
73+
74+
/* Example for Cortex-M targets: */
75+
#ifndef TX_EXECUTION_TIME_SOURCE
76+
#define TX_EXECUTION_TIME_SOURCE (EXECUTION_TIME_SOURCE_TYPE) *((volatile ULONG *) 0xE0001004)
77+
#endif
78+
79+
#endif /* __XTENSA__ */
80+
6981
#ifndef TX_EXECUTION_MAX_TIME_SOURCE
7082
#define TX_EXECUTION_MAX_TIME_SOURCE 0xFFFFFFFF
7183
#endif

0 commit comments

Comments
 (0)