diff --git a/examples/protocols/aws_iot/subscribe_publish/main/subscribe_publish_sample.c b/examples/protocols/aws_iot/subscribe_publish/main/subscribe_publish_sample.c index 2163c3805..398fb3c18 100644 --- a/examples/protocols/aws_iot/subscribe_publish/main/subscribe_publish_sample.c +++ b/examples/protocols/aws_iot/subscribe_publish/main/subscribe_publish_sample.c @@ -277,7 +277,7 @@ void aws_iot_task(void *param) { continue; } - ESP_LOGI(TAG, "-->sleep"); + ESP_LOGI(TAG, "Stack remaining for task '%s' is %d bytes", pcTaskGetTaskName(NULL), uxTaskGetStackHighWaterMark(NULL)); vTaskDelay(1000 / portTICK_RATE_MS); sprintf(cPayload, "%s : %d ", "hello from ESP32 (QOS0)", i++); paramsQOS0.payloadLen = strlen(cPayload); @@ -328,10 +328,5 @@ void app_main() ESP_ERROR_CHECK( err ); initialise_wifi(); -#ifdef CONFIG_MBEDTLS_DEBUG - const size_t stack_size = 36*1024; -#else - const size_t stack_size = 36*1024; -#endif - xTaskCreatePinnedToCore(&aws_iot_task, "aws_iot_task", stack_size, NULL, 5, NULL, 1); + xTaskCreatePinnedToCore(&aws_iot_task, "aws_iot_task", 9216, NULL, 5, NULL, 1); } diff --git a/examples/protocols/aws_iot/thing_shadow/main/thing_shadow_sample.c b/examples/protocols/aws_iot/thing_shadow/main/thing_shadow_sample.c index 13ba14e5d..36feb14e1 100644 --- a/examples/protocols/aws_iot/thing_shadow/main/thing_shadow_sample.c +++ b/examples/protocols/aws_iot/thing_shadow/main/thing_shadow_sample.c @@ -125,18 +125,6 @@ static const char * ROOT_CA_PATH = CONFIG_EXAMPLE_ROOT_CA_PATH; #error "Invalid method for loading certs" #endif -/** - * @brief Default MQTT HOST URL is pulled from the aws_iot_config.h which - * uses menuconfig to find a default. - */ -char HostAddress[255] = AWS_IOT_MQTT_HOST; - -/** - * @brief Default MQTT port is pulled from the aws_iot_config.h which - * uses menuconfig to find a default. - */ -uint32_t port = AWS_IOT_MQTT_PORT; - static esp_err_t event_handler(void *ctx, system_event_t *event) { switch(event->event_id) { @@ -325,6 +313,8 @@ void aws_iot_task(void *param) { } } ESP_LOGI(TAG, "*****************************************************************************************"); + ESP_LOGI(TAG, "Stack remaining for task '%s' is %d bytes", pcTaskGetTaskName(NULL), uxTaskGetStackHighWaterMark(NULL)); + vTaskDelay(1000 / portTICK_RATE_MS); } @@ -374,5 +364,5 @@ void app_main() initialise_wifi(); /* Temporarily pin task to core, due to FPU uncertainty */ - xTaskCreatePinnedToCore(&aws_iot_task, "aws_iot_task", 16384+1024, NULL, 5, NULL, 1); + xTaskCreatePinnedToCore(&aws_iot_task, "aws_iot_task", 9216, NULL, 5, NULL, 1); }