printf support when you program PRUs in beagle board AI

57 views
Skip to first unread message

sreeko...@gmail.com

unread,
Jul 20, 2020, 12:15:42 PM7/20/20
to BeagleBoard
Hi

I am just trying to print some values to check if the condition meets the requirement in beagle bone AI board. But it is not happening when I program PRUs.

Do I have to configure UART in PRU to achieve this capability?

please help me crack this, help would be appreciated,

thank you'
sreekanth m.

Dennis Lee Bieber

unread,
Jul 20, 2020, 2:53:10 PM7/20/20
to Beagleboard
On Mon, 20 Jul 2020 09:03:34 -0700 (PDT), in
gmane.comp.hardware.beagleboard.user
sreekodakkad-Re5J...@public.gmane.org wrote:

>Hi
>
>I am just trying to print some values to check if the condition meets the
>requirement in beagle bone AI board. But it is not happening when I program
>PRUs.
>

I'm actually surprised you don't get some link error if you are using
printf() in a (C/C++) PRU program. The PRUs are not using an OS, so there
wouldn't be anything like STDOUT for a program running in a PRU.

>Do I have to configure UART in PRU to achieve this capability?

BB Black example at
http://exploringbeaglebone.com/chapter15/#High-Speed_Analog_to_Digital_Conversion_ADC_using_the_PRU-ICSS
appears to have the PRU write the data to shared RAM, and a program running
in Linux reading the values for output. (NOTE: reference to "chapter 13"
applies to the first edition of the book -- it is chapter 15 in the 2nd)
(NOTE: Examples also seem to be using PRUSS driver, and not the newer
RemoteProc


https://processors.wiki.ti.com/index.php/PRU_Debugging#Place_.22printf.22_statements
Note that this also does not use printf() IN the PRU code, but rather in
whatever program was used to load/start the PRU, and it interfaces, again,
by monitoring shared memory into which the PRU has written.


--
Dennis L Bieber

sreekanth m

unread,
Jul 21, 2020, 9:39:34 AM7/21/20
to BeagleBoard
Hi Dennis,

Thanks for the reply. I forgot to mention that I get linker erros if i use printf() statements.


On Monday, 20 July 2020 14:53:10 UTC-4, Dennis Bieber wrote:
On Mon, 20 Jul 2020 09:03:34 -0700 (PDT), in
gmane.comp.hardware.beagleboard.user

Mark A. Yoder

unread,
Jul 21, 2020, 10:47:40 AM7/21/20
to BeagleBoard
The PRU Cookbook[1] has an example of using the UART and printf on the PRU[2].  Maybe it will help.

--Mark

Reply all
Reply to author
Forward
0 new messages