Using SMP in FreeRTOS

Hi,

I’m new to FreeRTOS. I’m using an ESP32-S3 board and my application runs about 6 continuous tasks. 5 of them have the same priority and the other one has a higher priority. I’m looking for a way to run the task with the higher priority on CPU1 and the rest of them on CPU0.

I used the menuconfig and enabled CONFIG_FREERTOS_SMP to 1 and also used vTaskCoreAffinitySet for the higher priority task to use only CPU1 by setting the value to 0x02.

But after making this change, my ESP32 goes into a power-cycle loop with the following error : assert failed: prvYieldForTask tasks.c:744 (xTaskGetCurrentTaskHandle()->uxCriticalNesting > 0U)

this is how I’ve created the higher priority task :

TaskHandle_t IR_task_handle;
xReturned = xTaskCreate(IR_receiver_task, "IR recv task",
                            4096, (void *)1, 10, &IR_task_handle);
if (xReturned != pdPASS) 
{
   perror("Error in taskCreate for IR recv task : ");
   exit(FAILURE);
}
vTaskCoreAffinitySet(IR_task_handle, 0x02);

I’m not sure where I’ve gone wrong. Kindly help. Thanks !

Kulasekaran

Can you enable GDB debugging as described here and get the callstack when assertion fails?

Hi,

Thanks for the reply. I went through the guide and made my changes to the sdkconfig as follows:

# CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT is not set
# CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT is not set
# CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set
CONFIG_ESP_SYSTEM_PANIC_GDBSTUB=y
# CONFIG_ESP_SYSTEM_GDBSTUB_RUNTIME is not set
CONFIG_ESP_SYSTEM_RTC_FAST_MEM_AS_HEAP_DEPCHECK=y
CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP=y

But after doing this, the application is just stuck at a place with nothing else happening.

Also, I’m attaching the FREERTOS configuration part in the sdk as well, Not sure if it’s of any help to you, But I think it can provide you a clear picture of what I’ve done.

#
# FreeRTOS
#

#
# Kernel
#
CONFIG_FREERTOS_SMP=y
# CONFIG_FREERTOS_UNICORE is not set
CONFIG_FREERTOS_HZ=1000
# CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE is not set
# CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL is not set
CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y
CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1
CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=2000
# CONFIG_FREERTOS_USE_IDLE_HOOK is not set
# CONFIG_FREERTOS_USE_MINIMAL_IDLE_HOOK is not set
# CONFIG_FREERTOS_USE_TICK_HOOK is not set
CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16
# CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY is not set
CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1
CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048
CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10
CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0
CONFIG_FREERTOS_TASK_NOTIFICATION_ARRAY_ENTRIES=1
# CONFIG_FREERTOS_USE_TRACE_FACILITY is not set
# CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS is not set
# end of Kernel

#
# Port
#
CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER=y
# CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK is not set
CONFIG_FREERTOS_TLSP_DELETION_CALLBACKS=y
# CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP is not set
CONFIG_FREERTOS_ISR_STACKSIZE=1536
CONFIG_FREERTOS_INTERRUPT_BACKTRACE=y
CONFIG_FREERTOS_TICK_SUPPORT_SYSTIMER=y
CONFIG_FREERTOS_CORETIMER_SYSTIMER_LVL1=y
# CONFIG_FREERTOS_CORETIMER_SYSTIMER_LVL3 is not set
CONFIG_FREERTOS_SYSTICK_USES_SYSTIMER=y
# CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH is not set
# CONFIG_FREERTOS_PLACE_SNAPSHOT_FUNS_INTO_FLASH is not set
# CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE is not set
CONFIG_FREERTOS_ENABLE_TASK_SNAPSHOT=y
# end of Port

CONFIG_FREERTOS_NO_AFFINITY=0xFFFFFFFF
CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION=y
CONFIG_FREERTOS_DEBUG_OCDAWARE=y
# end of FreeRTOS

On the other hand, when I first enabled the SMP mode, I faced a compilation error in teh following file : frameworks\esp-idf-v5.1.2\components\freertos\FreeRTOS-Kernel-SMP\include

The error was in the below :

/**
 * Defines affinity to all available cores.
 *
 */
#define tskNO_AFFINITY ( ( UBaseType_t ) -1U )

To fix the above, I just changed UBaseType_t to BaseType_t. Just pointing this out, just so you know.

Looking forward for your helpful response. Thanks !

