]> git.sur5r.net Git - freertos/blob - FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/ThirdParty/TraceRecorderSrc/debugger trace upload.txt
Add FreeRTOS-Plus directory with new directory structure so it matches the FreeRTOS...
[freertos] / FreeRTOS-Plus / Demo / FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC / ThirdParty / TraceRecorderSrc / debugger trace upload.txt
1 \r
2 FreeRTOS+Trace - Uploading the trace data\r
3 -----------------------------------------\r
4 Percepio AB, Nov. 8, 2012\r
5 \r
6 This document decribes how to upload the trace data from the target system to\r
7 FreeRTOS+Trace. For information on how to integrate and enable the recorder \r
8 library in your FreeRTOS project, see the FreeRTOS+Trace User Manual.\r
9 \r
10 FreeRTOS+Trace uses your existing debugger to upload the trace data from the \r
11 chip RAM. This is a plain RAM dump, that is done whenever you want to look at \r
12 the trace buffer contents. This means it works with essentially with any debug \r
13 probe on the market.\r
14 \r
15 Note that hardware-generated trace is not required (or used by) FreeRTOS+Trace. \r
16 We however plan to add support for that in future versions of FreeRTOS+Trace \r
17 and other Tracealyzer products.\r
18 \r
19 Built-in support for Segger J-Link/J-Trace and Atmel SAM-ICE\r
20 ------------------------------------------------------------\r
21 FreeRTOS+Trace v2.3 supports Segger J-Link and J-Link compatible debuggers \r
22 directly, without any debugger IDE involved. Using other debug probes is \r
23 also possible, but requires some extra steps, described below.\r
24 \r
25 If you have a Segger J-Link/J-Trace debug probe or another J-Link compatible \r
26 debug probe, just select \r
27 \r
28     "File" menu -> "Upload from <debug probe name>". \r
29 \r
30 This opens a dialog where you get to enter the memory region where\r
31 the recorder data structure is located. Normally you select the entire \r
32 internal RAM according to the datasheet of your MCU, but the exact address\r
33 can be found can by inspecting the "RecorderData" struct or the \r
34 "RecorderDataPtr" pointer with your debugger.\r
35 \r
36 Typical values are 0x0, 0x10000000 or 0x20000000 as start address\r
37 and 0x10000 or 0x20000 as size (64 KB or 128 KB).\r
38 \r
39 This makes FreeRTOS+Trace reads the chip RAM and locate the trace data. \r
40 Note that this option is only available if a compatible debug probe is found.\r
41 \r
42 J-Link compatible debug probes also include Atmel SAM-ICE and many built-in \r
43 debug interfaces on demonstration/evaluation boards (where there is a USB \r
44 connection directly to the board). Look for a Segger J-Link label on the board.\r
45 \r
46 MemoryLogger extension in Atmel Studio 6\r
47 ----------------------------------------\r
48 Atmel's new MemoryLogger extension provides a superb integration with\r
49 FreeRTOS+Trace. Look for "MemoryLogger" in Atmel Gallery, available in \r
50 Atmel Studio and at the Atmel website.\r
51 \r
52 This extension automatically detects the path to FreeRTOS+Trace, if \r
53 installed, and gives you a single-click upload/refresh. You can use it \r
54 while debugging and optionally get an automatic refresh eash time the \r
55 MCU is halted, e.g., on each breakpoint.\r
56 \r
57 Using other development environments and debug probes\r
58 -----------------------------------------------------\r
59 Most debuggers are able to save the RAM contents to a file. FreeRTOS+Trace \r
60 supports the following common formats:\r
61 - Binary (.bin), supporting gdb, J-Link and Renesas HEW.\r
62 - Intel Hex (.hex), supporting IAR Embedded Workbench and Atmel Studio (atprogram.exe)\r
63 - MCH (.mch), supporting Microchip MPLAB.\r
64 \r
65 When you store the RAM dump, you must also make sure to select the right region, \r
66 i.e., start address and size. The recorder data is stored in a single data \r
67 block, identified by the pointer RecorderDataPtr. \r
68 It is not necessary to match the begin and end of the recorder data, as long as \r
69 it is fully included by the dumped memory region. FreeRTOS+Trace automatically \r
70 finds the trace data in the RAM dump, thanks to special signatures. For chips \r
71 with on-chip RAM only, we therefore recommend to dump the entire RAM. This is \r
72 usually very fast.\r
73 For chips with larger amounts of (external) RAM, it is typically possible to \r
74 dump a limited region where the data is typically found.\r
75 \r
76 Using IAR Embedded Workbench for ARM, version 6.3\r
77 -------------------------------------------------\r
78 In the debugger view, when stopped on a breakpoint:\r
79 - Select "Debug" menu, "Memory" submenu, "Save..." (keyboard shortcut: ALT,d,y,s)\r
80 - In the Save dialog\r
81         - Zone: Memory\r
82         - Start Adress: 10000000 (for NXP LPC1766 in the demo project)\r
83         - End Adress: 1000FFFF (for NXP LPC1766 in the demo project)\r
84         - File format: Intel Extended\r
85         - Filename: <name>.hex\r
86         - Press "Save" button\r
87 You can now open <name>.hex in FreeRTOS+Trace.\r
88 \r
89 To find the right Start and End addresses, check the address of the symbol \r
90 "RecorderData". The addresses does not need to match this symbol exactly, as \r
91 long as the whole data is included.\r
92 \r
93 Using Renesas High-performance Embedded Workshop v4.09\r
94 ------------------------------------------------------\r
95 In the debugger view, when stopped on a breakpoint:\r
96 - Select "Debug" menu, "Save Memory..." (keyboard shortcut: ALT,d,a)\r
97 - In the Save dialog\r
98         - Format: Binary\r
99         - Filename: <name>.bin\r
100         - Start Address: 00000000 (For RX62N in the demo project)\r
101         - End Address: 0000FFFF (For RX62N in the demo project)\r
102         - Access size: 1\r
103         - Press "Save" button and open <name>.bin in FreeRTOS+Trace.\r
104         \r
105 Using Microchip MPLAB v8.86\r
106 ------------------------------------------------------\r
107 - Select "View" -> "File Registers". This shows you the memory contents.\r
108 - Make sure "Hex" is selected in the bottom left (instead of "Symbolic"). Hex mode seems to be default.\r
109 - Right click in the view and select "Export Table...".\r
110 - In the dialog ("Export As"), make sure "Single Column Output" is selected (seems to be default).\r
111 - Select start address 0x0000 and make sure the end address is beyond the RecorderData structure. \r
112   The default values seems to be the whole RAM, so you probably don't need to change this.\r
113 - Save as a .mch file and open this file in FreeRTOS+Trace v2.2.4 or later (support for the .mch format was added in v2.2.4).\r
114 \r
115 Using STM32 ST-Link\r
116 ------------------------------------------------------\r
117 - Start "ST-Link Utility"\r
118 - Connect to the device and view the device memory.\r
119 - Set the view to display the entire RAM, or at least the section containing the RecorderData structure.\r
120 - Select "Save as" and choose binary (.bin) or Intel Hex (.hex) format.\r
121 - Open the resulting file in FreeRTOS+Trace.\r
122 \r
123 In case you have any question, contact support@percepio.com\r
124 \r
125 Percepio AB\r
126 www.percepio.com\r