Release build crashes at in prvPortStartFirstTask

dnadler wrote on Thursday, July 25, 2019:

Apologies, crash may be in xPortStartScheduler, but it looks like it crashed on entering StartFirstTask.

Background:
STM32F429, STM32cubeIDE, FreeRTOS V10.0.1 as supplied by STM’s “Cube”.
Optimization -O1 (except trap handler for register visibility)
define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
Not using static allocation option.
systick timer for FreeRTOS, peripheral timer for Cube timing utilities.

Detail:
Debug builds and runs application AOK. Plenty of memory (FreeRTOS pool, newlib heap, stack).
Registers in fault handler:

Stack, code dissasembly:

Much obliged for any ideas where to look…
Thanks!
Best Regards, Dave

dnadler wrote on Thursday, July 25, 2019:

Sorry, solved, problem was wrong library specification.
Release newlib selected was Reduced C, Reduced C++ (should be Standard C, Reduced C++).
Application works with correct library selected.
Not sure why this causes a crash here though…
Aaarrrggg…