• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

config/11-Mar-2024-9518

include/11-Mar-2024-11557

Readme-Streamport.txtD11-Mar-20241.9 KiB4732

trcStreamPort.cD11-Mar-20245.5 KiB268187

Readme-Streamport.txt

1Tracealyzer Stream Port for UDP (lwIP example)
2Percepio AB
3www.percepio.com
4-------------------------------------------------
5
6This directory contains a "stream port" for the Tracealyzer recorder library,
7i.e., the specific code needed to use a particular interface for streaming a
8Tracealyzer RTOS trace. The stream port is defined by a set of macros in
9trcStreamPort.h, found in the "include" directory.
10
11This particular stream port targets UDP. This example assumes lwIP but is
12easy to modify for other UDP stacks.
13
14Instructions:
15
161. Integrate the trace recorder and configure it for streaming, as described
17   in the Tracealyzer User Manual. For FreeRTOS this is found at:
18   https://percepio.com/docs/FreeRTOS/manual/index.html#Creating_and_Loading_Traces___Introduction
19
202. Make sure all .c and .h files from this stream port folder is included in
21   your build, and that no other variant of trcStreamPort.h is included.
22
233. In lwipopts.h, make sure you have this line:
24
25   #define LWIP_SOCKET 1
26
274. Make sure that xTraceInitialize is called during the startup, before
28   any RTOS calls are made. Then call xTraceEnable(TRC_START_FROM_HOST).
29   This will set the target system to wait for a start command from Tracealyzer.
30
315. In Tracealyzer, open File -> Settings -> PSF Streaming Settings and
32   select Target Connection: UDP. Enter the IP address of the host and target systems
33   and the port number (by default 8888). Make sure two ways communications is enabled.
34
356. Start your target system, wait a few seconds to ensure that the lwIP is operational,
36   then select Start Recording in Tracealyzer.
37
38Troubleshooting:
39
40- If the tracing suddenly stops, check the "errno" value(trcStreamingPort.c).
41You can see the error code definitions in lwip/errno.h. If errno is ENOMEM, may you need to
42increase MEM_SIZE in lwipopts.h.
43
44Note that lwIP is not included in the stream port, but assumed to exist in the project already.
45
46See also http://percepio.com/2016/10/05/rtos-tracing.
47