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.

tms28069 printf

void dbg_printf(const char *ftm, ...)
{
    static char sprint_buf[255] = {0};
    int n = 0,i = 0;

    va_list vlist;
    va_start(vlist, ftm);
    n = vsprintf(sprint_buf, ftm, vlist);
    va_end(vlist);
    for (i = 0; i < n ;i++) {
        while(SciaRegs.SCICTL2.bit.TXRDY == 0);
        SciaRegs.SCITXBUF = (int) sprint_buf[i];
    }

}

程序里 用这个映射 printf 打印函数, 打印整型  字符都很正常, 为什么打印浮点类型 系统就死了, 追到里面是 __TI_printfi 这个函数,  没法跟踪了,

请问是哪里的问题导致系统死了,  关键不知道 死在哪里,为什么死了

dbg_printf("%0.3f, %0.3f \r\n",(float)1.256, (float)3.256697);   这样系统死机

dbg_printf("%d, %d \r\n",(int)1.256, (int)3.256697);   这样系统正常

dbg_printf(“fasdfasdfasfasdf ”\r\n");   这样系统正常