Kulasekaran

A better fix would be:

#define tskNO_AFFINITY ( ( UBaseType_t ) 0xFFFFFFFF )

But that won’t fix the issue you are seeing.

What output do you see? Do you get the GDB prompt?

I’m not seeing the GDB prompt appear @aggarg. It’s just that my application started and I see logs getting printed, but it’s does not appear to be running. I’ve several tasks that will be continuously printing logs to the UART terminal. But now it seems to be stuck at a place, where it previously used to reboot.

Would you please share these logs?

SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3818,len:0x1758
load:0x403c9700,len:0x4
load:0x403c9704,len:0xc00
load:0x403cc700,len:0x2e04
entry 0x403c9908
I (26) boot: ESP-IDF v5.1.2-dirty 2nd stage bootloader
I (27) boot: compile time May 28 2024 11:41:09
I (27) boot: Multicore bootloader
I (30) boot: chip revision: v0.2
I (34) boot.esp32s3: Boot SPI Speed : 80MHz
I (39) boot.esp32s3: SPI Mode       : DIO
I (44) boot.esp32s3: SPI Flash Size : 16MB
I (48) boot: Enabling RNG early entropy source...
I (54) boot: Partition Table:
I (57) boot: ## Label            Usage          Type ST Offset   Length
I (65) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (72) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (80) boot:  2 factory          factory app      00 00 00010000 00500000
I (87) boot: End of partition table
I (91) esp_image: segment 0: paddr=00010020 vaddr=3c100020 size=42534h (271668) map
I (148) esp_image: segment 1: paddr=0005255c vaddr=3fc99a00 size=04824h ( 18468) load
I (153) esp_image: segment 2: paddr=00056d88 vaddr=40374000 size=09290h ( 37520) load
I (163) esp_image: segment 3: paddr=00060020 vaddr=42000020 size=fa64ch (1025612) map
I (347) esp_image: segment 4: paddr=0015a674 vaddr=4037d290 size=0c754h ( 51028) load
I (368) boot: Loaded app from partition at offset 0x10000
I (368) boot: Disabling RNG early entropy source...
I (380) cpu_start: Multicore app
I (380) cpu_start: Pro cpu up.
I (380) cpu_start: Starting app cpu, entry point is 0x403756fc
0x403756fc: call_start_cpu1 at C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_system/port/cpu_start.c:157

I (0) cpu_start: App cpu up.
I (398) cpu_start: Pro cpu start user code
I (398) cpu_start: cpu freq: 160000000 Hz
I (398) cpu_start: Application information:
I (401) cpu_start: Project name:     IR_BLE_mesh
I (406) cpu_start: App version:      3754d37-dirty
I (412) cpu_start: Compile time:     May 28 2024 11:40:36
I (418) cpu_start: ELF file SHA256:  e8dc3ceec165637f...
I (424) cpu_start: ESP-IDF:          v5.1.2-dirty
I (429) cpu_start: Min chip rev:     v0.0
I (434) cpu_start: Max chip rev:     v0.99
I (439) cpu_start: Chip rev:         v0.2
I (444) heap_init: Initializing. RAM available for dynamic allocation:
I (451) heap_init: At 3FCABDC8 len 0003D948 (246 KiB): DRAM
I (457) heap_init: At 3FCE9710 len 00005724 (21 KiB): STACK/DRAM
I (464) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (470) heap_init: At 600FE010 len 00001FD8 (7 KiB): RTCRAM
I (477) spi_flash: detected chip: gd
I (480) spi_flash: flash io: dio
W (485) ADC: legacy driver is deprecated, please migrate to `esp_adc/adc_oneshot.h`
I (494) sleep: Configure to isolate all GPIO pins in sleep state
I (500) sleep: Enable automatic switching of GPIO sleep configuration
I (507) coexist: coex firmware version: b6d5e8c
I (512) coexist: coexist rom version e7ae62f
I (517) app_start: Starting scheduler on CPU0
I (131) app_start: Starting scheduler on CPU1
I (522) main_task: Started on CPU0
I (532) main_task: Calling app_main()
I (536) [MAIN_DEBUG]   : : =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
I (542) [MAIN_DEBUG]   : : GWY00002 APPLICATION STARTED : 0.6
I (549) [MAIN_DEBUG]   : : =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
I (555) [MESH_DEBUG]  : Initializing...
I (555) gpio: GPIO[21]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (569) gpio: GPIO[14]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (578) gpio: GPIO[13]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (680) BLE_INIT: BT controller compile version [59725b5]
I (682) BLE_INIT: Bluetooth MAC: dc:da:0c:74:be:c2

