diff options
author | Per Åstrand <per.astrand@arm.com> | 2021-02-22 09:50:54 +0100 |
---|---|---|
committer | Per Åstrand <per.astrand@arm.com> | 2021-02-22 09:56:37 +0100 |
commit | 4d61275ffe7a962ea89a09d2789ce59fea375fa8 (patch) | |
tree | 2d1f44fa1eceb2f1431b42e76c9ccbc9a63b9d7b | |
parent | 79929ff29ffe5d39b19f415fe584ee3eb3e2df97 (diff) | |
download | ethos-u-core-platform-4d61275ffe7a962ea89a09d2789ce59fea375fa8.tar.gz |
Move queue to global memory
The FreeRTOS port resets the stack when the scheduler starts. Move the
queue to global memory for it to not be overwritten.
Change-Id: I98f2360a14a0f74a65353694c6e2f60d37461ecf
-rw-r--r-- | applications/freertos/main.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/applications/freertos/main.cpp b/applications/freertos/main.cpp index b926d1e..539dff5 100644 --- a/applications/freertos/main.cpp +++ b/applications/freertos/main.cpp @@ -252,9 +252,12 @@ void inferenceJobTask(void *pvParameters) { } // namespace +/* Keep the queue ouf of the stack sinde freertos resets it when the scheduler starts.*/ +QueueHandle_t inferenceProcessQueue; + int main() { // Inference process - QueueHandle_t inferenceProcessQueue = xQueueCreate(10, sizeof(xInferenceJob *)); + inferenceProcessQueue = xQueueCreate(10, sizeof(xInferenceJob *)); xTaskCreate(inferenceProcessTask, "inferenceProcess", 2 * 1024, inferenceProcessQueue, 1, nullptr); // Inference job task |