代碼中在main函數內執行 tls_os_task_create(&Task2_HandHdle,"smartconfig_task2",demo_console_task2,NULL,(void )DemoTaskStk2,DEMO_TASK_SIZE2 sizeof(u32),DEMO_TASK_PRIO,0);
tls_os_task_create(&Task1_HandHdle,"smartconfig_task1",demo_console_task1,NULL,(void *)DemoTaskStk1,DEMO_TASK_SIZE1 * sizeof(u32),DEMO_SOCKET_C_TASK_PRIO,0);
在兩個任務中,沒有調用修改優先級函數,一直保持任務優先級不變,執行一段時間後,打印結果
task[BTC] priority[61] stack over flow
程序死掉
{{main.c(uploading...)}}
include "wm_include.h"
include "FreeRTOS.h"
include "task.h"
include "wm_cpu.h"
include "wm_dma.h"
include "wm_gpio_afsel.h"
include "wm_timer.h"
include "wm_bt.h"
include "wm_pmu.h"
include "cJSON.h"
include "libemqtt.h"
include "lwip/netif.h"
include <string.h>
tls_os_task_t Task1_HandHdle;
tls_os_task_t Task2_HandHdle;
define DEMO_TASK_SIZE2 1024*4
static OS_STK DemoTaskStk2[DEMO_TASK_SIZE2];
define DEMO_TASK_SIZE1 1024*6
static OS_STK DemoTaskStk1[DEMO_TASK_SIZE1];
xTaskHandle tcpclient_handle,http_handle;
typedef struct
{
}Wifi_flash; //賬號密碼結構體
int Wifi_Connect(char ssid, char pwd);
int Mqtt_Publish_Msg_All(char *msg);
void control_test()
{
}
void tls_ble_output_func(uint8_t *data,uint32_t len)
{
}
void ble_Bluetooth_On()
{
}
void ble_Bluetooth_Off()
{
}
void demo_console_task1(void *sdata)
{
}
void demo_console_task2(void *sdata)
{
}
void UserMain(void)
{
}
endif