]> git.sur5r.net Git - freertos/blob - FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/ThirdParty/TraceRecorderSrc/Configuration - template/trcPort.h
Split the LPC18xx FreeRTOS+UDP drivers between those that use the LPCOpen library...
[freertos] / FreeRTOS-Plus / Demo / FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC / ThirdParty / TraceRecorderSrc / Configuration - template / trcPort.h
1 /******************************************************************************* \r
2  * FreeRTOS+Trace v2.3.0 Recorder Library\r
3  * Percepio AB, www.percepio.com\r
4  *\r
5  * trcPort.h\r
6  *\r
7  * Contains together with trcPort.c all portability issues of the trace recorder \r
8  * library.\r
9  *\r
10  * Terms of Use\r
11  * This software is copyright Percepio AB. The recorder library is free for\r
12  * use together with Percepio products. You may distribute the recorder library\r
13  * in its original form, including modifications in trcPort.c and trcPort.h\r
14  * given that these modification are clearly marked as your own modifications\r
15  * and documented in the initial comment section of these source files. \r
16  * This software is the intellectual property of Percepio AB and may not be \r
17  * sold or in other ways commercially redistributed without explicit written \r
18  * permission by Percepio AB.\r
19  *\r
20  * Disclaimer \r
21  * The trace tool and recorder library is being delivered to you AS IS and \r
22  * Percepio AB makes no warranty as to its use or performance. Percepio AB does \r
23  * not and cannot warrant the performance or results you may obtain by using the \r
24  * software or documentation. Percepio AB make no warranties, express or \r
25  * implied, as to noninfringement of third party rights, merchantability, or \r
26  * fitness for any particular purpose. In no event will Percepio AB, its \r
27  * technology partners, or distributors be liable to you for any consequential, \r
28  * incidental or special damages, including any lost profits or lost savings, \r
29  * even if a representative of Percepio AB has been advised of the possibility \r
30  * of such damages, or for any claim by any third party. Some jurisdictions do \r
31  * not allow the exclusion or limitation of incidental, consequential or special \r
32  * damages, or the exclusion of implied warranties or limitations on how long an \r
33  * implied warranty may last, so the above limitations may not apply to you.\r
34  *\r
35  * FreeRTOS+Trace is available as Free Edition and in two premium editions.\r
36  * You may use the premium features during 30 days for evaluation.\r
37  * Download FreeRTOS+Trace at http://www.percepio.com/products/downloads/\r
38  *\r
39  * Copyright Percepio AB, 2012.\r
40  * www.percepio.com\r
41  ******************************************************************************/\r
42 \r
43 #ifndef TRCPORT_H\r
44 #define TRCPORT_H\r
45 \r
46 /* If FreeRTOS Win32 port */\r
47 #ifdef WIN32\r
48 \r
49    #undef _WIN32_WINNT\r
50    #define _WIN32_WINNT 0x0600\r
51 \r
52    /* Standard includes. */\r
53    #include <stdio.h>\r
54    #include <windows.h>\r
55    #include <direct.h>\r
56 \r
57 /*******************************************************************************\r
58  * The Win32 port by default saves the trace to file and then kills the\r
59  * program when the recorder is stopped, to facilitate quick, simple tests\r
60  * of the recorder.\r
61  ******************************************************************************/\r
62    #define WIN32_PORT_SAVE_WHEN_STOPPED 1\r
63    #define WIN32_PORT_EXIT_WHEN_STOPPED 1\r
64 \r
65 #endif\r
66 \r
67 #define DIRECTION_INCREMENTING 1\r
68 #define DIRECTION_DECREMENTING 2\r
69 \r
70 /******************************************************************************\r
71  * Supported ports\r
72  * \r
73  * PORT_HWIndependent\r
74  * A hardware independent fallback option for event timestamping. Provides low \r
75  * resolution timestamps based on the OS tick.\r
76  * This may be used on the Win32 port, but may also be used on embedded hardware \r
77  * platforms. Note that this gives suboptimal display in FreeRTOS+Trace. All \r
78  * time durations will be truncated to the OS tick frequency, typically 1 KHz. \r
79  * This means that a task or ISR that executes in less than 1 ms get an exection \r
80  * time of zero. They are however still visible in FreeRTOS+Trace. \r
81  *\r
82  * PORT_Win32\r
83  * "Accurate" timestamping based on the Windows permance counter. Note that\r
84  * this gives the host machine time, not the simulated FreeRTOS time (tick \r
85  * count). The timing of the Win32 FreeRTOS build is not real-time, since it \r
86  * depends on the scheduling and tick rate of Windows, which is very slow.\r
87  *\r
88  * Officially supported hardware timer ports:\r
89  * - PORT_Atmel_AT91SAM7\r
90  * - PORT_Atmel_UC3A0\r
91  * - PORT_ARM_CortexM \r
92  * - PORT_Renesas_RX600\r
93  * - PORT_Microchip_dsPIC_AND_PIC24\r
94  *\r
95  * We also provide several "unofficial" hardware-specific ports. There have \r
96  * been developed by external contributors, and have not yet been verified \r
97  * by Percepio AB. Let us know if you have problems getting these to work.\r
98  * \r
99  * Unoffical hardware specific ports provided are:\r
100  * - PORT_TEXAS_INSTRUMENTS_TMS570\r
101  * - PORT_TEXAS_INSTRUMENTS_MSP430\r
102  * - PORT_MICROCHIP_PIC32\r
103  * - PORT_XILINX_PPC405\r
104  * - PORT_XILINX_PPC440\r
105  * - PORT_XILINX_MICROBLAZE\r
106  * - PORT_NXP_LPC210X\r
107  *\r
108  *****************************************************************************/\r
109 \r
110 #define PORT_NOT_SET                          -1\r
111 \r
112 /*** Officially supported hardware timer ports *******************************/\r
113 #define PORT_HWIndependent                     0\r
114 #define PORT_Win32                             1\r
115 #define PORT_Atmel_AT91SAM7                    2\r
116 #define PORT_Atmel_UC3A0                       3\r
117 #define PORT_ARM_CortexM                       4\r
118 #define PORT_Renesas_RX600                     5\r
119 #define PORT_Microchip_dsPIC_AND_PIC24         6\r
120 \r
121 /*** Unofficial ports, provided by external developers, not yet verified *****/\r
122 #define PORT_TEXAS_INSTRUMENTS_TMS570          7\r
123 #define PORT_TEXAS_INSTRUMENTS_MSP430          8\r
124 #define PORT_MICROCHIP_PIC32                   9\r
125 #define PORT_XILINX_PPC405                    10\r
126 #define PORT_XILINX_PPC440                    11\r
127 #define PORT_XILINX_MICROBLAZE                12\r
128 #define PORT_NXP_LPC210X                      13\r
129 \r
130 /*** Select your port here! **************************************************/\r
131 #define SELECTED_PORT PORT_NOT_SET\r
132 /*****************************************************************************/\r
133 \r
134 #if (SELECTED_PORT == PORT_NOT_SET) \r
135 #error "You need to define SELECTED_PORT here!"\r
136 #endif\r
137 \r
138 /*******************************************************************************\r
139  * IRQ_PRIORITY_ORDER\r
140  *\r
141  * Macro which should be defined as an integer of 0 or 1.\r
142  *\r
143  * This should be 0 if lower irq priority values implies higher priority \r
144  * levels, such as on ARM Cortex M. If the opposite scheme is used, i.e., \r
145  * if higher irq priority values means higher priority, this should be 1.\r
146  *\r
147  * This setting is not critical. It is used only to sort and colorize the \r
148  * interrupts in priority order, in case you record interrupts using\r
149  * the vTraceStoreISRBegin and vTraceStoreISREnd routines.\r
150  *\r
151  * We provide this setting for some hardware architectures below:\r
152  * - ARM Cortex M:       0 (lower irq priority values are more significant)\r
153  * - Atmel AT91SAM7x:    1 (higher irq priority values are more significant)\r
154  * - Atmel AVR32:        1 (higher irq priority values are more significant)\r
155  * - Renesas RX600:      1 (higher irq priority values are more significant)\r
156  * - Microchip PIC24:    0 (lower irq priority values are more significant)\r
157  * - Microchip dsPIC:    0 (lower irq priority values are more significant)\r
158  * - TI TMS570:          0 (lower irq priority values are more significant)\r
159  * - Freescale HCS08:    0 (lower irq priority values are more significant)\r
160  * - Freescale HCS12:    0 (lower irq priority values are more significant)\r
161  * - PowerPC 405:        0 (lower irq priority values are more significant)\r
162  * - PowerPC 440:        0 (lower irq priority values are more significant)\r
163  * - Freescale ColdFire: 1 (higher irq priority values are more significant)\r
164  * - NXP LPC210x:        0 (lower irq priority values are more significant)\r
165  * - MicroBlaze:        0  (lower irq priority values are more significant)\r
166  *\r
167  * If your chip is not on the above list, and you perhaps know this detail by \r
168  * heart, please inform us by e-mail to support@percepio.com.\r
169  *\r
170  ******************************************************************************\r
171  *\r
172  * HWTC Macros \r
173  *\r
174  * These four HWTC macros provides a hardware isolation layer representing a \r
175  * generic hardware timer/counter used for driving the operating system tick, \r
176  * such as the SysTick feature of ARM Cortex M3/M4, or the PIT of the Atmel \r
177  * AT91SAM7X.\r
178  *\r
179  * HWTC_COUNT: The current value of the counter. This is expected to be reset \r
180  * a each tick interrupt. Thus, when the tick handler starts, the counter has \r
181  * already wrapped.\r
182  *\r
183  * HWTC_COUNT_DIRECTION: Should be one of:\r
184  * - DIRECTION_INCREMENTING - for hardware timer/counters of incrementing type\r
185  *   such as the PIT on Atmel AT91SAM7X.\r
186  *   When the counter value reach HWTC_PERIOD, it is reset to zero and the\r
187  *   interrupt is signaled.\r
188  * - DIRECTION_DECREMENTING - for hardware timer/counters of decrementing type\r
189  *   such as the SysTick on ARM Cortex M3/M4 chips.\r
190  *   When the counter value reach 0, it is reset to HWTC_PERIOD and the\r
191  *   interrupt is signaled.\r
192  *\r
193  * HWTC_PERIOD: The number of increments or decrements of HWTC_COUNT between\r
194  * two tick interrupts. This should preferably be mapped to the reload\r
195  * register of the hardware timer, to make it more portable between chips in the \r
196  * same family. The macro should in most cases be (reload register + 1).\r
197  *\r
198  * HWTC_DIVISOR: If the timer frequency is very high, like on the Cortex M chips\r
199  * (where the SysTick runs at the core clock frequency), the "differential \r
200  * timestamping" used in the recorder will more frequently insert extra XTS \r
201  * events to store the timestamps, which increases the event buffer usage. \r
202  * In such cases, to reduce the number of XTS events and thereby get longer \r
203  * traces, you use HWTC_DIVISOR to scale down the timestamps and frequency.\r
204  * Assuming a OS tick rate of 1 KHz, it is suggested to keep the effective timer\r
205  * frequency below 65 MHz to avoid an excessive amount of XTS events. Thus, a\r
206  * Cortex M chip running at 72 MHZ should use a HWTC_DIVISOR of 2, while a \r
207  * faster chip require a higher HWTC_DIVISOR value. \r
208  *\r
209  * The HWTC macros and uiTracePortGetTimeStamp is the main porting issue\r
210  * or the trace recorder library. Typically you should not need to change\r
211  * the code of uiTracePortGetTimeStamp if using the HWTC macros.\r
212  *\r
213  * FREE LICENSE OFFER FROM PERCEPIO\r
214  *\r
215  * For silicon companies and non-corporate FreeRTOS users (researchers, students,\r
216  * hobbyists or early-phase startups) we have the following offer: \r
217  * Provide a hardware port for our FreeRTOS recorder and get a FREE single-user\r
218  * license for FreeRTOS+Trace Professional Edition. Read more about this offer\r
219  * at www.percepio.com or contact us directly at support@percepio.com.\r
220  *\r
221  ******************************************************************************/\r
222 \r
223 #if (SELECTED_PORT == PORT_Win32)\r
224     \r
225     #define HWTC_COUNT_DIRECTION DIRECTION_INCREMENTING\r
226     #define HWTC_COUNT (ulGetRunTimeCounterValue())\r
227     #define HWTC_PERIOD 0\r
228     #define HWTC_DIVISOR 1\r
229     \r
230     #define IRQ_PRIORITY_ORDER 1  // Please update according to your hardware...\r
231 \r
232 #elif (SELECTED_PORT == PORT_HWIndependent)\r
233     \r
234     #define HWTC_COUNT_DIRECTION DIRECTION_INCREMENTING\r
235     #define HWTC_COUNT 0\r
236     #define HWTC_PERIOD 1\r
237     #define HWTC_DIVISOR 1\r
238 \r
239     #define IRQ_PRIORITY_ORDER 1  // Please update according to your hardware...\r
240 \r
241 #elif (SELECTED_PORT == PORT_Atmel_AT91SAM7)\r
242 \r
243     /* HWTC_PERIOD is hardcoded for AT91SAM7X256-EK Board (48 MHz)\r
244     A more generic solution is to get the period from pxPIT->PITC_PIMR */\r
245     \r
246     #define HWTC_COUNT_DIRECTION DIRECTION_INCREMENTING\r
247     #define HWTC_COUNT (AT91C_BASE_PITC->PITC_PIIR & 0xFFFFF)\r
248     #define HWTC_PERIOD 2995 \r
249     #define HWTC_DIVISOR 1\r
250 \r
251     #define IRQ_PRIORITY_ORDER 1  // higher irq priority values are more significant\r
252 \r
253 #elif (SELECTED_PORT == PORT_Atmel_UC3A0) \r
254   \r
255     /* For Atmel AVR32 (AT32UC3A) */\r
256   \r
257     #define HWTC_COUNT_DIRECTION DIRECTION_INCREMENTING\r
258     #define HWTC_COUNT sysreg_read(AVR32_COUNT)\r
259     #define HWTC_PERIOD ( configCPU_CLOCK_HZ / configTICK_RATE_HZ )\r
260     #define HWTC_DIVISOR 1    \r
261 \r
262     #define IRQ_PRIORITY_ORDER 1  // higher irq priority values are more significant\r
263 \r
264 #elif (SELECTED_PORT == PORT_ARM_CortexM)\r
265 \r
266     /* For all chips using ARM Cortex M cores */\r
267 \r
268     #define HWTC_COUNT_DIRECTION DIRECTION_DECREMENTING\r
269     #define HWTC_COUNT (*((uint32_t*)0xE000E018))\r
270     #define HWTC_PERIOD ((*(uint32_t*)0xE000E014) + 1)\r
271     #define HWTC_DIVISOR 2\r
272     \r
273     #define IRQ_PRIORITY_ORDER 0  // lower irq priority values are more significant\r
274 \r
275 #elif (SELECTED_PORT == PORT_Renesas_RX600)    \r
276 \r
277     #include "iodefine.h"\r
278 \r
279     #define HWTC_COUNT_DIRECTION DIRECTION_INCREMENTING\r
280     #define HWTC_COUNT (CMT0.CMCNT)\r
281     #define HWTC_PERIOD ((((configPERIPHERAL_CLOCK_HZ/configTICK_RATE_HZ)-1)/8))\r
282     #define HWTC_DIVISOR 1\r
283 \r
284     #define IRQ_PRIORITY_ORDER 1  // higher irq priority values are more significant\r
285 \r
286 #elif (SELECTED_PORT == PORT_MICROCHIP_dsPIC_AND_PIC24) \r
287 \r
288     /* For Microchip PIC24 and dsPIC (16 bit) */\r
289 \r
290     /* Note: The trace library was originally designed for 32-bit MCUs, and is slower\r
291        than intended on 16-bit MCUs. Storing an event on a PIC24 takes about 70 Âµs. \r
292        In comparison, 32-bit MCUs are often 10-20 times faster. If recording overhead \r
293        becomes a problem on PIC24, use the filters to exclude less interresting tasks \r
294        or system calls. */\r
295 \r
296     #define HWTC_COUNT_DIRECTION DIRECTION_INCREMENTING\r
297     #define HWTC_COUNT (TMR1)\r
298     #define HWTC_PERIOD (PR1+1)\r
299     #define HWTC_DIVISOR 1\r
300 \r
301     #define IRQ_PRIORITY_ORDER 0  // lower irq priority values are more significant\r
302 \r
303 #elif (SELECTED_PORT == PORT_NXP_LPC210X)\r
304     /* UNOFFICIAL PORT - NOT YET VERIFIED BY PERCEPIO */\r
305     \r
306     /* Tested with LPC2106, but should work with most LPC21XX chips.\r
307        Assumption: prescaler is 1:1 (this setting is hardcoded in \r
308        FreeRTOS port for LPC21XX) */\r
309       \r
310     #define HWTC_COUNT_DIRECTION DIRECTION_INCREMENTING\r
311     #define HWTC_COUNT  *((uint32_t *)0xE0004008 )\r
312     #define HWTC_PERIOD ( configCPU_CLOCK_HZ / configTICK_RATE_HZ ) \r
313     #define HWTC_DIVISOR 1    \r
314 \r
315     #define IRQ_PRIORITY_ORDER 0  // lower irq priority values are more significant\r
316 \r
317 #elif (SELECTED_PORT == PORT_TEXAS_INSTRUMENTS_TMS570)\r
318     /* UNOFFICIAL PORT - NOT YET VERIFIED BY PERCEPIO */\r
319 \r
320     #define RTIFRC0 *((uint32_t *)0xFFFFFC10)\r
321     #define RTICOMP0 *((uint32_t *)0xFFFFFC50)\r
322     #define RTIUDCP0 *((uint32_t *)0xFFFFFC54)\r
323     #define HWTC_COUNT_DIRECTION DIRECTION_INCREMENTING\r
324     #define HWTC_COUNT (RTIFRC0 - (RTICOMP0 - RTIUDCP0))\r
325     #define HWTC_PERIOD (RTIUDCP0)\r
326     #define HWTC_DIVISOR 1\r
327 \r
328     #define IRQ_PRIORITY_ORDER 0  // lower irq priority values are more significant\r
329 \r
330 #elif (SELECTED_PORT == PORT_TEXAS_INSTRUMENTS_MSP430)\r
331     /* UNOFFICIAL PORT - NOT YET VERIFIED BY PERCEPIO */\r
332 \r
333     #define HWTC_COUNT_DIRECTION DIRECTION_INCREMENTING\r
334     #define HWTC_COUNT (TA0R)\r
335     #define HWTC_PERIOD configCPU_CLOCKS_PER_TICK      \r
336     #define HWTC_DIVISOR 1\r
337 \r
338     #define IRQ_PRIORITY_ORDER 1  // higher irq priority values are more significant\r
339 \r
340 #elif (SELECTED_PORT == PORT_MICROCHIP_PIC32)\r
341     /* UNOFFICIAL PORT - NOT YET VERIFIED BY PERCEPIO */\r
342 \r
343     #define HWTC_COUNT_DIRECTION DIRECTION_INCREMENTING\r
344     #define HWTC_COUNT (ReadTimer1())     /* Should be available in BSP */\r
345     #define HWTC_PERIOD (ReadPeriod1()+1) /* Should be available in BSP */\r
346     #define HWTC_DIVISOR 1\r
347 \r
348     #define IRQ_PRIORITY_ORDER 0  // lower irq priority values are more significant\r
349 \r
350 #elif (SELECTED_PORT == PORT_XILINX_PPC405) \r
351     /* UNOFFICIAL PORT - NOT YET VERIFIED BY PERCEPIO */\r
352 \r
353     #define HWTC_COUNT_DIRECTION DIRECTION_DECREMENTING\r
354     #define HWTC_COUNT  mfspr( 0x3db)\r
355     #define HWTC_PERIOD ( configCPU_CLOCK_HZ / configTICK_RATE_HZ )\r
356     #define HWTC_DIVISOR 1\r
357 \r
358     #define IRQ_PRIORITY_ORDER 0  // lower irq priority values are more significant\r
359 \r
360 #elif (SELECTED_PORT == PORT_XILINX_PPC440) \r
361     /* UNOFFICIAL PORT - NOT YET VERIFIED BY PERCEPIO */\r
362 \r
363     /* This should work with most PowerPC chips */\r
364     \r
365     #define HWTC_COUNT_DIRECTION DIRECTION_DECREMENTING\r
366     #define HWTC_COUNT  mfspr( 0x016 )\r
367     #define HWTC_PERIOD ( configCPU_CLOCK_HZ / configTICK_RATE_HZ )\r
368     #define HWTC_DIVISOR 1    \r
369 \r
370     #define IRQ_PRIORITY_ORDER 0  // lower irq priority values are more significant\r
371     \r
372 #elif (SELECTED_PORT == PORT_XILINX_MICROBLAZE)\r
373     /* UNOFFICIAL PORT - NOT YET VERIFIED BY PERCEPIO */\r
374 \r
375     /* This should work with most Microblaze configurations\r
376      * This port is based on the official FreeRTOS Microlaze port and example application.\r
377      * It uses the AXI Timer 0 - the tick interrupt source.\r
378      * If an AXI Timer 0 peripheral is available on your hardware platform, no modifications are required.\r
379      */\r
380     #include "xtmrctr_l.h"\r
381 \r
382     #define HWTC_COUNT_DIRECTION DIRECTION_DECREMENTING\r
383     #define HWTC_COUNT XTmrCtr_GetTimerCounterReg( XPAR_TMRCTR_0_BASEADDR, 0 )\r
384     #define HWTC_PERIOD ( configCPU_CLOCK_HZ / configTICK_RATE_HZ )\r
385     #define HWTC_DIVISOR 16\r
386 \r
387     #define IRQ_PRIORITY_ORDER 0  // lower irq priority values are more significant\r
388 \r
389 #elif (SELECTED_PORT != PORT_NOT_SET)\r
390 \r
391     #error "SELECTED_PORT had unsupported value!"\r
392     #define SELECTED_PORT PORT_NOT_SET\r
393 \r
394 #endif\r
395 \r
396 #if (SELECTED_PORT != PORT_NOT_SET)\r
397     \r
398     #ifndef HWTC_COUNT_DIRECTION\r
399     #error "HWTC_COUNT_DIRECTION is not set!"\r
400     #endif \r
401     \r
402     #ifndef HWTC_COUNT\r
403     #error "HWTC_COUNT is not set!"    \r
404     #endif \r
405     \r
406     #ifndef HWTC_PERIOD\r
407     #error "HWTC_PERIOD is not set!"\r
408     #endif \r
409     \r
410     #ifndef HWTC_DIVISOR\r
411     #error "HWTC_DIVISOR is not set!"    \r
412     #endif \r
413     \r
414     #ifndef IRQ_PRIORITY_ORDER\r
415     #error "IRQ_PRIORITY_ORDER is not set!"\r
416     #elif (IRQ_PRIORITY_ORDER != 0) && (IRQ_PRIORITY_ORDER != 1)\r
417     #error "IRQ_PRIORITY_ORDER has bad value!"\r
418     #endif \r
419     \r
420     #if (HWTC_DIVISOR < 1)\r
421     #error "HWTC_DIVISOR must be a non-zero positive value!"\r
422     #endif \r
423 \r
424 #endif\r
425 /*******************************************************************************\r
426  * vTraceConsoleMessage\r
427  *\r
428  * A wrapper for your system-specific console "printf" console output function.\r
429  * This needs to be correctly defined to see status reports from the trace \r
430  * status monitor task (this is defined in trcUser.c).\r
431  ******************************************************************************/         \r
432 #if (SELECTED_PORT == PORT_Atmel_AT91SAM7)\r
433 /* Port specific includes */\r
434 #include "console.h"\r
435 #endif\r
436 \r
437 #define vTraceConsoleMessage(x)\r
438 \r
439 /*******************************************************************************\r
440  * uiTracePortGetTimeStamp\r
441  *\r
442  * Returns the current time based on the HWTC macros which provide a hardware\r
443  * isolation layer towards the hardware timer/counter.\r
444  *\r
445  * The HWTC macros and uiTracePortGetTimeStamp is the main porting issue\r
446  * or the trace recorder library. Typically you should not need to change\r
447  * the code of uiTracePortGetTimeStamp if using the HWTC macros.\r
448  *\r
449  * OFFER FROM PERCEPIO:\r
450  * For silicon companies and non-corporate FreeRTOS users (researchers, \r
451  * students, hobbyists or early-phase startups) we have an attractive offer: \r
452  * Provide a hardware timer port and get a FREE single-user licence for\r
453  * FreeRTOS+Trace Professional Edition. Read more about this offer at \r
454  * www.percepio.com or contact us directly at support@percepio.com.\r
455  ******************************************************************************/\r
456 void uiTracePortGetTimeStamp(uint32_t *puiTimestamp);\r
457 \r
458 /*******************************************************************************\r
459  * vTracePortEnd\r
460  * \r
461  * This function is called when the recorder is stopped due to full buffer.\r
462  * Mainly intended to show a message in the console.\r
463  * This is used by the Win32 port to store the trace to a file. The file path is\r
464  * set using vTracePortSetFileName.\r
465  ******************************************************************************/\r
466 void vTracePortEnd(void);\r
467 \r
468 #if (INCLUDE_SAVE_TO_FILE == 1)\r
469 \r
470 /*******************************************************************************\r
471  * vTracePortSetOutFile\r
472  *\r
473  * Sets the filename/path used in vTracePortSave.\r
474  * This is set in a separate function, since the Win32 port calls vTracePortSave\r
475  * in vTracePortEnd if WIN32_PORT_SAVE_WHEN_STOPPED is set.\r
476  ******************************************************************************/\r
477 void vTracePortSetOutFile(char* path);\r
478 \r
479 /******************************************************************************\r
480  * vTracePortSave\r
481  *\r
482  * Saves the trace to a file on a target-side file system. The path is set in a \r
483  * separate function, vTracePortSetOutFile, since the Win32 port may call\r
484  * vTracePortSave in vTracePortEnd, if using WIN32_PORT_SAVE_WHEN_STOPPED.\r
485  ******************************************************************************/\r
486 void vTracePortSave(void);\r
487 \r
488 #endif\r
489 \r
490 #endif\r