diff options
-rw-r--r-- | applications/freertos/main.cpp | 6 | ||||
-rw-r--r-- | targets/corstone-300/retarget.c | 13 |
2 files changed, 12 insertions, 7 deletions
diff --git a/applications/freertos/main.cpp b/applications/freertos/main.cpp index 095af50..b926d1e 100644 --- a/applications/freertos/main.cpp +++ b/applications/freertos/main.cpp @@ -39,6 +39,10 @@ using namespace InferenceProcess; * InferenceJob ****************************************************************************/ +#define TENSOR_ARENA_SIZE 200000 + +__attribute__((section(".bss.NoInit"), aligned(16))) uint8_t inferenceProcessTensorArena[TENSOR_ARENA_SIZE]; + namespace { struct xInferenceJob : public InferenceJob { @@ -197,7 +201,7 @@ uint8_t expectedData[] = { void inferenceProcessTask(void *pvParameters) { QueueHandle_t queue = reinterpret_cast<QueueHandle_t>(pvParameters); - class InferenceProcess inferenceProcess; + class InferenceProcess inferenceProcess(inferenceProcessTensorArena, TENSOR_ARENA_SIZE); while (true) { xInferenceJob *job; diff --git a/targets/corstone-300/retarget.c b/targets/corstone-300/retarget.c index d53431f..b83ac40 100644 --- a/targets/corstone-300/retarget.c +++ b/targets/corstone-300/retarget.c @@ -184,7 +184,7 @@ char *RETARGET(_command_string)(char *cmd, int len) { void RETARGET(_exit)(int return_code) { char exit_code_buffer[64] = {0}; - const char *p = exit_code_buffer; + const char *p = exit_code_buffer; /* Print out the exit code on the uart so any reader know how we exit. */ /* By appending 0x04, ASCII for end-of-transmission the FVP model exits, @@ -194,11 +194,12 @@ void RETARGET(_exit)(int return_code) { * uart when starting the model so that is added last as well. */ - snprintf(exit_code_buffer, sizeof(exit_code_buffer), - "Application exit code: %d.\n" // Let the readers know how we exit - "\04\n" // end-of-transmission - "EXITTHESIM\n", // shutdown_tag - return_code); + snprintf(exit_code_buffer, + sizeof(exit_code_buffer), + "Application exit code: %d.\n" // Let the readers know how we exit + "\04\n" // end-of-transmission + "EXITTHESIM\n", // shutdown_tag + return_code); while (*p != '\0') { uart_putc(*p++); |