TIVA Launchpad - Default_Handler triggered on vTaskStartScheduler()

A few notes:

  1. Sometimes it appears that a crash occurs when starting the scheduler, whereas in fact, because that function doesn’t return, the scheduler did start as expected and the crash happened in one of the tasks. Try setting up a system where you know which task is the first to run, then put a break at the top of that task to see if the break point is ever hit. The first task will always be the one that has the highest priority, but you need to take care that this is not unknowingly the timer service task. The priority of the timer service task is set by the configTIMER_TASK_PRIORITY setting in FreeRTOSConfig.h (assuming configUSE_TIMERS is 1, if configUSE_TIMERS is 0 then the timer service task is not created).

  2. vPortSVCHandler is the exception handler that executes in response to an SVC instruction, which is inside vPortStartFirstTask() function. Check this is installed as expected (it should be due to the #define in the config file as per your post) by setting a break point in it and ensure it runs. The function is implemented here: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/master/portable/CCS/ARM_CM4F/portasm.asm#L133

  3. As per our previous conversation, the default handler is installed for every interrupt that you do not explicit set a handler for yourself - in some cases that can include the hardfault handler, so the execution of the default handler might be due to a hard fault rather than an interrupt. To determine that make sure the hard fault exception has its own unique handler so you can see if you end up inside it.

  4. The code that enables you to debug a hard fault is provided in GCC syntax, you would have to translate that to the syntax required by the TI assembler. The easiest way to do that might be to add the code into the portasm.asm file linked in point (2) above so you can see the required syntax.