2022-11-15 08:21 PM
I use SPC5Studio-5.8.1, and SPC574S MCU, but I can not found any printf funciton example in the serial example code. Would you help me?
2022-11-15 09:48 PM
If using GNU/GCC wouldn't the STDIO plumbing come out via _write() ?
Implement output to a UART you've initialized for this purpose.
2022-11-15 09:51 PM
Thank you for your answer. would you give me some more information.
where can I found the via _write() ?
2022-11-15 09:59 PM
Check or Google newlib/syscalls.c
2022-11-15 10:50 PM
Hi Tesla,
I don't found any useful information in search newlib/syscalls.c.
and I found that SPC5Studio can not found the file of "newlib/syscalls.c".
so do you have any other suggestion?
2022-11-17 07:48 AM
SPC5Studio provides a component called "Runtime I/O" which implements the low lever software to enable printf().
Add "Runtime I/O" component to your project, configure it (which seria port to use) and use printf().
2022-11-17 06:39 PM
Hi Giuseppe DI-GIORE,
Thank you for your reply. I don't know how to add "Runtime I/O" component to my project.
Would you give me a example? I searched "Runtime I/O" in serial enabled project , but found nothing.
2022-11-18 01:56 AM
Select a Platform Component (right click)
Then select Runtime I/O component
2022-11-19 12:02 AM
Hi Giuseppe DI-GIORE,
Thanks you for your reply. I can add this "Runtime I/O" component to my project.
Then I need to select Linflex1 to use like picture. I use SPC574S64E3, I want to use PIN81 and PIN 82 to output data, so what should I do next? I tried to right click on "SPC5 Runtime -component" then select "Generate SPC5 application", it will show an error. attached picture for your reference.
2022-12-12 12:45 AM
Configure the serial port using the Low/Level Driver component (selecting the pin you need) and the select the just configured serial port in the Runtime I/O component.