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.

TMS320F28027: 程序中使用串口打印数据到串口助手,故不不可避免使用到printf函数,问题如下:

Part Number: TMS320F28027

因为要使用到printf故在程序中代码如下:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//------------------------------- printf--------------------------------------------------------------
//#################################################
//-----------------------------------------------
//Printf
//-----------------------------------------------
void open_uart_debug (void)
{
int status=0;
status = add_device("uart", _MSA, my_open, my_close, my_read, my_write, my_lseek, my_unlink, my_rename);
if (status == 0) {
freopen("uart:", "w", stdout); // open uart and redirect stdout to UART
setvbuf(stdout, NULL, _IONBF, 0); // disable buffering for stdout
}
}
int my_open(const char *path, unsigned flags, int fno)
{
//scia_fifo_init();
//scia_echoback_init();
path = path;
flags = flags;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

使用printf好像要占用.ico段,但程序需要使用大数组,故造成程序的空间不够,那么请问不使用printf的CCS编译器是怎么设置?

不使用printf函数的情况下,SCI能否往外打印数据?谢谢!