]> git.sur5r.net Git - freertos/blob - FreeRTOS-Labs/Source/FreeRTOS-Plus-Trace/Include/trcPortDefines.h
Add the Labs projects provided in the V10.2.1_191129 zip file.
[freertos] / FreeRTOS-Labs / Source / FreeRTOS-Plus-Trace / Include / trcPortDefines.h
1 /*******************************************************************************\r
2  * Trace Recorder Library for Tracealyzer v4.1.5\r
3  * Percepio AB, www.percepio.com\r
4  *\r
5  * trcPortDefines.h\r
6  *\r
7  * Some common defines for the trace recorder.\r
8  *\r
9  * Terms of Use\r
10  * This file is part of the trace recorder library (RECORDER), which is the \r
11  * intellectual property of Percepio AB (PERCEPIO) and provided under a\r
12  * license as follows.\r
13  * The RECORDER may be used free of charge for the purpose of recording data\r
14  * intended for analysis in PERCEPIO products. It may not be used or modified\r
15  * for other purposes without explicit permission from PERCEPIO.\r
16  * You may distribute the RECORDER in its original source code form, assuming\r
17  * this text (terms of use, disclaimer, copyright notice) is unchanged. You are\r
18  * allowed to distribute the RECORDER with minor modifications intended for\r
19  * configuration or porting of the RECORDER, e.g., to allow using it on a \r
20  * specific processor, processor family or with a specific communication\r
21  * interface. Any such modifications should be documented directly below\r
22  * this comment block.  \r
23  *\r
24  * Disclaimer\r
25  * The RECORDER is being delivered to you AS IS and PERCEPIO makes no warranty\r
26  * as to its use or performance. PERCEPIO does not and cannot warrant the \r
27  * performance or results you may obtain by using the RECORDER or documentation.\r
28  * PERCEPIO make no warranties, express or implied, as to noninfringement of\r
29  * third party rights, merchantability, or fitness for any particular purpose.\r
30  * In no event will PERCEPIO, its technology partners, or distributors be liable\r
31  * to you for any consequential, incidental or special damages, including any\r
32  * lost profits or lost savings, even if a representative of PERCEPIO has been\r
33  * advised of the possibility of such damages, or for any claim by any third\r
34  * party. Some jurisdictions do not allow the exclusion or limitation of\r
35  * incidental, consequential or special damages, or the exclusion of implied\r
36  * warranties or limitations on how long an implied warranty may last, so the\r
37  * above limitations may not apply to you.\r
38  *\r
39  * Tabs are used for indent in this file (1 tab = 4 spaces)\r
40  *\r
41  * Copyright Percepio AB, 2018.\r
42  * www.percepio.com\r
43  ******************************************************************************/\r
44 \r
45 #ifndef TRC_PORTDEFINES_H\r
46 #define TRC_PORTDEFINES_H\r
47 \r
48 #define TRC_FREE_RUNNING_32BIT_INCR 1\r
49 #define TRC_FREE_RUNNING_32BIT_DECR 2\r
50 #define TRC_OS_TIMER_INCR 3\r
51 #define TRC_OS_TIMER_DECR 4\r
52 #define TRC_CUSTOM_TIMER_INCR 5\r
53 #define TRC_CUSTOM_TIMER_DECR 6\r
54 \r
55 /* Start options for vTraceEnable. */\r
56 #define TRC_INIT 0\r
57 #define TRC_START 1\r
58 #define TRC_START_AWAIT_HOST 2\r
59 \r
60 /* Command codes for TzCtrl task */\r
61 #define CMD_SET_ACTIVE      1 /* Start (param1 = 1) or Stop (param1 = 0) */\r
62 \r
63 /* The final command code, used to validate commands. */\r
64 #define CMD_LAST_COMMAND 1\r
65 \r
66 #define TRC_RECORDER_MODE_SNAPSHOT              0\r
67 #define TRC_RECORDER_MODE_STREAMING             1\r
68 \r
69 #define TRC_RECORDER_BUFFER_ALLOCATION_STATIC   (0x00)\r
70 #define TRC_RECORDER_BUFFER_ALLOCATION_DYNAMIC  (0x01)\r
71 #define TRC_RECORDER_BUFFER_ALLOCATION_CUSTOM   (0x02)\r
72 \r
73 /* Filter Groups */\r
74 #define FilterGroup0 (uint16_t)0x0001\r
75 #define FilterGroup1 (uint16_t)0x0002\r
76 #define FilterGroup2 (uint16_t)0x0004\r
77 #define FilterGroup3 (uint16_t)0x0008\r
78 #define FilterGroup4 (uint16_t)0x0010\r
79 #define FilterGroup5 (uint16_t)0x0020\r
80 #define FilterGroup6 (uint16_t)0x0040\r
81 #define FilterGroup7 (uint16_t)0x0080\r
82 #define FilterGroup8 (uint16_t)0x0100\r
83 #define FilterGroup9 (uint16_t)0x0200\r
84 #define FilterGroup10 (uint16_t)0x0400\r
85 #define FilterGroup11 (uint16_t)0x0800\r
86 #define FilterGroup12 (uint16_t)0x1000\r
87 #define FilterGroup13 (uint16_t)0x2000\r
88 #define FilterGroup14 (uint16_t)0x4000\r
89 #define FilterGroup15 (uint16_t)0x8000\r
90 \r
91 /******************************************************************************\r
92  * Supported ports\r
93  *\r
94  * TRC_HARDWARE_PORT_HWIndependent\r
95  * A hardware independent fallback option for event timestamping. Provides low\r
96  * resolution timestamps based on the OS tick.\r
97  * This may be used on the Win32 port, but may also be used on embedded hardware\r
98  * platforms. All time durations will be truncated to the OS tick frequency,\r
99  * typically 1 KHz. This means that a task or ISR that executes in less than\r
100  * 1 ms get an execution time of zero.\r
101  *\r
102  * TRC_HARDWARE_PORT_APPLICATION_DEFINED\r
103  * Allows for defining the port macros in other source code files.\r
104  *\r
105  * TRC_HARDWARE_PORT_Win32\r
106  * "Accurate" timestamping based on the Windows performance counter for Win32\r
107  * builds. Note that this gives the host machine time, not the kernel time.\r
108  *\r
109  * Hardware specific ports\r
110  * To get accurate timestamping, a hardware timer is necessary. Below are the\r
111  * available ports. Some of these are "unofficial", meaning that\r
112  * they have not yet been verified by Percepio but have been contributed by\r
113  * external developers. They should work, otherwise let us know by emailing\r
114  * support@percepio.com. Some work on any OS platform, while other are specific\r
115  * to a certain operating system.\r
116  *****************************************************************************/\r
117 \r
118 /****** Port Name ************************************* Code ** Official ** OS Platform *********/\r
119 #define TRC_HARDWARE_PORT_APPLICATION_DEFINED                   98      /*      -                       -                                       */\r
120 #define TRC_HARDWARE_PORT_NOT_SET                                               99      /*      -                       -                                       */\r
121 #define TRC_HARDWARE_PORT_HWIndependent                                 0       /*      Yes                     Any                                     */\r
122 #define TRC_HARDWARE_PORT_Win32                                                 1       /*      Yes                     FreeRTOS on Win32       */\r
123 #define TRC_HARDWARE_PORT_Atmel_AT91SAM7                                2       /*      No                      Any                                     */\r
124 #define TRC_HARDWARE_PORT_Atmel_UC3A0                                   3       /*      No                      Any                                     */\r
125 #define TRC_HARDWARE_PORT_ARM_Cortex_M                                  4       /*      Yes                     Any                                     */\r
126 #define TRC_HARDWARE_PORT_Renesas_RX600                                 6       /*      Yes                     Any                                     */\r
127 #define TRC_HARDWARE_PORT_MICROCHIP_PIC24_PIC32                 7       /*      Yes                     Any                                     */\r
128 #define TRC_HARDWARE_PORT_TEXAS_INSTRUMENTS_TMS570_RM48 8       /*      Yes                     Any                                     */\r
129 #define TRC_HARDWARE_PORT_TEXAS_INSTRUMENTS_MSP430              9       /*      No                      Any                                     */\r
130 #define TRC_HARDWARE_PORT_XILINX_PPC405                                 11      /*      No                      FreeRTOS                        */\r
131 #define TRC_HARDWARE_PORT_XILINX_PPC440                                 12      /*      No                      FreeRTOS                        */\r
132 #define TRC_HARDWARE_PORT_XILINX_MICROBLAZE                             13      /*      No                      Any                                     */\r
133 #define TRC_HARDWARE_PORT_NXP_LPC210X                                   14      /*      No                      Any                                     */\r
134 #define TRC_HARDWARE_PORT_ARM_CORTEX_A9                                 15      /*      Yes                     Any                                     */\r
135 #define TRC_HARDWARE_PORT_POWERPC_Z4                    16  /*  No          FreeRTOS            */\r
136 #define TRC_HARDWARE_PORT_Altera_NiosII                                 17  /*  No          Any                 */\r
137 #endif /*TRC_PORTDEFINES_H*/\r