- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.