From 7716cee237fcbc371a443a39dd0f4c3f6bf8d989 Mon Sep 17 00:00:00 2001 From: Kristofer Jonsson Date: Fri, 10 Feb 2023 13:30:16 +0100 Subject: Fix size of TFLM arena The TFLM arena size was incorrectly surrounded by sizeof(), which caused the arena size to be allocated to only 4 bytes. Change-Id: Iea8c76e0ce434973c9d0a7f696cfb51af49a48fd --- applications/message_handler_openamp/main.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/applications/message_handler_openamp/main.cpp b/applications/message_handler_openamp/main.cpp index 2aad224..9d3c074 100644 --- a/applications/message_handler_openamp/main.cpp +++ b/applications/message_handler_openamp/main.cpp @@ -20,6 +20,7 @@ * Includes *****************************************************************************/ +#include #include #include @@ -61,7 +62,7 @@ constexpr size_t arenaSize = TENSOR_ARENA_SIZE; *****************************************************************************/ extern "C" { -__attribute__((section(".resource_table"))) ResourceTable resourceTable(8, sizeof(arenaSize *NUM_PARALLEL_TASKS)); +__attribute__((section(".resource_table"))) ResourceTable resourceTable(8, arenaSize *NUM_PARALLEL_TASKS); } /***************************************************************************** @@ -98,6 +99,11 @@ int main() { auto rproc = std::make_shared(mailbox, resourceTable.table, sizeof(resourceTable), *mem); auto messageHandler = std::make_shared(*rproc, "ethos-u-0.0"); + printf("TFLM arena. pa=%" PRIx32 ", da=%" PRIx32 ", len=%" PRIx32 "\n", + resourceTable.carveout.da, + resourceTable.carveout.pa, + resourceTable.carveout.len); + std::array, NUM_PARALLEL_TASKS> inferenceRunner; for (size_t i = 0; i < NUM_PARALLEL_TASKS; i++) { -- cgit v1.2.1