DESCRIPTION = "TI Trace Framework library"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://${WORKDIR}/git/ti/instrumentation/traceframework/COPYING.txt;md5=e8f6789acdcda76d02ed9203fc2e603d"

BRANCH="master"
SRC_URI = "git://git.ti.com/keystone-rtos/traceframework.git;destsuffix=git/ti/instrumentation/traceframework;protocol=git;branch=${BRANCH}"

# Below commit ID corresponds to DEV.TFWK-01.01.01.06A
SRCREV = "bd87f53f4d12dc802bcc5609afb7994643e40cb9"
PV = "01.01.01.06"

COMPATIBLE_MACHINE = "(tci6614-evm|keystone)"
DEPENDS = "cuia"

DEVICELIST = ""
DEVICELIST_append_tci6614-evm = "c6614"
DEVICELIST_append_keystone    = "k2k k2h k2e k2l"

PACKAGES =+ "${PN}-test"

FILES_${PN}-test = "${bindir}/tfw*.out \
                    ${bindir}/*.txt"

BASEDIR = "${WORKDIR}/git"
S = "${BASEDIR}/ti/instrumentation/traceframework"

EXTRA_OEMAKE += "-f makefile_armv7 PDK_INSTALL_PATH=${STAGING_INCDIR} \
                 CUIA_INSTALL_DIR=${STAGING_INCDIR} CUIA_LIB_DIR=${STAGING_LIBDIR}"

do_compile () {
#   making the library
	oe_runmake clean
	oe_runmake lib

#   make the test application
	for device in ${DEVICELIST}
	do
		oe_runmake tests DEVICE="$device" TFW_INC_DIR=${BASEDIR} TFW_SRC_DIR=${S} \
			TARGET_ROOT_DIR=${D}
	done
}

do_install() {
	for device in ${DEVICELIST}
	do
		oe_runmake install DEVICE="$device" TFW_SRC_DIR=${S} TARGET_ROOT_DIR=${D}
	done
}

Add recipe for TI trace framework library
traceframework: Add recipe for TI trace framework library

- Provide libraries and test code for trace framework.
- Support framework to stream data from producer to multiple consumers
- Supports devices K2H, K2K, K2E, K2L & c6614

Signed-off-by: Sam Nelson <922b89dc606ff5f34a79f0527810322597be4ea8@ti.com>
Signed-off-by: Denys Dmytriyenko <d29de71aea38aad3a87d486929cb0aad173ae612@ti.com>
