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.

MSP430 printf函数调用编译不通过 求助

Other Parts Discussed in Thread: CCSTUDIO

MSP430 printf函数调用编译不通过 越空间了,包含了头文件stdio.h, 请指教,谢谢

  • 建议您 先参考 http://processors.wiki.ti.com/index.php/Printf_support_for_MSP430_CCSTUDIO_compiler 设置下试试

  • putchar函数重写了吗?

    stdio.h中的printf函数是调用putchar函数向液晶设备输出字符。需要重写putchar函数向串口输出字符,然后printf函数才可以用。

    或者直接重写printf函数。

  • 按这个设置好 重写了

    int fputc(int _c, register FILE *_fp);
    int fputs(const char *_ptr, register FILE *_fp);

    这两个函数 还是编译不通过

    "./lnk.cmd", line 48: error #10099-D: program will not fit into available
        memory.  placement with alignment fails for section ".text" size 0x2b12 .
        Available memory ranges:
        FLASH        size: 0x1000       unused: 0xe56        max hole: 0xe56