mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-08-06 15:15:15 +08:00
Merge branch 'feature/modify_stack_create_api_stack_bytes_as_unit' into 'master'
Change task stack unit from "unsigned long" to "unsigned char" See merge request sdk/ESP8266_RTOS_SDK!279
This commit is contained in:
@ -185,7 +185,7 @@ void uart_init(void)
|
|||||||
|
|
||||||
xQueueUart = xQueueCreate(32, sizeof(os_event_t));
|
xQueueUart = xQueueCreate(32, sizeof(os_event_t));
|
||||||
|
|
||||||
xTaskCreate(uart_task, (uint8_t const*)"uTask", 512, NULL, tskIDLE_PRIORITY + 2, &xUartTaskHandle);
|
xTaskCreate(uart_task, (uint8_t const*)"uTask", 2048, NULL, tskIDLE_PRIORITY + 2, &xUartTaskHandle);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
gwen:
|
gwen:
|
||||||
crypto: 8943c89
|
crypto: 8943c89
|
||||||
espnow: 8943c89
|
espnow: 8943c89
|
||||||
core: 15348a7
|
core: fdd8880
|
||||||
net80211: 68f6a7c
|
net80211: fdd8880
|
||||||
pp: bdb3c08
|
pp: fdd8880
|
||||||
pwm: 0181338
|
pwm: 0181338
|
||||||
smartconfig:9ec59b5
|
smartconfig:9ec59b5
|
||||||
wpa: 8943c89
|
wpa: 8943c89
|
||||||
wps: 8943c89
|
wps: fdd8880
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -98,7 +98,7 @@ esp_err_t esp_event_loop_init(system_event_cb_t cb, void *ctx)
|
|||||||
s_event_queue = wifi_queue_create(32, sizeof(system_event_t));
|
s_event_queue = wifi_queue_create(32, sizeof(system_event_t));
|
||||||
if(s_event_queue == NULL)
|
if(s_event_queue == NULL)
|
||||||
return ESP_ERR_NO_MEM;
|
return ESP_ERR_NO_MEM;
|
||||||
if(wifi_task_create(esp_event_loop_task, "esp_event_loop_task", 512, NULL, 2) == NULL) {
|
if(wifi_task_create(esp_event_loop_task, "esp_event_loop_task", 2048, NULL, 2) == NULL) {
|
||||||
return ESP_ERR_NO_MEM;
|
return ESP_ERR_NO_MEM;
|
||||||
}
|
}
|
||||||
s_event_handler_cb = cb;
|
s_event_handler_cb = cb;
|
||||||
|
@ -103,7 +103,7 @@ void call_user_start(void)
|
|||||||
|
|
||||||
wifi_os_init();
|
wifi_os_init();
|
||||||
|
|
||||||
assert(wifi_task_create(user_init_entry, "uiT", 512, NULL, wifi_task_get_max_priority()) != NULL);
|
assert(wifi_task_create(user_init_entry, "uiT", 2048, NULL, wifi_task_get_max_priority()) != NULL);
|
||||||
|
|
||||||
wifi_os_start();
|
wifi_os_start();
|
||||||
}
|
}
|
||||||
|
@ -86,7 +86,7 @@
|
|||||||
#define configCPU_CLOCK_HZ ( ( unsigned long ) 80000000 )
|
#define configCPU_CLOCK_HZ ( ( unsigned long ) 80000000 )
|
||||||
#define configTICK_RATE_HZ ( ( portTickType ) 100 )
|
#define configTICK_RATE_HZ ( ( portTickType ) 100 )
|
||||||
#define configMAX_PRIORITIES 15
|
#define configMAX_PRIORITIES 15
|
||||||
#define configMINIMAL_STACK_SIZE ( ( unsigned short )176 )
|
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 768 )
|
||||||
//#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 17 * 1024 ) )
|
//#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 17 * 1024 ) )
|
||||||
#define configMAX_TASK_NAME_LEN ( 16 )
|
#define configMAX_TASK_NAME_LEN ( 16 )
|
||||||
#define configUSE_TRACE_FACILITY 0
|
#define configUSE_TRACE_FACILITY 0
|
||||||
@ -106,7 +106,7 @@
|
|||||||
#if configUSE_TIMERS
|
#if configUSE_TIMERS
|
||||||
#define configTIMER_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
#define configTIMER_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||||
#define configTIMER_QUEUE_LENGTH (10)
|
#define configTIMER_QUEUE_LENGTH (10)
|
||||||
#define configTIMER_TASK_STACK_DEPTH ( ( unsigned short ) 512 )
|
#define configTIMER_TASK_STACK_DEPTH ( ( unsigned short ) 2048 )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Co-routine definitions. */
|
/* Co-routine definitions. */
|
||||||
|
@ -105,7 +105,7 @@ extern "C" {
|
|||||||
#define portDOUBLE double
|
#define portDOUBLE double
|
||||||
#define portLONG long
|
#define portLONG long
|
||||||
#define portSHORT short
|
#define portSHORT short
|
||||||
#define portSTACK_TYPE unsigned portLONG
|
#define portSTACK_TYPE unsigned char
|
||||||
#define portBASE_TYPE long
|
#define portBASE_TYPE long
|
||||||
|
|
||||||
#define BaseType_t portBASE_TYPE
|
#define BaseType_t portBASE_TYPE
|
||||||
|
@ -54,8 +54,9 @@ typedef struct task_info
|
|||||||
StackType_t *pxEndOfStack;
|
StackType_t *pxEndOfStack;
|
||||||
} task_info_t;
|
} task_info_t;
|
||||||
|
|
||||||
static void IRAM_ATTR panic_stack(StackType_t *start, StackType_t *end)
|
static void IRAM_ATTR panic_stack(StackType_t *start_stk, StackType_t *end_stk)
|
||||||
{
|
{
|
||||||
|
uint32_t *start = (uint32_t *)start_stk, *end = (uint32_t *)end_stk;
|
||||||
size_t i, j;
|
size_t i, j;
|
||||||
size_t size = end - start + 1;
|
size_t size = end - start + 1;
|
||||||
|
|
||||||
@ -118,10 +119,10 @@ void IRAM_ATTR panicHandler(void *frame)
|
|||||||
if (task) {
|
if (task) {
|
||||||
|
|
||||||
StackType_t *pdata = task->pxStack;
|
StackType_t *pdata = task->pxStack;
|
||||||
StackType_t *end = task->pxEndOfStack + 1;
|
StackType_t *end = task->pxEndOfStack + 4;
|
||||||
|
|
||||||
ets_printf("\nTask stack [%s] stack from [%p] to [%p], total [%d] size\n\n",
|
ets_printf("\nTask stack [%s] stack from [%p] to [%p], total [%d] size\n\n",
|
||||||
task->pcTaskName, pdata, end, end - pdata + 1);
|
task->pcTaskName, pdata, end, end - pdata + 4);
|
||||||
|
|
||||||
panic_stack(pdata, end);
|
panic_stack(pdata, end);
|
||||||
|
|
||||||
|
@ -107,16 +107,16 @@ void _xt_timer_int1(void);
|
|||||||
/*
|
/*
|
||||||
* See header file for description.
|
* See header file for description.
|
||||||
*/
|
*/
|
||||||
portSTACK_TYPE* pxPortInitialiseStack(portSTACK_TYPE* pxTopOfStack, pdTASK_CODE pxCode, void* pvParameters)
|
StackType_t *pxPortInitialiseStack(StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters)
|
||||||
{
|
{
|
||||||
#define SET_STKREG(r,v) sp[(r) >> 2] = (portSTACK_TYPE)(v)
|
#define SET_STKREG(r,v) sp[(r) >> 2] = (unsigned long)(v)
|
||||||
portSTACK_TYPE* sp, *tp;
|
unsigned long *sp, *tp, *stk = (unsigned long *)pxTopOfStack;
|
||||||
|
|
||||||
/* Create interrupt stack frame aligned to 16 byte boundary */
|
/* Create interrupt stack frame aligned to 16 byte boundary */
|
||||||
sp = (portSTACK_TYPE*)(((INT32U)(pxTopOfStack + 1) - XT_CP_SIZE - XT_STK_FRMSZ) & ~0xf);
|
sp = (unsigned long *)(((INT32U)(stk + 1) - XT_CP_SIZE - XT_STK_FRMSZ) & ~0xf);
|
||||||
|
|
||||||
/* Clear the entire frame (do not use memset() because we don't depend on C library) */
|
/* Clear the entire frame (do not use memset() because we don't depend on C library) */
|
||||||
for (tp = sp; tp <= pxTopOfStack; ++tp) {
|
for (tp = sp; tp <= stk; ++tp) {
|
||||||
*tp = 0;
|
*tp = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,7 +135,7 @@ portSTACK_TYPE* pxPortInitialiseStack(portSTACK_TYPE* pxTopOfStack, pdTASK_CODE
|
|||||||
SET_STKREG(XT_STK_PS, PS_UM | PS_EXCM | PS_WOE | PS_CALLINC(1));
|
SET_STKREG(XT_STK_PS, PS_UM | PS_EXCM | PS_WOE | PS_CALLINC(1));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return sp;
|
return (StackType_t *)sp;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IRAM_ATTR PendSV(char req)
|
void IRAM_ATTR PendSV(char req)
|
||||||
@ -361,7 +361,7 @@ signed portBASE_TYPE xTaskGenericCreate(TaskFunction_t pxTaskCode,
|
|||||||
void *pvParameters,
|
void *pvParameters,
|
||||||
unsigned portBASE_TYPE uxPriority,
|
unsigned portBASE_TYPE uxPriority,
|
||||||
TaskHandle_t *pxCreatedTask,
|
TaskHandle_t *pxCreatedTask,
|
||||||
portSTACK_TYPE *puxStackBuffer,
|
StackType_t *puxStackBuffer,
|
||||||
const MemoryRegion_t * const xRegions)
|
const MemoryRegion_t * const xRegions)
|
||||||
{
|
{
|
||||||
(void)puxStackBuffer;
|
(void)puxStackBuffer;
|
||||||
|
@ -387,8 +387,8 @@ endmenu # UDP
|
|||||||
|
|
||||||
config TCPIP_TASK_STACK_SIZE
|
config TCPIP_TASK_STACK_SIZE
|
||||||
int "TCP/IP Task Stack Size"
|
int "TCP/IP Task Stack Size"
|
||||||
default 512
|
default 2048
|
||||||
range 512 2048
|
range 2048 8192
|
||||||
help
|
help
|
||||||
Configure TCP/IP task stack size, used by LWIP to process multi-threaded TCP/IP operations.
|
Configure TCP/IP task stack size, used by LWIP to process multi-threaded TCP/IP operations.
|
||||||
Setting this stack too small will result in stack overflow crashes.
|
Setting this stack too small will result in stack overflow crashes.
|
||||||
|
@ -188,5 +188,5 @@ void app_main()
|
|||||||
{
|
{
|
||||||
ESP_ERROR_CHECK( nvs_flash_init() );
|
ESP_ERROR_CHECK( nvs_flash_init() );
|
||||||
initialise_wifi();
|
initialise_wifi();
|
||||||
xTaskCreate(&http_get_task, "http_get_task", 4096, NULL, 5, NULL);
|
xTaskCreate(&http_get_task, "http_get_task", 16384, NULL, 5, NULL);
|
||||||
}
|
}
|
||||||
|
@ -336,5 +336,5 @@ void app_main(void)
|
|||||||
{
|
{
|
||||||
ESP_ERROR_CHECK( nvs_flash_init() );
|
ESP_ERROR_CHECK( nvs_flash_init() );
|
||||||
initialise_wifi();
|
initialise_wifi();
|
||||||
xTaskCreate(&https_get_task, "https_get_task", 2048, NULL, 5, NULL);
|
xTaskCreate(&https_get_task, "https_get_task", 8192, NULL, 5, NULL);
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ extern const uint8_t server_root_cert_pem_end[] asm("_binary_server_root_cert_
|
|||||||
"\r\n"
|
"\r\n"
|
||||||
|
|
||||||
#define WOLFSSL_DEMO_THREAD_NAME "wolfssl_client"
|
#define WOLFSSL_DEMO_THREAD_NAME "wolfssl_client"
|
||||||
#define WOLFSSL_DEMO_THREAD_STACK_WORDS 2048
|
#define WOLFSSL_DEMO_THREAD_STACK_WORDS 8192
|
||||||
#define WOLFSSL_DEMO_THREAD_PRORIOTY 6
|
#define WOLFSSL_DEMO_THREAD_PRORIOTY 6
|
||||||
|
|
||||||
#define WOLFSSL_DEMO_SNTP_SERVERS "pool.ntp.org"
|
#define WOLFSSL_DEMO_SNTP_SERVERS "pool.ntp.org"
|
||||||
|
@ -51,7 +51,7 @@ const int CONNECTED_BIT = 1<<0;
|
|||||||
#define MQTT_PORT 1883 /* MQTT Port*/
|
#define MQTT_PORT 1883 /* MQTT Port*/
|
||||||
|
|
||||||
#define MQTT_CLIENT_THREAD_NAME "mqtt_client_thread"
|
#define MQTT_CLIENT_THREAD_NAME "mqtt_client_thread"
|
||||||
#define MQTT_CLIENT_THREAD_STACK_WORDS 2048
|
#define MQTT_CLIENT_THREAD_STACK_WORDS 8192
|
||||||
#define MQTT_CLIENT_THREAD_PRIO 8
|
#define MQTT_CLIENT_THREAD_PRIO 8
|
||||||
|
|
||||||
static const char *TAG = "example";
|
static const char *TAG = "example";
|
||||||
|
@ -327,5 +327,5 @@ void app_main(void)
|
|||||||
{
|
{
|
||||||
ESP_ERROR_CHECK( nvs_flash_init() );
|
ESP_ERROR_CHECK( nvs_flash_init() );
|
||||||
initialise_wifi();
|
initialise_wifi();
|
||||||
xTaskCreate(&openssl_client_task, "openssl_client", 2048, NULL, 6, NULL);
|
xTaskCreate(&openssl_client_task, "openssl_client", 8192, NULL, 6, NULL);
|
||||||
}
|
}
|
||||||
|
@ -255,5 +255,5 @@ void app_main(void)
|
|||||||
{
|
{
|
||||||
ESP_ERROR_CHECK(nvs_flash_init());
|
ESP_ERROR_CHECK(nvs_flash_init());
|
||||||
initialise_wifi();
|
initialise_wifi();
|
||||||
xTaskCreate(&openssl_task, "openssl_task", 2048, NULL, 5, NULL);
|
xTaskCreate(&openssl_task, "openssl_task", 8192, NULL, 5, NULL);
|
||||||
}
|
}
|
||||||
|
@ -336,5 +336,5 @@ void app_main(void)
|
|||||||
{
|
{
|
||||||
ESP_ERROR_CHECK( nvs_flash_init() );
|
ESP_ERROR_CHECK( nvs_flash_init() );
|
||||||
initialise_wifi();
|
initialise_wifi();
|
||||||
xTaskCreate(&openssl_server_task, "openssl_server", 2048, NULL, 6, NULL);
|
xTaskCreate(&openssl_server_task, "openssl_server", 8192, NULL, 6, NULL);
|
||||||
}
|
}
|
||||||
|
@ -210,6 +210,6 @@ void user_init(void)
|
|||||||
/* need to set opmode before you set config */
|
/* need to set opmode before you set config */
|
||||||
wifi_set_opmode(STATION_MODE);
|
wifi_set_opmode(STATION_MODE);
|
||||||
|
|
||||||
xTaskCreate(smartconfig_task, "smartconfig_task", 256, NULL, 2, NULL);
|
xTaskCreate(smartconfig_task, "smartconfig_task", 1024, NULL, 2, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,5 +52,5 @@ static void wps_task(void* pvParameters)
|
|||||||
|
|
||||||
void user_init(void)
|
void user_init(void)
|
||||||
{
|
{
|
||||||
xTaskCreate(wps_task, "wps_task", 1024, NULL, 4, NULL);
|
xTaskCreate(wps_task, "wps_task", 4096, NULL, 4, NULL);
|
||||||
}
|
}
|
||||||
|
@ -19,5 +19,5 @@ void unityTask(void *pvParameters)
|
|||||||
void app_main(void)
|
void app_main(void)
|
||||||
{
|
{
|
||||||
wifi_station_set_auto_connect(false);
|
wifi_station_set_auto_connect(false);
|
||||||
xTaskCreate(unityTask, "unityTask", 2048, NULL, UNITY_FREERTOS_PRIORITY, NULL);
|
xTaskCreate(unityTask, "unityTask", 8192, NULL, UNITY_FREERTOS_PRIORITY, NULL);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user