Built_type = debug - unexpected behavior?

Yeah that solves the problem.

If I go to src/rtos/port.c and do

/* link directly to interrupt routines */
#define vPortSVCHandler sv_call_handler
#define xPortPendSVHandler pend_sv_handler

and further If I go to src/rtos/opencm3.c and comment out the functions

/*void sv_call_handler(void) {
	vPortSVCHandler();
}

void pend_sv_handler(void) {
	xPortPendSVHandler();
}*/

and re-upload, then everthing works nicely in debug mode ^-^.

The opencm3.c integration file is not safe against compiler optimizations, and it is extremely criticial that these functions are called directly (as it would do with compiler optimizations), and not via C function call.