Hello,
I am currently using a TMS320DM648, and CCS4. I read a couple of papers from TI which briefly touch on how to map printf to UART. One of the webpages is located here:
And mentions to do the following following:
ret_val = add_device("uart", _SSA, uart_open, uart_close, uart_read, uart_write, uart_lseek, uart_unlink, uart_rename); fid = fopen("uart","w"); freopen("uart:", "w", stdout); // redirect stdout to uart setvbuf(stdout, NULL, _IONBF, 0); // turn off buffering for stdout printf("Hello world!\r\n");
My questions are
1. How do I define "uart"? Is it supposed to be the name of the library which I need to add in the .tcf file? Do I need to make changes in the .tcf file?
2. How are the uart_open, uart_close, etc defined? Do the they need to be functions in the uart library? I planned on using a uart library which came with dvsdk 1.10.00.26..
3. I do not understand how is the printf is calling the uart write function...
4. Are there documents which clearly define how to do this? I was only able to find vague documents.
Any help is welcome.
Thanks.
Alin