/* Change stack's location to DTCM. 
The function changes the stack's location from SRAM to DTCM  */
static void tcm_stackinit(void)
/* Change stack's location to DTCM. 
The function changes the stack's location from SRAM to DTCM  */
static void tcm_stackinit(void)
{
	uint32_t offset = (uint32_t)SRAM_STACK_LIMIT - (uint32_t)DTCM_STACK_LIMIT;
	volatile char *dst = (volatile char *)DTCM_STACK_LIMIT;
	volatile char *src = (volatile char *)SRAM_STACK_LIMIT;
	while(src > (volatile char *)SRAM_STACK_BASE){
		*--dst = *--src;
	}
	__set_MSP(__get_MSP() - offset);
}