Hard Fault encountered after vTaskStartScheduler is invoked

OK, a few additional suggestions:

  • Be sure configASSERT() is defined, and be sure you have a vApplicationMallocFailedHook() installed to catch out-of-memory and/or heap configuration errors.

  • Check the priority of the SVC exception. See here.

  • Does your FreeRTOSConfig.h have these lines:

#define vPortSVCHandler     SVC_Handler
#define xPortPendSVHandler  PendSV_Handler
#define xPortSysTickHandler SysTick_Handler
  • If all of that fails, can you step through the code and isolate the statement that is causing the hard fault? Note that you will need to put a breakpoint at the beginning of the vPortSVCHandler() to step into that function.