From 84c478872d449ef18e93089e95e541e5a7586f04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5ns=20Nilsson?= Date: Mon, 11 Apr 2022 14:00:04 +0200 Subject: Provide CMSIS-Device header as needed for TFLM Change-Id: Ie78bdf3330765131ab5aee248ef42f175a652218 --- tflite_micro.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tflite_micro.cmake b/tflite_micro.cmake index a93bf33..d0e0c9d 100644 --- a/tflite_micro.cmake +++ b/tflite_micro.cmake @@ -161,6 +161,15 @@ tensorflow_target_sources_glob(tflu GLOB TRUE target_include_directories(tflu PRIVATE ${TFLU_PATH}/cortex_m_generic) +# For DWT/PMU counters +target_link_libraries(tflu PRIVATE cmsis_device) +target_compile_definitions(tflu PRIVATE ${ARM_CPU}) + +if("${ARM_CPU}" STREQUAL "ARMCM55") + target_compile_definitions(tflu PRIVATE + ARM_MODEL_USE_PMU_COUNTERS) +endif() + ############################################################################# # Tensorflow micro lite ############################################################################# -- cgit v1.2.1