I (683) phy_init: phy_version 620,ec7ec30,Sep  5 2023,13:49:13
I (791) [MESH_DEBUG]  : Open namespace done, name "mesh_example"
E (792) [MESH_ERROR]  : Gpio detect
E (792) [MESH_ERROR]  : Gpio detect
E (796) [MESH_ERROR]  : esp_ble_mesh_init
I (925) [MESH_DEBUG]  : ESP_BLE_MESH_PROV_REGISTER_COMP_EVT, err_code 0
I (930) [MESH_DEBUG]  : Restore, key "vendor_client", length 512
I (931) EXAMPLE_NVS: Restore, data: 07 00 00 00 67 00 90 6a 00 00 00 00 00 00 00 00
I (937) EXAMPLE_NVS: Restore, data: 00 00 00 00 00 00 00 00 4e 30 30 30 30 31 00 00
I (945) EXAMPLE_NVS: Restore, data: 07 00 00 00 e9 3d 42 06 00 00 00 00 00 00 00 00
I (953) EXAMPLE_NVS: Restore, data: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (962) EXAMPLE_NVS: Restore, data: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (970) EXAMPLE_NVS: Restore, data: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (979) EXAMPLE_NVS: Restore, data: 00 00 00 00 00 00 00 00 00 43 6f 6f 6c 00 00 00
I (987) EXAMPLE_NVS: Restore, data: 00 00 00 00 00 00 00 00 00 05 14 01 01 00 00 00
I (996) EXAMPLE_NVS: Restore, data: 00 00 00 1c 14 00 00 00 00 00 00 00 00 00 00 00
I (1004) EXAMPLE_NVS: Restore, data: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (1012) EXAMPLE_NVS: Restore, data: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (1021) EXAMPLE_NVS: Restore, data: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (1030) EXAMPLE_NVS: Restore, data: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (1038) EXAMPLE_NVS: Restore, data: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (1047) EXAMPLE_NVS: Restore, data: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (1055) EXAMPLE_NVS: Restore, data: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (1064) EXAMPLE_NVS: Restore, data: 00 00 00 00 69 00 01 00 00 00 02 00 03 00 05 00
I (1072) EXAMPLE_NVS: Restore, data: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (1081) EXAMPLE_NVS: Restore, data: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (1089) EXAMPLE_NVS: Restore, data: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (1098) EXAMPLE_NVS: Restore, data: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (1106) EXAMPLE_NVS: Restore, data: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (1115) EXAMPLE_NVS: Restore, data: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (1123) EXAMPLE_NVS: Restore, data: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (1132) EXAMPLE_NVS: Restore, data: 00 00 00 00 00 00 00 00 69 00 9c 16 00 00 00 00
I (1140) EXAMPLE_NVS: Restore, data: 00 00 00 00 69 00 fb 0f 00 00 00 00 00 00 00 00
I (1149) EXAMPLE_NVS: Restore, data: 00 00 00 00 00 00 00 00 4e 30 30 30 30 31 00 00
I (1157) EXAMPLE_NVS: Restore, data: 07 00 00 00 bf 54 4a 08 00 00 00 00 00 00 00 00
I (1166) EXAMPLE_NVS: Restore, data: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (1174) EXAMPLE_NVS: Restore, data: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (1183) EXAMPLE_NVS: Restore, data: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (1191) EXAMPLE_NVS: Restore, data: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (1200) [MESH_DEBUG]  : Restore, server_addr 0x0007, vnd_tid 0x0000
E (1207) [MESH_ERROR]  : esp_ble_mesh_init
I (1211) [MESH_DEBUG]  : ESP_BLE_MESH_PROVISIONER_SET_DEV_UUID_MATCH_COMP_EVT, err_code 0
I (1226) [MESH_DEBUG]  : ESP_BLE_MESH_PROVISIONER_PROV_ENABLE_COMP_EVT, err_code 0
W (1230) BLE_MESH: AppKey exists, AppKeyIndex updated
I (1234) [MESH_DEBUG]  : ESP_BLE_MESH_PROVISIONER_ADD_LOCAL_APP_KEY_COMP_EVT, err_code 0
I (1243) [MESH_DEBUG]  : ESP_BLE_MESH_PROVISIONER_BIND_APP_KEY_TO_MODEL_COMP_EVT, err_code 0
I (1252) [MESH_DEBUG]  : ESP_BLE_MESH_PROVISIONER_BIND_APP_KEY_TO_MODEL_COMP_EVT, err_code 0
I (1261) [MESH_DEBUG]  : ESP BLE Mesh Provisioner initialized
E (1268) [MESH_ERROR]  : Gpio detect
I (1273) gpio: GPIO[7]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1273) main_task: Returned from app_main()
I (1282) gpio: GPIO[7]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1296) gpio: GPIO[7]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1305) gpio: GPIO[7]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1314) gpio: GPIO[7]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1323) gpio: GPIO[7]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1333) gpio: GPIO[7]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1342) gpio: GPIO[7]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1351) gpio: GPIO[7]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1361) gpio: GPIO[7]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1370) gpio: GPIO[7]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1379) gpio: GPIO[7]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1388) gpio: GPIO[7]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1398) gpio: GPIO[7]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1407) gpio: GPIO[7]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1416) gpio: GPIO[7]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1426) gpio: GPIO[7]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1435) gpio: GPIO[7]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1444) gpio: GPIO[7]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1453) gpio: GPIO[7]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1463) gpio: GPIO[7]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1472) gpio: GPIO[7]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1481) gpio: GPIO[7]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1490) gpio: GPIO[7]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1500) gpio: GPIO[7]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1509) gpio: GPIO[7]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1518) gpio: GPIO[7]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1528) gpio: GPIO[7]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1537) gpio: GPIO[7]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1546) gpio: GPIO[38]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1274) gpio: GPIO[46]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1567) gpio: GPIO[9]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
(1574465) [LTE_DEBUG]    : Power cycling LTE starts
I (1274) gpio: GPIO[12]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
(4181780) [LTE_DEBUG]    : Power cycling LTE end
(4183166) [LTE_DEBUG]    : TURN_OFF_ECHO_CMD
(4183903) [LTE_DEBUG]    : Command sent : ATE0
(4186518) [LTE_DEBUG]    : Heap Free size : 186348 bytes

