From cd63e0e03c5fa205a6fe5a48b2bf73dc6a1c05d6 Mon Sep 17 00:00:00 2001 From: "Ching-Hsin,Lee" Date: Thu, 1 Aug 2024 15:41:57 +0800 Subject: [PATCH] Use static memory instead of stack for OTA decoded data * Default block size is 4096. Task stack size may have to be changed if allocating this buffer from stack. Using static memory here instead of stack --- main/demo_tasks/ota_over_mqtt_demo/ota_over_mqtt_demo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/demo_tasks/ota_over_mqtt_demo/ota_over_mqtt_demo.c b/main/demo_tasks/ota_over_mqtt_demo/ota_over_mqtt_demo.c index 1a568a3..49818f6 100644 --- a/main/demo_tasks/ota_over_mqtt_demo/ota_over_mqtt_demo.c +++ b/main/demo_tasks/ota_over_mqtt_demo/ota_over_mqtt_demo.c @@ -1186,7 +1186,7 @@ static void processOTAEvents( void ) } else { - uint8_t decodedData[ mqttFileDownloader_CONFIG_BLOCK_SIZE ]; + static uint8_t decodedData[ mqttFileDownloader_CONFIG_BLOCK_SIZE ]; size_t decodedDataLength = 0; MQTTFileDownloaderStatus_t xReturnStatus; int16_t result = -1;