After I port tencent OS to a board based on evkmimxrt1060. I can run ``evkmimxrt1060`` sdk with semc/sdram driver_example use default PRINTF function under linux with GNU tools.And I made the semc test code under a thread like:
``` C
/*!
* @brief Main function
*/
void sdram_task_entry(void *arg)
{
PRINTF("\r\n SEMC SDRAM Example Start! \r\n");
if (BOARD_InitSEMC() != kStatus_Success)
{
PRINTF("\r\n SEMC SDRAM Init Failed\r\n");
}
PRINTF("\r\n SEMC SDRAM Example Continue!\r\n");
/*
* 测试不同数据宽度的读写功能, 不支持 32 bit
* */
/* 32Bit data read and write. */
SEMC_SDRAMReadWrite32Bit();
/* 16Bit data read and write. */
SEMC_SDRAMReadWrite16Bit();
/* 8Bit data read and write. */
SEMC_SDRAMReadWrite8Bit();
PRINTF("\r\n SEMC SDRAM Example End.\r\n");
while (1)
{
PRINTF("sdram is running. pyocd is ok.\r\n");
tos_sleep_ms(1000);
}
}
```
But after I define macro with ``SDK_DEBUGCONSOLE=DEBUGCONSOLE_REDIRECT_TO_TOOLCHAIN`` and ``SDK_DEBUGCONSOLE_UART`` something surprising happened.
1. It will get stuck in the sdram test thread. After I use a led pin to debug, It stuck in this function ``BOARD_InitSEMC``. So after I comment these code like:
``` C
void sdram_task_entry(void *arg)
{
PRINTF("\r\n SEMC SDRAM Example Start! \r\n");
#if 0
if (BOARD_InitSEMC() != kStatus_Success)
{
PRINTF("\r\n SEMC SDRAM Init Failed\r\n");
}
#endif
PRINTF("\r\n SEMC SDRAM Example Continue!\r\n");
```
the code can run continue like:

2. if I do not comment function ``BOARD_InitSEMC``, but i modify sth like:
void sdram_task_entry(void *arg)
{
PRINTF("\r\n SEMC SDRAM Example Start! %d\r\n", 123);
if (BOARD_InitSEMC() != kStatus_Success)
{
PRINTF("\r\n SEMC SDRAM Init Failed\r\n");
}
PRINTF("\r\n SEMC SDRAM Example Continue!\r\n");
/*
* 测试不同数据宽度的读写功能, 不支持 32 bit
* */
/* 32Bit data read and write. */
SEMC_SDRAMReadWrite32Bit();
/* 16Bit data read and write. */
SEMC_SDRAMReadWrite16Bit();
/* 8Bit data read and write. */
SEMC_SDRAMReadWrite8Bit();
PRINTF("\r\n SEMC SDRAM Example End.\r\n");
while (1)
{
PRINTF("sdram is running. pyocd is ok.\r\n");
tos_sleep_ms(1000);
}
}
```
I till can run success just as:

how could this happen?