Hi Maryem,
CSAL is a library can be used to program up CoreSight trace components and subsequently extract the trace data through the register interface. This library principally manipulates the register sets of Coresight components. This can be used in bare metal systems or on Linux by mmaping the hardware memory locations of the components. The library provides a few worked example programs illustrating the programming and extraction of trace data.
OpenCSD is a library that will process captured trace data into a generic output format - this is usually a list of instruction address ranges representing executed code. OpenCSD does not have the capability to program trace hardware for capture, nor convert the processed trace data into assembly language. This must be done using client programs. The DS-5 dumps you refer to were created using ARM's DS-5 debugger tool.
The key point here is that both CSAL and OpenCSD are libraries that are to be used as part of a larger program.
For example in the perf-opencsd-master Linux kernel tree we provide extensions to perf (which does not use CSAL, but uses the linux CoreSight drivers directly) that will capture trace data, and subsequently use the OpenCSD library to process that data. Using the 'perf script' command, and an appropriate python script (also supplied in the perf-opencsd-master), it is possible to process the trace data captured by perf, through the OpenCSD library to generate traced instruction ranges and then passthe traced instruction ranges to objdump to output a disassembled sequence.
Best Regards
Mike
On 10 August 2017 at 14:49, Maryem Ayadi maryem.ayady@gmail.com wrote:
Hi Mark,
I am working with the Opencsd library under linux in order to collect and decode the trace. I just discovered The CoreSight Access Library (CSAL) and I want to know what's the difference between both libraries. Besides, is it possible to work only with the opencsd library to collect and decode traces on-target?
I am also trying to generate trace data coded in assembly language like the contents of the files existing within decoder/tests/snapshots/juno_r1_1/ds-5-dumps in the Opencsd library. It would be helpful to send me any steps I should follow.
Best regards, Maryem Ayadi