summaryrefslogtreecommitdiff
path: root/ports/esp32/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'ports/esp32/main.c')
-rw-r--r--ports/esp32/main.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/ports/esp32/main.c b/ports/esp32/main.c
index 81e4a6434..6f9ab82d0 100644
--- a/ports/esp32/main.c
+++ b/ports/esp32/main.c
@@ -65,7 +65,6 @@
// MicroPython runs as a task under FreeRTOS
#define MP_TASK_PRIORITY (ESP_TASK_PRIO_MIN + 1)
#define MP_TASK_STACK_SIZE (16 * 1024)
-#define MP_TASK_STACK_LEN (MP_TASK_STACK_SIZE / sizeof(StackType_t))
int vprintf_null(const char *format, va_list ap) {
// do nothing: this is used as a log target during raw repl mode
@@ -75,7 +74,7 @@ int vprintf_null(const char *format, va_list ap) {
void mp_task(void *pvParameter) {
volatile uint32_t sp = (uint32_t)get_sp();
#if MICROPY_PY_THREAD
- mp_thread_init(pxTaskGetStackStart(NULL), MP_TASK_STACK_LEN);
+ mp_thread_init(pxTaskGetStackStart(NULL), MP_TASK_STACK_SIZE / sizeof(uintptr_t));
#endif
uart_init();
@@ -169,7 +168,7 @@ void app_main(void) {
nvs_flash_erase();
nvs_flash_init();
}
- xTaskCreatePinnedToCore(mp_task, "mp_task", MP_TASK_STACK_LEN, NULL, MP_TASK_PRIORITY, &mp_main_task_handle, MP_TASK_COREID);
+ xTaskCreatePinnedToCore(mp_task, "mp_task", MP_TASK_STACK_SIZE / sizeof(StackType_t), NULL, MP_TASK_PRIORITY, &mp_main_task_handle, MP_TASK_COREID);
}
void nlr_jump_fail(void *val) {