This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

有关DSP多核串口打印乱码问题



在C6657多核运行,串口打印乱码,程序通过PCIE加载到DDR3,多核启动思路参考pcieboot_helloc.c:代码和现象如下

代码如下:

Int main()
{
// DEVICE_REG32_W(BOOT_MAGIC_ADDR(0), BOOT_MAGIC_NUMBER);
#if 1
int nthreads, tid;
#pragma omp parallel
{
platform_write("[C66xx_%d] Hello World from thread = %d\n",DNUM,omp_get_thread_num());
}
/* Fork a team of threads giving them their own copies of variables */
#pragma omp parallel private(nthreads, tid)
{

/* Obtain thread number */
tid = omp_get_thread_num();
platform_write("[C66xx_%d] Hello World from thread = %d\n",DNUM, tid);

/* Only master thread does this */
if (tid == 0)
{
nthreads = omp_get_num_threads();
platform_write("[C66xx_%d] Number of threads = %d\n", DNUM,nthreads);
}

} /* All threads join master thread and disband */
#endif

platform_write("[C66xx_%d] BIOS_start\n",DNUM);

BIOS_start(); /* does not return */
return(0);
}

现象如下:

o[CC666xx6_x0x]_ Hello1 ]W orld froHm threaedl l=o 0W
rld from thread = 1
[CC666xx_06]x Hello Worxld f_r1o]m Htehlrleoa dW o=r l0d
tf[C66xxr_o0m] tNhurmebaedr =o f1
hreads = 2
[C66xx_0] BIOS_start

    这并行指令core0和core1通过串口打印出来都重叠在一起,根本看不清,麻烦分析下是什么原因