You are here

Print to terminal using Printf() | Cypress Semiconductor

Print to terminal using Printf()

Summary: 3 Replies, Latest post by bobgoar on 28 Aug 2016 11:11 AM PDT
Verified Answers: 1
Last post
Log in to post new comments.
parthiv.parikh_1801816's picture
User
3 posts

I am trying to print to the terminal using teh printf() function. I am able to print using UART_UartPutString() but the printf function doesnt work. I did include the file to assign _write() function of GCC.

​Kindly have a look at the attached project here and tell me where I am going wrong.

Thanks

Attachments: 
user_242978793's picture
User
1200 posts

Here is your program working with the correct code.  You can change the data to what you want. Also I removed the Debug file as it was not in the files when you sent them.

parthiv.parikh_1801816's picture
User
3 posts

Thanks a lot.

But why cant I use the printf() function in my codes. I am able to use it with other codes from 100 projects in 100 days.

user_242978793's picture
User
1200 posts

That example had a tinyprintf component that has been replaced in the latest PsoC Creator using stdio.h  and if you try to use this old component it will not work if you need the other functions that the stdio.h provides. You can try to use it but you must remove the stdio.h from the header part of the program.  You also need to add the tinyprintf component to your schematic.

You will notice the missing stdio.h in the old program I pen it in to show you where it would have been.

Log in to post new comments.