<In addition, the bigger problem is actually rpmsg_pru30 issue. That literally 
<prevents me from running any rpmsg functions. As Dennis mentioned, this <might 
be a device tree problem? I need to spend some time on this. 
Which Linux are you using on ARM when you see this error ?
 I also sent another earlier reply trying  explain this was likely to happen if 
you are not running the SDK linux on ARM.
Can you confirm what you are running on ARM please?
Mark


Sent from Yahoo Mail on Android 
 
  On Sat, May 1, 2021 at 1:06 AM, 'Mark Lazarewicz' via 
BeagleBoard<beagleboard@googlegroups.com> wrote:   Hi Cheng
The tarball has step by step instructions for that example you mentioned in 
initial post.you need that when starting out.
Why?   because few in this group use SDK. Unfortunately you have no choice to 
ask questions here.

When code doesn't work on ARM you will get advise to use cookbook and Debian or 
even worse use libpruio😉😣 in this group then you will really be confused.

 You asked howto to run sdk examples  on Debian linux
Your problems are 
1) the instructions say use Ubuntu to install the SDK  and build PRU code and 
Linux Application code in the SDK ie it's built on a Ubuntu LTS PC a specific 
version of Ubuntu as well.
2) the ARM  example code you build to talk to PRU is designed for SDK Linux not 
Debian

#1 above may be possible to overcome . BUT instead 

you could just take the SDK ARM example binary and the PRU firmware binary if 
it exist in SDK binary directory and put them on the ARM. What's in SDK 
directories how the example works step by step are described in SDK pdf.( I 
sent a link  to tarball docs start there read how to install apSDK and host 
requirements )
#2Jeff built both sperm and PRU binary in his SDK and put them on Debian and 
said it  it worked on Debian
I don't know where Jeff  installed his SDK but I doubt he put it on the BBB I 
don't recommend that.
No body seems to understand my instructions in this group ive been told so if 
its not clear ask. Its all described in SDK 
Lastly I repeat 


Your going to be told don't use SDK use cookbook or libpruio🤔 and Debian on ARM 
if you try this SDK example and it doesn't work it's already started your 
having problems asking questions correct?



If you got an account on E2E
They would say why aren't you using SDK Linux we don't support Debian 
Understand?
You have nowhere to go you can't get in E2E
Understand?
I like the SDK myself  but I did see Cookbook has similar RPM Message  example 
and Marks documented that really well 
What happened there? Isn't there an RPMSG ADC example?
Anyway you would not have any problems if you ran SDK linux with the code 
example you have  and in theory it should work on Debian the differences are 
the SDK  linux vs the Yocto SDK Linux maybe muxing I don't know.


My am335x starter kit board i have at home  came with SDK linux running on the  
ARM  and my Beaglebone white I'm using with CCS has JTAG built in and has 
Ubuntu on the SD card I just pull it out.
That's why I understand what's happening. 
 I started out 5 years ago I tried Ubuntu on bone  white followed this group's 
instructions it was easy then I bought EVM and learned Yocto SDK Linux building 
at that time if I had questions answers were in the SDK off tutorial and E2E 
forum would support me. Their board their SDK.
Don't feel bad every month someone asks the same questions you did.
 they say "I found this PRU example in the  SDK can I run this on Debian?"
I say yes it will work what you are attempting.

but I can't help you when  Linux doesn't run your code and gets errors and when 
you ask for help in this group I expect you will be told use the Cookbook 
examples.
Do yourself a favor make a choice again I give you 3 choices 
1)  install sdk on Ubuntu box build code for ARM and PRU use SDK Linux on SD 
card to test this example code.
Or
2) use Debian and cookbook examples.
Or best solution in my opinion
3) do #1 first get it working  correctlybuy 2nd SD card put Debian on itthen 
try the binaries you build from #1 on Debian 


Everybody asks to mix both solutions your asking for trouble and wasted time 
trust me. 
Always Use the recommended linux host to build SDK or Debian and the SDK. 
To ignore instructions that describe host then ask for help is insane 
If you want grief use Fedora virtual machine on win 3 pc  to build Debian and 
ask in this group why it doesn't work. You will get silence or be sent in 100 
directions at once 😥🤣😄😀

Mark 





Sent from Yahoo Mail on Android 
 
  On Fri, Apr 30, 2021 at 8:10 PM, Cheng Chen<chenc2...@gmail.com> wrote:   Hey 
