]> begriffs open source - freertos/blob - FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/Include/trcPortDefines.h
Update to the latest trace recorder library.
[freertos] / FreeRTOS-Plus / Source / FreeRTOS-Plus-Trace / Include / trcPortDefines.h
1 /*******************************************************************************\r
2  * Trace Recorder Library for Tracealyzer v3.1.2\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, 2017.\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 \r
74 /******************************************************************************\r
75  * Supported ports\r
76  *\r
77  * TRC_HARDWARE_PORT_HWIndependent\r
78  * A hardware independent fallback option for event timestamping. Provides low\r
79  * resolution timestamps based on the OS tick.\r
80  * This may be used on the Win32 port, but may also be used on embedded hardware\r
81  * platforms. All time durations will be truncated to the OS tick frequency,\r
82  * typically 1 KHz. This means that a task or ISR that executes in less than\r
83  * 1 ms get an execution time of zero.\r
84  *\r
85  * TRC_HARDWARE_PORT_APPLICATION_DEFINED\r
86  * Allows for defining the port macros in other source code files.\r
87  *\r
88  * TRC_HARDWARE_PORT_Win32\r
89  * "Accurate" timestamping based on the Windows performance counter for Win32\r
90  * builds. Note that this gives the host machine time, not the kernel time.\r
91  *\r
92  * Hardware specific ports\r
93  * To get accurate timestamping, a hardware timer is necessary. Below are the\r
94  * available ports. Some of these are "unofficial", meaning that\r
95  * they have not yet been verified by Percepio but have been contributed by\r
96  * external developers. They should work, otherwise let us know by emailing\r
97  * support@percepio.com. Some work on any OS platform, while other are specific\r
98  * to a certain operating system.\r
99  *****************************************************************************/\r
100 \r
101 /****** Port Name ************************************* Code ** Official ** OS Platform *********/\r
102 #define TRC_HARDWARE_PORT_APPLICATION_DEFINED                   98      /*      -                       -                                       */\r
103 #define TRC_HARDWARE_PORT_NOT_SET                                               99      /*      -                       -                                       */\r
104 #define TRC_HARDWARE_PORT_HWIndependent                                 0       /*      Yes                     Any                                     */\r
105 #define TRC_HARDWARE_PORT_Win32                                                 1       /*      Yes                     FreeRTOS on Win32       */\r
106 #define TRC_HARDWARE_PORT_Atmel_AT91SAM7                                2       /*      No                      Any                                     */\r
107 #define TRC_HARDWARE_PORT_Atmel_UC3A0                                   3       /*      No                      Any                                     */\r
108 #define TRC_HARDWARE_PORT_ARM_Cortex_M                                  4       /*      Yes                     Any                                     */\r
109 #define TRC_HARDWARE_PORT_Renesas_RX600                                 6       /*      Yes                     Any                                     */\r
110 #define TRC_HARDWARE_PORT_MICROCHIP_PIC24_PIC32                 7       /*      Yes                     Any                                     */\r
111 #define TRC_HARDWARE_PORT_TEXAS_INSTRUMENTS_TMS570_RM48 8       /*      Yes                     Any                                     */\r
112 #define TRC_HARDWARE_PORT_TEXAS_INSTRUMENTS_MSP430              9       /*      No                      Any                                     */\r
113 #define TRC_HARDWARE_PORT_XILINX_PPC405                                 11      /*      No                      FreeRTOS                        */\r
114 #define TRC_HARDWARE_PORT_XILINX_PPC440                                 12      /*      No                      FreeRTOS                        */\r
115 #define TRC_HARDWARE_PORT_XILINX_MICROBLAZE                             13      /*      No                      Any                                     */\r
116 #define TRC_HARDWARE_PORT_NXP_LPC210X                                   14      /*      No                      Any                                     */\r
117 #define TRC_HARDWARE_PORT_ARM_CORTEX_A9                                 15      /*      Yes                     Any                                     */\r
118 #define TRC_HARDWARE_PORT_POWERPC_Z4                    16  /*  No          FreeRTOS            */\r
119 \r
120 #endif /*TRC_PORTDEFINES_H*/\r