Problem with HAL_Delay function in freeRTOS

The issue is that FreeRTOS INTENTIONALLY disables interrupts before the scheduler is started in many of its functions (I think anything that needs a critical section).
Basically, you shouldn’t be doing anything that NEEDS delays before starting the scheduler, just create the basic structures you need for the application and then start the scheduler.

I find that STM Hal to be not that well designed in many pieces, so I do my best to avoid it where I can.