代码中在 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