summaryrefslogtreecommitdiff
path: root/source/application/hal/platforms/bare-metal/timer
diff options
context:
space:
mode:
authorKshitij Sisodia <kshitij.sisodia@arm.com>2021-05-07 16:08:14 +0100
committerKshitij Sisodia <kshitij.sisodia@arm.com>2021-05-07 17:28:51 +0100
commitf9c19eaa9ab11e4409679fc6d2862c89410493a7 (patch)
treeb791a4c03f1fe986a2ac32593a3dc817ae3f247a /source/application/hal/platforms/bare-metal/timer
parent2181d0ac35f30202985a877950c88325ff665f6b (diff)
downloadml-embedded-evaluation-kit-f9c19eaa9ab11e4409679fc6d2862c89410493a7.tar.gz
MLECO-1860: Support for Arm GNU Embedded Toolchain
This patch enables compilation of ML use cases bare-metal applications using Arm GNU Embedded Toolchain. The GNU toolchain can be used instead of the Arm Compiler that was already supported. The GNU toolchain is also set as the default toolchain when building applications for the MPS3 target. Note: The version of GNU toolchain must be 10.2.1 or higher. Change-Id: I5fff242f0f52d2db6c75d292f9fa990df1aec978 Signed-off-by: Kshitij Sisodia <kshitij.sisodia@arm.com>
Diffstat (limited to 'source/application/hal/platforms/bare-metal/timer')
-rw-r--r--source/application/hal/platforms/bare-metal/timer/baremetal_timer.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/source/application/hal/platforms/bare-metal/timer/baremetal_timer.c b/source/application/hal/platforms/bare-metal/timer/baremetal_timer.c
index ef31a71..64f2376 100644
--- a/source/application/hal/platforms/bare-metal/timer/baremetal_timer.c
+++ b/source/application/hal/platforms/bare-metal/timer/baremetal_timer.c
@@ -19,6 +19,7 @@
#include <assert.h>
#include <string.h>
+#include <inttypes.h>
#if defined (ARM_NPU)
@@ -40,7 +41,7 @@ static void _init_ethosu_cyclecounter(void);
static uint64_t bm_get_npu_total_cycle_diff(time_counter *st,
time_counter *end);
-/**
+/**
* @brief Gets the difference in active NPU cycle counts.
* @param[in] st Pointer to time_counter value at start time.
* @param[in] end Pointer to time_counter value at end.
@@ -100,7 +101,7 @@ static int bm_get_npu_cycle_diff(time_counter *st, time_counter *end,
#endif /* defined (ARM_NPU) */
#if defined(MPS3_PLATFORM)
-/**
+/**
* @brief Wrapper for getting milliseconds duration between time counters
* @param[in] st Pointer to time_counter value at start time.
* @param[in] end Pointer to time_counter value at end.
@@ -148,7 +149,7 @@ static time_counter bm_stop_profiling(void);
static uint32_t bm_get_cpu_cycles_diff(time_counter *st, time_counter *end);
/**
- * @brief Initialiser for bare metal timer.
+ * @brief Initialiser for bare metal timer.
* @param[in] timer Platform timer to initialize.
**/
void init_timer(platform_timer *timer)
@@ -307,7 +308,11 @@ static time_counter bm_get_time_counter(void)
};
#if defined (ARM_NPU)
- debug("NPU total cc: %llu; NPU idle cc: %u; NPU axi0 read cc: %u; NPU axi0 write cc: %u; NPU axi1 read cc: %u\n",
+ debug("NPU total cc: %" PRIu64
+ "; NPU idle cc: %" PRIu32
+ "; NPU axi0 read cc: %" PRIu32
+ "; NPU axi0 write cc: %" PRIu32
+ "; NPU axi1 read cc: %" PRIu32 "\n",
t.npu_total_ccnt,
t.npu_idle_ccnt,
t.npu_axi0_read_ccnt,