Dennis, 
Thanks for the reply. It makes a lot sense for cross-compiler. Thanks for the 
explanation. I am pretty sure I am running on 4.19.x-ti kernel. 
uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-19-TI-00A0.dtbo
I don't have any problem running other PRU examples. I also noticed that the 
original firmware is not running at first. But once it is loaded, it seems ok. 
I tried creating /dev/rpmsg by using "echo hello > /dev/rpmsg_pru30" before 
running example code. But it would leads to program freeze. I am also exploring 
direct memory access method to save acquired values in shared memory, but I 
haven't got any results yet. 
I think I will investigate into the device tree issue as you suggested. Thanks!
Regards,Cheng
在2021年4月30日星期五 UTC-4 下午8:45:57<Dennis Bieber> 写道:

On Fri, 30 Apr 2021 13:09:02 -0700 (PDT), in
gmane.comp.hardware.beagleboard.user Cheng Chen
<chenc2442-re5jqe...@public.gmane.org> wrote:


>My BBB wireless can compile pru code successfully because I installed 
>PRU_CGT compiler. But it is unable to compile ARM code. I think that is 
>because ARM_CCT cross-compiler toochain environment is missing, in another 
>word, I need to install processor-sdk-am335x
>
 The key is probably in the phrase "cross-compiler"... If you are
compiling ON the Beagle, you are using the "native" compiler, not a
cross-compiler ("cross" implies a toolchain that runs on a different
OS/architecture but which builds binary files meant for the target of the
toolchain -- but you are ON ARM, building FOR ARM).

>My first questions is can I install processor-sdk-am335x into Debian 
>system I currently have (Linux beaglebone 4.19.94-ti-r62 ) ? I am a little 
>confused about the relationship between this SDK and Debian system. Why is 
>the tutorial asking me to compile pru_adc_userspace.c in the Beaglebone. 
>I thought it is supposed to be executed in a cross-compilation environment.
>

 Cross compilation is used mostly for a couple of reasons: either the
target system does not support a native compiler (you aren't going to run a
compiler on something like a Tiva C board, or an Arduino Due [both of which
run ARM M-series processors] -- though the native compiler on a
Beagle/Debian might be able to build files that can be downloaded to such
boards); the target board is not yet built -- in which case one is likely
going to be "running" the code using something like QEMU or other software
emulation of the hardware system; the target board has a compiler, but the
speed of the cross-compiler environment is much faster (consider a
hyper-threaded 64-bit processor -- which is seen as 8-cores by the OS, each
running at 2.5-3.5GHz, with 12GB of RAM, vs a single 32-bit core running at
1GB with less than 1GB of RAM).

>I ended up installing processor-sdk-am335x on my linux desktop and compiled 
>successfully. Then I copied the generated file back to BBB wireless. But 
>when I tried to run the program, it shows the following error. 
>
>Reading voltage at ADC Channel: 5
>/dev/rpmsg_pru30 could not be opened.
>Trying to initialize PRU using sysfs interface.
>ERROR: Could not open /dev/rpmsg_pru30
>

 This is a different matter, and likely means the device tree
configuration is not set correctly -- over the last few years there have
been two INCOMPATIBLE means of accessing the PRU. RemoteProc/RPMsg is the
newer system, pru_uio is older -- current images for the Beagle load
RemoteProc -- check /boot/uEnv.txt to see what version your system is
loading...

###PRUSS OPTIONS
###pru_rproc (4.14.x-ti kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo
###pru_rproc (4.19.x-ti kernel)
uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-19-TI-00A0.dtbo
###pru_uio (4.14.x-ti, 4.19.x-ti & mainline/bone kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo
###

... however, I don't seem to have any /dev/rpmsg* entries either.

 I'm sure this have been brought up in this forum a few times in the
last year or so, but I don't recall the solution (if any). I did find that
the default firmware was not "running"... But starting it didn't add the
/dev/rpmsg*

debian@beaglebone:~$ cat /sys/class/remoteproc/remoteproc1/*
cat: /sys/class/remoteproc/remoteproc1/device: Is a directory
am335x-pru0-fw
4a334000.pru
cat: /sys/class/remoteproc/remoteproc1/power: Is a directory
offline <*****************************************
cat: /sys/class/remoteproc/remoteproc1/subsystem: Is a directory
DEVTYPE=remoteproc
debian@beaglebone:~$ echo 'start' > /sys/class/remoteproc/remoteproc1/state
debian@beaglebone:~$ cat /sys/class/remoteproc/remoteproc1/*
cat: /sys/class/remoteproc/remoteproc1/device: Is a directory
am335x-pru0-fw
4a334000.pru
cat: /sys/class/remoteproc/remoteproc1/power: Is a directory
running <*********************************************
cat: /sys/class/remoteproc/remoteproc1/subsystem: Is a directory
DEVTYPE=remoteproc



-- 
Dennis L Bieber




-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/f662fea1-becb-48f7-b48e-d2edf573ee3bn%40googlegroups.com.
  


-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/1984345917.29923.1619849148916%40mail.yahoo.com.
  

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/85414661.1571510.1619882425568%40mail.yahoo.com.

Reply via email to