Seems like your application is booting correctly but until we have debugging setup, we cannot figure out where is it stuck. The next step can be to go back to previous state and start disabling parts of your application to narrow down the problematic part.

I assume you used menuconfig for that?

Yes. You are correct. I used menconfig.

Well, If you mean disabling the other tasks one by one, then I did try that already. It didn’t cause any improvement.

I did try one more thing. I used xTaskCreatePinnedToCore() function with the SMP disabled and used xTaskGetCoreID() function to verify if they really are running on different cores and they seem to. But is this the right way ?

Task to be running on Core 1:

TaskHandle_t IR_task_handle;
    xReturned = xTaskCreatePinnedToCore(IR_receiver_task, "IR recv task",
                            4096, (void *)1, 10, &IR_task_handle, 1);
    if (xReturned != pdPASS) 
    {
        perror("Error in taskCreate for IR recv task : ");
        exit(FAILURE);
    }

Task to be running on Core 0 :

xReturned = xTaskCreate(LED_task, "LED task",
                            4096, (void *)1, 1, &xHandle);
    if (xReturned != pdPASS)
    {
        perror("Error in taskCreate for LED task : ");
        exit(FAILURE);
    }

Also Is there something I need to do with the following def:

  • CONFIG_FREERTOS_UNICORE

You probably mean enabled, right?

Yes, that is perfectly okay.

If you want this task to only run on core 0 and not on core 1, you probably want to use xTaskCreatePinnedToCore here as well.

You probably mean enabled, right?

No I used xTaskCreatePinnedToCore with the SMP disabled and my application was able to run without getting stuck. Do we actually need to enable SMP in order to achieve multicore processing ?

I guess SMP is enabled by default in ESP, so you are good.

@aggarg One major doubt I have is this. I have not used vTaskStartScheduler() function anywhere in my application. Yet my tasks seem to be functioning fine. Is this something that’s normal ? Does the scheduler get started autonomously ?

I think this is done somewhere by the ESP SDK (you are using ?).
See e.g. Application Startup Flow - ESP32 - — ESP-IDF Programming Guide v5.2.1 documentation

Ok @hs2 I’ll look for it. BTW, I’m using ESP IDF 5.1.2.