#include <stdio.h>
#include <string.h>
#include "sdkconfig.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_system.h"
#include "esp_spi_flash.h"

void myTask1(void *pvParam)
{
  printf("Hello From Task1 First\n");
  vTaskDelay(500/portTICK_PERIOD_MS);

  printf("Hello From Task1 Second\n");
  vTaskDelay(500/portTICK_PERIOD_MS);

  printf("Hello From Task1 Third\n");
  vTaskDelay(500/portTICK_PERIOD_MS);

  vTaskDelete(NULL);
}

void myTask2(void *pvParam)
{
    while (1)
    {
        printf("Hello From Task2\n");
        vTaskDelay(1000/portTICK_PERIOD_MS);
    } 
}

void app_main(void)
{
  xTaskCreate(myTask1, "myTask1", 2048, NULL, 1, NULL);
  xTaskCreate(myTask2, "myTask2", 2048, NULL, 1, NULL);
}