Commit a6157d81 authored by Ruslan Bukin's avatar Ruslan Bukin
Browse files

Import OpenCSD -- an ARM CoreSight Trace Decode library.

Git ID 900407e9d6400f6541138d6c2e483a9fc2d699a4

Sponsored by:	DARPA, AFRL
parents
# Object files
*.o
*.ko
*.obj
*.elf
# Precompiled Headers
*.gch
*.pch
# Libraries
*.lib
*.a
*.la
*.lo
# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib
# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex
# Debug files
*.dSYM/
# Vc++ build files
*tlog
Debug/
ipch/
*.opensdf
*.sdf
*.suo
*.user
*.idb
*.pdb
*.exp
*.ilk
# ignore emacs backup saves
*~
# ignore bin test directory
bin/
*.log
ref_trace_decoder/build/win/rctdl_c_api_lib/Release/*
ref_trace_decoder/build/win/rctdl_c_api_lib/x64/Release/*
ref_trace_decoder/build/win/ref_trace_decode_lib/Release/*
ref_trace_decoder/build/win/ref_trace_decode_lib/x64/Release/*
ref_trace_decoder/tests/build/win/simple_pkt_print_c_api/Release/*
ref_trace_decoder/tests/build/win/simple_pkt_print_c_api/x64/Release/*
*.lastbuildstate
*.manifest
*.cache
ref_trace_decoder/docs/html/*
ref_trace_decoder/tests/build/win/simple_pkt_print_c_api/Debug-dll/*
ref_trace_decoder/tests/build/win/simple_pkt_print_c_api/x64/Debug-dll/*
ref_trace_decoder/tests/build/win/trc_pkt_lister/Debug-dll/*
ref_trace_decoder/tests/build/win/trc_pkt_lister/Release-dll/*
ref_trace_decoder/tests/build/win/trc_pkt_lister/x64/Debug-dll/*
ref_trace_decoder/tests/build/win/trc_pkt_lister/x64/Release-dll/*
*.bak
*.orig
decoder/docs/html/*
*.orig
*.VC.db
*.VC.VC.opendb
*.iobj
*.ipdb
This diff is collapsed.
BSD 3Clause License
http://directory.fsf.org/wiki/License:BSD_3Clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
(1) Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
(2) Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
(3)The name of the author may not be used to
endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
OpenCSD - An open source CoreSight(tm) Trace Decode library {#mainpage}
===========================================================
This library provides an API suitable for the decode of ARM(r) CoreSight(tm) trace streams.
The library will decode formatted trace in three stages:
1. *Frame Deformatting* : Removal CoreSight frame formatting from individual trace streams.
2. *Packet Processing* : Separate individual trace streams into discrete packets.
3. *Packet Decode* : Convert the packets into fully decoded trace describing the program flow on a core.
The library is implemented in C++ with an optional "C" API.
Library Versioning
------------------
From version 0.4, library versioning will use a semantic versioning format
(per http://semver.org) of the form _Major.minor.patch_ (M.m.p).
Internal library version calls, documentation and git repository will use this format moving forwards.
Where a patch version is not quoted, or quoted as .x then comments will apply to the entire release.
Releases will be at M.m.0, with patch version incremented for bugfixes or documentation updates.
Releases will appear on the master branch in the git repository with an appropriate version tag.
CoreSight Trace Component Support.
----------------------------------
_Current Version 0.8.2_
### Current support:
- ETMv4 (v4.1) instruction trace - packet processing and packet decode.
- PTM (v1.1) instruction trace - packet processing and packet decode.
- ETMv3 (v3.5) instruction trace - packet processing and packet decode.
- ETMv3 (v3.5) data trace - packet processing.
- STM (v1.1) software trace - packet processing and packet decode.
- External Decoders - support for addition of external / custom decoders into the library.
### Support to be added:
- ITM software trace - packet processing and decode.
- ETMv3 data trace - packet decode.
- ETMv4 data trace - packet processing and decode.
Note: for ITM and STM, packet decode is combining Master+Channel+Marker+Payload packets into a single generic
output packet.
Note on the Git Repository.
---------------------------
This git repository for OpenCSD contains only source for the OpenCSD decoder library.
From version 0.4, releases appear as versioned tags on the master branch.
From version 0.7.4, the required updates to CoreSight drivers and perf, that are not
currently upstream in the linux kernel tree, are now contained in a separate
repository to be found at:
https://github.com/Linaro/perf-opencsd
Documentation
-------------
API Documentation is provided inline in the source header files, which use the __doxygen__ standard mark-up.
Run `doxygen` on the `./doxygen_config.dox` file located in the `./docs` directory..
doxygen ./doxygen_config.dox
This will produce the documentation in the `./docs/html` directory. The doxygen configuration also includes
the `*.md` files as part of the documentation.
Building the Library
--------------------
See [build_libs.md](@ref build_lib) in the `./docs` directory for build details.
How the Library is used in Linux `perf`
---------------------------------------
The library and additional infrastructure for programming CoreSight components has been integrated
with the standard linux perfomance analysis tool `perf`.
See [HOWTO.md](@ref howto_perf) for details.
Version and Modification Information
====================================
- _Version 0.001_: Library development - tested with `perf` tools integration - BKK16, 8th March 2016
- _Version 0.002_: Library development - added in PTM decoder support. Restructure header dir, replaced ARM rctdl prefix with opencsd/ocsd.
- _Version 0.003_: Library development - added in ETMv3 instruction decoder support.
- _Version 0.4_ : Library development - updated decode tree and C-API for generic decoder handling. Switch to semantic versioning.
- _Version 0.4.1_: Minor Update & Bugfixes - fix to PTM decoder, ID checking on test program, adds NULL_TS support in STM packet processor.
- _Version 0.4.2_: Minor Update - Update to documentation for perf usage in 4.8 kernel branch.
- _Version 0.5.0_: Library Development - external decoder support. STM full decode.
- _Version 0.5.1_: Minor Update & Bugfixes - Update HOWTO for kernel 4.9. Build fixes for parallel builds
- _Version 0.5.2_: Minor Update & Bugfixes - Update trace info packet string o/p + Cycle count packet bugfixes.
- _Version 0.5.3_: Doc update for using AutoFDO with ETM and additional timestamp and cycle count options.
- _Version 0.5.4_: Updates: X-compile for arm/arm64. Remove deprecated VS2010 builds. Bugfix: GCC inline semantics in debug build.
- _Version 0.6.0_: Packet printers moved from tests into the main library. C++ and C APIs updated to allow clients to use them.
Update to allow perf to insert barrier packets (4xFSYNC) which the decoder can be made to use to reset the decode state.
- _Version 0.6.1_: Bugfix: instruction follower bug on A32 branch to T32.
- _Version 0.7.0_: Add handling for trace return stack feature to ETMv4 and PTM trace.
- _Version 0.7.1_: Bugfix: ETMv3 packet processor.
- _Version 0.7.2_: Bugfix: ETMv4 decoder - fix exact match packet address follower.
- _Version 0.7.3_: Bugfix: PTM decoder - issues with initialisation and ASYNC detection.
- _Version 0.7.4_: Notification of change of repository for perf extensions. gcc 6.x build fixes.
- _Version 0.7.5_: Bugfix: ETMv4 decoder memory leak. Linux build update - header dependencies force rebuild.
- _Version 0.8.0_: Header restructure and build update to enable linux version to install library and C-API headers in standard locations.
Library output naming changed from 'cstraced' to 'opencsd'.
- _Version 0.8.1_: Minor updates: Use install tool to copy headers. Changes to HOWTO for perf usage.
- _Version 0.8.2_: Bugfix: C++ init errors fixed for CLANG build process.
Licence Information
===================
This library is licensed under the [BSD three clause licence.](http://directory.fsf.org/wiki/License:BSD_3Clause)
A copy of this license is in the `LICENCE` file included with the source code.
Contact
=======
Using the github site: https://github.com/Linaro/OpenCSD
Mailing list: coresight@lists.linaro.org
* ETMv4/PTM - decoder updates to handle advanced configuration.
-> Certain (currently unused by perf / current hardware) configuration settings
can alter the format of the trace output. One example is Return Stack -
settable in the control registers for PTM/ETMv4, and removes some inline
addresses. Decoder must use a follower to correctly trace when this is set.
* ITM packet processing and decode.
-> ITM is primarily an M class SW trace module. I wouldn't expect to see it on
systems with STM, unless a companion M class was present.
*Data trace - ETMv4 / ETMv3
-> Differing solutions to data trace in v4/v3 - v4 is separate trace stream
completely, output at trace ID <instruction_trace_ID>+1. ETMv3 is inline with
the instruction trace.
Cortex-A cores do not support this architecturally. On R and M profile cores it
is an option. There are scenarios in future that could see linux on R cores, plus
on something like Juno it is possible to switch on trace for the SCP
(M class processor). So at some point data trace may be required.
########################################################
# Copyright 2015 ARM Limited. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors
# may be used to endorse or promote products derived from this software without
# specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#################################################################################
# OpenCSD - master makefile for libraries and tests
#
# command line options
# DEBUG=1 create a debug build
#
# Set project root - relative to build directory
ifeq ($(OCSD_ROOT),)
OCSD_ROOT := $(shell pwd | sed 's,/build/linux.*,,')
export OCSD_ROOT
endif
# library names
LIB_BASE_NAME=opencsd
export LIB_BASE_NAME
LIB_CAPI_NAME=$(LIB_BASE_NAME)_c_api
export LIB_CAPI_NAME
# determine base architecture, heavily borrowed from the Linux kernel v4.4's
# tools/perf/config/Makefile.arch
# For example, to compile for arm64 on a X86 PC, you can issue the command:
# "export ARCH=arm64"
ifndef ARCH
ARCH := $(shell uname -m 2>/dev/null || echo not)
endif
# source root directories
export OCSD_LIB_ROOT=$(OCSD_ROOT)/lib
export OCSD_INCLUDE=$(OCSD_ROOT)/include
export OCSD_SOURCE=$(OCSD_ROOT)/source
export OCSD_TESTS=$(OCSD_ROOT)/tests
export LIB_UAPI_INC_DIR=opencsd
# tools
export MASTER_CC=$(CROSS_COMPILE)gcc
export MASTER_CPP=$(CROSS_COMPILE)g++
export MASTER_LINKER=$(CROSS_COMPILE)g++
export MASTER_LIB=$(CROSS_COMPILE)ar
export INSTALL=install
# installation directory
INSTALL_LIB_DIR=/usr/lib/
export INSTALL_INCLUDE_DIR=/usr/include/
# compile flags
MASTER_CC_FLAGS := -c -Wall -DLINUX
MASTER_CPP_FLAGS := -c -Wall -DLINUX -std=c++11
MASTER_LINKER_FLAGS := -Wl,-z,defs
MASTER_LIB_FLAGS := rcs
# debug variant
ifdef DEBUG
MASTER_CC_FLAGS += -g -O0 -DDEBUG
MASTER_CPP_FLAGS += -g -O0 -DDEBUG
BUILD_VARIANT=dbg
else
MASTER_CC_FLAGS += -g -O2 -DNDEBUG
MASTER_CPP_FLAGS += -g -O2 -DNDEBUG
BUILD_VARIANT=rel
endif
# platform bit size variant
ifeq ($(ARCH),x86)
MFLAG:="-m32"
BIT_VARIANT=32
else ifeq ($(ARCH),x86_64)
MFLAG:="-m64"
BIT_VARIANT=64
else ifeq ($(ARCH),arm)
BIT_VARIANT=-arm
else ifeq ($(ARCH),arm64)
BIT_VARIANT=-arm64
else ifeq ($(ARCH),aarch64)
BIT_VARIANT=-arm64
else ifeq ($(ARCH),aarch32)
BIT_VARIANT=-arm
endif
MASTER_CC_FLAGS += $(MFLAG)
MASTER_CPP_FLAGS += $(MFLAG)
MASTER_LINKER_FLAGS += $(MFLAG)
# export build flags
export MASTER_CC_FLAGS
export MASTER_CPP_FLAGS
export MASTER_LINKER_FLAGS
export MASTER_LIB_FLAGS
# target directories
export PLAT_DIR=linux$(BIT_VARIANT)/$(BUILD_VARIANT)
export LIB_TARGET_DIR=$(OCSD_LIB_ROOT)/$(PLAT_DIR)
export LIB_TEST_TARGET_DIR=$(OCSD_TESTS)/lib/$(PLAT_DIR)
export BIN_TEST_TARGET_DIR=$(OCSD_TESTS)/bin/$(PLAT_DIR)
###########################################################
# build targets
all: libs tests
libs: $(LIB_BASE_NAME)_lib $(LIB_CAPI_NAME)_lib
install: libs
$(INSTALL) --mode=644 $(LIB_TARGET_DIR)/lib$(LIB_BASE_NAME).so $(INSTALL_LIB_DIR)/
$(INSTALL) --mode=644 $(LIB_TARGET_DIR)/lib$(LIB_CAPI_NAME).so $(INSTALL_LIB_DIR)/
cd $(OCSD_ROOT)/build/linux/rctdl_c_api_lib && make install_inc
################################
# build OpenCSD trace decode library
#
$(LIB_BASE_NAME)_lib: $(LIB_TARGET_DIR)/lib$(LIB_BASE_NAME).a $(LIB_TARGET_DIR)/lib$(LIB_BASE_NAME).so
$(LIB_TARGET_DIR)/lib$(LIB_BASE_NAME).so: $(LIB_BASE_NAME)_all
$(LIB_TARGET_DIR)/lib$(LIB_BASE_NAME).a: $(LIB_BASE_NAME)_all
# single command builds both .a and .so targets in sub-makefile
$(LIB_BASE_NAME)_all:
mkdir -p $(LIB_TARGET_DIR)
cd $(OCSD_ROOT)/build/linux/ref_trace_decode_lib && make
################################
# build OpenCSD trace decode C API library
#
$(LIB_CAPI_NAME)_lib: $(LIB_TARGET_DIR)/lib$(LIB_CAPI_NAME).a $(LIB_TARGET_DIR)/lib$(LIB_CAPI_NAME).so
$(LIB_TARGET_DIR)/lib$(LIB_CAPI_NAME).so: $(LIB_CAPI_NAME)_all
$(LIB_TARGET_DIR)/lib$(LIB_CAPI_NAME).a: $(LIB_CAPI_NAME)_all
# single command builds both .a and .so targets in sub-makefile
$(LIB_CAPI_NAME)_all: $(LIB_BASE_NAME)_lib
mkdir -p $(LIB_TARGET_DIR)
cd $(OCSD_ROOT)/build/linux/rctdl_c_api_lib && make
#################################
# build tests
.PHONY: tests
tests: libs
cd $(OCSD_ROOT)/tests/build/linux/echo_test_dcd_lib && make
cd $(OCSD_ROOT)/tests/build/linux/snapshot_parser_lib && make
cd $(OCSD_ROOT)/tests/build/linux/trc_pkt_lister && make
cd $(OCSD_ROOT)/tests/build/linux/c_api_pkt_print_test && make
#############################################################
# clean targets
#
clean: clean_libs clean_tests
.PHONY: clean_libs clean_tests
clean_libs:
cd $(OCSD_ROOT)/build/linux/ref_trace_decode_lib && make clean
cd $(OCSD_ROOT)/build/linux/rctdl_c_api_lib && make clean
clean_tests:
cd $(OCSD_ROOT)/tests/build/linux/echo_test_dcd_lib && make clean
cd $(OCSD_ROOT)/tests/build/linux/snapshot_parser_lib && make clean
cd $(OCSD_ROOT)/tests/build/linux/trc_pkt_lister && make clean
cd $(OCSD_ROOT)/tests/build/linux/c_api_pkt_print_test && make clean
clean_install:
rm -f $(INSTALL_LIB_DIR)/lib$(LIB_BASE_NAME).so
rm -f $(INSTALL_LIB_DIR)/lib$(LIB_CAPI_NAME).so
rm -rf $(INSTALL_INCLUDE_DIR)/$(LIB_UAPI_INC_DIR)
########################################################
# Copyright 2015 ARM Limited. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors
# may be used to endorse or promote products derived from this software without
# specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#################################################################################
# OpenCSD - makefile for C API wrapper library
#
CPP := $(MASTER_CPP)
LINKER := $(MASTER_LINKER)
LIB := $(MASTER_LIB)
CPP_FLAGS := $(MASTER_CPP_FLAGS) -fpic -Wno-switch
LIB_FLAGS := $(MASTER_LIB_FLAGS)
LINKER_FLAGS := $(MASTER_LINKER_FLAGS) -shared
LIB_NAME = lib$(LIB_CAPI_NAME)
SO_LIB_DEPS= -L$(LIB_TARGET_DIR) -l$(LIB_BASE_NAME)
BUILD_DIR=./$(PLAT_DIR)
VPATH= $(OCSD_SOURCE)/c_api
CPP_INCLUDES= \
-I$(OCSD_INCLUDE) \
-I$(OCSD_SOURCE)/c_api
OBJECTS=$(BUILD_DIR)/ocsd_c_api.o \
$(BUILD_DIR)/ocsd_c_api_custom_obj.o
INST_INC_SRC=$(OCSD_INCLUDE)/$(LIB_UAPI_INC_DIR)
INST_INC_DST=$(INSTALL_INCLUDE_DIR)/$(LIB_UAPI_INC_DIR)
all: build_dir $(OBJECTS)
mkdir -p $(LIB_TARGET_DIR)
$(LIB) $(LIB_FLAGS) $(LIB_TARGET_DIR)/$(LIB_NAME).a $(OBJECTS)
$(LINKER) $(LINKER_FLAGS) -o $(LIB_TARGET_DIR)/$(LIB_NAME).so -Wl,-soname,$(LIB_NAME).so $(OBJECTS) $(SO_LIB_DEPS)
build_dir:
mkdir -p $(BUILD_DIR)
##### build rules
## object dependencies
DEPS := $(OBJECTS:%.o=%.d)
-include $(DEPS)
## object compile
$(BUILD_DIR)/%.o : %.cpp
$(CPP) $(CPP_FLAGS) $(CPP_INCLUDES) -MMD $< -o $@
#### clean
.PHONY: clean
clean:
rm -f $(OBJECTS)
rm -f $(DEPS)
rm -f $(LIB_TARGET_DIR)/$(LIB_NAME).a
rm -f $(LIB_TARGET_DIR)/$(LIB_NAME).so
#### install the necessary include files for the c-api library on linux
install_inc:
$(INSTALL) -d --mode=0755 $(INST_INC_DST)/
$(INSTALL) --mode=0644 $(INST_INC_SRC)/trc_gen_elem_types.h $(INST_INC_DST)/
$(INSTALL) --mode=0644 $(INST_INC_SRC)/ocsd_if_types.h $(INST_INC_DST)/
$(INSTALL) --mode=0644 $(INST_INC_SRC)/trc_pkt_types.h $(INST_INC_DST)/
$(INSTALL) -d --mode=0755 $(INST_INC_DST)/ptm
$(INSTALL) --mode=0644 $(INST_INC_SRC)/ptm/trc_pkt_types_ptm.h $(INST_INC_DST)/ptm/
$(INSTALL) -d --mode=0755 $(INST_INC_DST)/stm
$(INSTALL) --mode=0644 $(INST_INC_SRC)/stm/trc_pkt_types_stm.h $(INST_INC_DST)/stm/
$(INSTALL) -d --mode=0755 $(INST_INC_DST)/etmv3
$(INSTALL) --mode=0644 $(INST_INC_SRC)/etmv3/trc_pkt_types_etmv3.h $(INST_INC_DST)/etmv3/
$(INSTALL) -d --mode=0755 $(INST_INC_DST)/etmv4
$(INSTALL) --mode=0644 $(INST_INC_SRC)/etmv4/trc_pkt_types_etmv4.h $(INST_INC_DST)/etmv4/
$(INSTALL) -d --mode=0755 $(INST_INC_DST)/c_api
$(INSTALL) --mode=0644 $(INST_INC_SRC)/c_api/ocsd_c_api_types.h $(INST_INC_DST)/c_api/
$(INSTALL) --mode=0644 $(INST_INC_SRC)/c_api/opencsd_c_api.h $(INST_INC_DST)/c_api/
$(INSTALL) --mode=0644 $(INST_INC_SRC)/c_api/ocsd_c_api_custom.h $(INST_INC_DST)/c_api/
########################################################
# Copyright 2015 ARM Limited. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors
# may be used to endorse or promote products derived from this software without
# specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#################################################################################
# OpenCSD - makefile for main trace decode library
#
CPP := $(MASTER_CPP)
LINKER := $(MASTER_LINKER)
LIB := $(MASTER_LIB)
CPP_FLAGS := $(MASTER_CPP_FLAGS) -fpic -Wno-switch
LIB_FLAGS := $(MASTER_LIB_FLAGS)
LINKER_FLAGS := $(MASTER_LINKER_FLAGS) -shared
LIB_NAME= lib$(LIB_BASE_NAME)
BUILD_DIR=./$(PLAT_DIR)
VPATH= $(OCSD_SOURCE) \
$(OCSD_SOURCE)/etmv3 \
$(OCSD_SOURCE)/etmv4 \
$(OCSD_SOURCE)/ptm \
$(OCSD_SOURCE)/i_dec \
$(OCSD_SOURCE)/mem_acc \
$(OCSD_SOURCE)/stm \
$(OCSD_SOURCE)/pkt_printers
CPP_INCLUDES= \
-I$(OCSD_INCLUDE) \
-I$(OCSD_SOURCE)
ETMV3OBJ= $(BUILD_DIR)/trc_cmp_cfg_etmv3.o \
$(BUILD_DIR)/trc_pkt_decode_etmv3.o \
$(BUILD_DIR)/trc_pkt_elem_etmv3.o \
$(BUILD_DIR)/trc_pkt_proc_etmv3.o \
$(BUILD_DIR)/trc_pkt_proc_etmv3_impl.o
ETMV4OBJ= $(BUILD_DIR)/trc_cmp_cfg_etmv4.o \
$(BUILD_DIR)/trc_pkt_proc_etmv4.o \