PRU Assumptions - True or False

I think mainline might work:

debian@beaglebone:~$ uname -r
5.13.0-rc3-bone2.2
debian@beaglebone:~$ dmesg | grep pru
[ 2.044506] remoteproc remoteproc1: 4a334000.pru is available
[ 2.045701] remoteproc remoteproc2: 4a338000.pru is available
debian@beaglebone:~$ ls /dev/remoteproc/pruss-core*
/dev/remoteproc/pruss-core0:
coredump device firmware name power recovery state subsystem uevent

/dev/remoteproc/pruss-core1:
coredump device firmware name power recovery state subsystem uevent

@Mark Yoder can you test? :wink:

Regards,

debian@beaglebone:/dev/remoteproc/pruss-core0$ echo "start" > state
[ 243.355728] remoteproc remoteproc1: powering up 4a334000.pru
[ 243.366533] remoteproc remoteproc1: Booting fw image
am335x-pru0-fw, size 32456
[ 243.374135] remoteproc remoteproc1: remote processor 4a334000.pru is now up

debian@beaglebone:/dev/remoteproc/pruss-core0$ echo "stop" > state
[ 296.981371] remoteproc remoteproc1: stopped remote processor 4a334000.pru

Regards,

I'd need to study much more to find out how a PRU passes an interrupt
to the ARM core, but a comment in
https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&ved=2ahUKEwiW0qzomO3wAhUSV80KHdPiBj8QFnoECAgQAA&url=https%3A%2F%2Fwww.ti.com%2Flit%2Fpdf%2Fsprace9&usg=AOvVaw1D0FgDrMcykHqZsXm5UPdq
(getting started guide from TI: SPRACE9A)
"""
The PRU_ICSSG adds a Task Manager, which can preempt currently running
code. The Task Manager allows firmware to meet timing requirements for high
priority tasks by interrupting lower priority tasks.
"""
reinforces that the non-enhanced PRUs on the BBB (PRU_ICSS vs PRU_ICSSG) do
not have preemptive interrupts.

  That document also implies that interrupts are viable, but have to be
defined in the resource tables of the firmware
"""
User applications can require communication between the PRUs and the Arm
core. Linux provides a method for this communication called RemoteProc
Messaging (RPMsg). RPMsg fits into the RemoteProc framework. TI provides a
RPMsg library and getting started examples to demonstrate how to use RPMsg.
These examples showcase the PRU firmware using its resource table to
request specific interrupt mappings and shared memory to implement the
communication channel.
"""

  Strangely, section 3.6.2.2 of
http://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/Overview.html
describes TI's PRU as Ethernet port mode, supposedly using RProc/RPMsg. But
when you get to the Linux side (section 3.6.4.1) they are suddenly back to
using UIO.

https://elinux.org/PRUSSv2_Interrupt_Controller (linking to
https://elinux.org/PRUSSv2_Interrupts ) indicates that PRU interrupt #60 is
the one that "sets" when a message has been left in the PRU0 mailbox.

SPRUHF8A (am335x Pru Reference) has
"""
6.1 Introduction
The PRU-ICSS interrupt controller (INTC) is an interface between interrupts
coming from different parts of the system (referred to as system events)
and the PRU-ICSS interrupt interface.

The PRU-ICSS INTC has the following features:
  • Capturing up to 64 System Events
  • Supports up to 10 interrupt channels.
  • Generation of 10 Host Interrupts
    – 2 Host Interrupts for the PRUs.
    – 8 Host Interrupts exported from the PRU-ICSS for signaling the
ARM interrupt controllers.
  • Each system event can be enabled and disabled.
  • Each host event can be enabled and disabled.
  • Hardware prioritization of events.
"""
  • Host Interrupt 0 is connected to bit 30 in register 31 of PRU0 and
PRU1.
  • Host Interrupt 1 is connected to bit 31 in register 31 for PRU0 and
PRU1.
  • Host Interrupts 2 through 9 exported from PRU-ICSS for signaling ARM
interrupt controllers or other machines like EDMA.
"""

  Unfortunately, I've never found any documents for either RPMsg or UIO
APIs... Or, at least, not something I'd consider API documentation (I was
spoiled decades ago by the documentation for VAX/VMS, which filled two
shelves of a bookcase with 3" 3-ring binders).

YES. 5.x kernels only support UIO. You need a 4.x TI kernel for RemoteProc.

  Ouch -- a reversion...

I think the mainline kernels don't have the RemoteProc kernel code. At least
by default.

  Going to impact the day when Beagle images get Debian 11 I suspect --
since I think Debian 11 is a 5.x kernel.

Hello

I’ve failed to build following those instructions twice in Mainline and twice using the TI BSP.version. the 2nd attempt of TI BSP is hung as we speak after resolving dependencies for several hours. Each attempt takes hours and the build_kernel script doesnt care you already cloned 2G of code it clones torvald.git
so I retried 4 times by running build_kernel.sh twice in both directories

The Mainline had some git branch errors today

I paid to upgrade my internet for this testing and was ready to buy a 64 bit box but am scared these instructions need a refresh and I will waste $$

what would be lovely is a 2 line like is in the instruction pasted below with something that will work for sure.
the two directories I created are both on wrong branches and dont complete a buil d

Be nice not keep downloading the 2G kernel source I know there is a rebuild.sh but I am assuming that is used after a successful build
If these instruction need I tweek I can understand I can test them. If it old and not supported a heads up would be appreciated. So I need something like this below with everything needed to build a kernel including the previous two steps as my two directories are on the wrong branches

Thanks

For TI v5.4.x: Real-Time

#~/ti-linux-kernel-dev/
git checkout origin/ti-linux-rt-5.4.y -b tmp

Build:

```

```

Build:

```bash
#user@localhost:~/ti-linux-kernel-dev$
./build_kernel.s
```

Build:

```bash
#user@localhost:~/ti-linux-kernel-dev$
./build_kernel.s
```

I decided to make another attempt a clean dir on Mainline 5.4 I was blocked. No password . That was not there before

I guess I will take a break

Linux Kernel

This script will build the kernel, modules, device tree binaries and copy them to the deploy directory.

Mainline

[

Debian: Getting Started with the BeagleBone Black

This is a page about TI’s Cortex-A8 based; BeagleBone Black. Availability Boards: BeagleBone Black at Digi-K…

](Debian: Getting Started with the BeagleBone Black - Linux Guides - Electronic Component and Engineering Solution Forum - TechForum │ Digi-Key)

Download:

#~/
git clone https://github.com/RobertCNelson/bb-kernel
cd bb-kernel/

Hello

I’ve failed to build following those instructions twice in Mainline and twice using the TI BSP.version. the 2nd attempt of TI BSP is hung as we speak after resolving dependencies for several hours. Each attempt takes hours and the build_kernel script doesnt care you already cloned 2G of code it clones torvald.git
so I retried 4 times by running build_kernel.sh twice in both directories

The Mainline had some git branch errors today

I paid to upgrade my internet for this testing and was ready to buy a 64 bit box but am scared these instructions need a refresh and I will waste $$

what would be lovely is a 2 line like is in the instruction pasted below with something that will work for sure.
the two directories I created are both on wrong branches and dont complete a buil d

Be nice not keep downloading the 2G kernel source I know there is a rebuild.sh but I am assuming that is used after a successful build
If these instruction need I tweek I can understand I can test them. If it old and not supported a heads up would be appreciated. So I need something like this below with everything needed to build a kernel including the previous two steps as my two directories are on the wrong branches

Thanks

For TI v5.4.x: Real-Time

#~/ti-linux-kernel-dev/
git checkout origin/ti-linux-rt-5.4.y -b tmp

Build:


``

Build:

#user@localhost:~/ti-linux-kernel-dev$
./build_kernel.s

``

Build:

#user@localhost:~/ti-linux-kernel-dev$
./build_kernel.s

Build:

#user@localhost:~/ti-linux-kernel-dev$
./build_kernel.sh

Thanks!!

Think of it as I’m validating the instructions I think having these is something good. Unfortunately my VM blew up just now.

I KNOW your adamant about not supporting VM.

So I’ll build a dedicated Debian 8 dev box.

Any hints tips lessons learned what you use be appreciated.

Have a great long weekend.

VM’s usually fail when using ‘dd’… so MLO/u-boot.img is usually the
failure point…

I think mainline might work:

debian@beaglebone:~$ uname -r
5.13.0-rc3-bone2.2
debian@beaglebone:~$ dmesg | grep pru
[ 2.044506] remoteproc remoteproc1: 4a334000.pru is available
[ 2.045701] remoteproc remoteproc2: 4a338000.pru is available
debian@beaglebone:~$ ls /dev/remoteproc/pruss-core*
/dev/remoteproc/pruss-core0:
coredump device firmware name power recovery state subsystem uevent

/dev/remoteproc/pruss-core1:
coredump device firmware name power recovery state subsystem uevent

@Mark Yoder can you test? :wink:

debian@beaglebone:/dev/remoteproc/pruss-core0$ echo “start” > state
[ 243.355728] remoteproc remoteproc1: powering up 4a334000.pru
[ 243.366533] remoteproc remoteproc1: Booting fw image
am335x-pru0-fw, size 32456
[ 243.374135] remoteproc remoteproc1: remote processor 4a334000.pru is now up

debian@beaglebone:/dev/remoteproc/pruss-core0$ echo “stop” > state
[ 296.981371] remoteproc remoteproc1: stopped remote processor 4a334000.pru

Regards,

Be nice not keep downloading the 2G kernel source I know there is a rebuild.sh but I am assuming that is used after a successful build
If these instruction need I tweek I can understand I can test them. If it old and not supported a heads up would be appreciated. So I need something like this below with everything needed to build a kernel including the previous two steps as my two directories are on the wrong branches

There is a variable in system.sh to set this up, most users use it
once and done..

```
###OPTIONAL: LINUX_GIT: specify location of locally cloned git tree.

Hi lazarman,
on ubuntu 20.04, this builds ok

git clone https://github.com/RobertCNelson/ti-linux-kernel-dev.git
cd ti-linux-kernel-dev
git checkout remotes/origin/ti-linux-rt-5.4.y -b ti-linux-rt-5.4.y
./build_kernel.sh

I’ve used VirtualBox before with Ubuntu 16/18/20 without any issues, what VM are you using?
Several years ago a company that I worked for used some other VM, it was a pain in the azz to get to work, if i hear the name again i’ll know if that was the one.
I haven’t used Debian for a desktop, so I can’t help you with that.

Hello AMF

I have 5 year old quad core win 8.1 64 bit 8 G ram laptop running Ubuntu 16.04 VM I used it to build SDK kernel no problemsand

a new Debian 10 VM with a 64 bit GCC on same machine.
The Debian VM is flaky last attempt I just got memory calloc error on building 5.5 TI BSP from the instructions on Digikey.

I have a 10 year old win 7 quad core desktop I think it has 8 gig ram I never used I was contemplating either a dual boot or nuke win 7 a native Linux build box. Problem is it’s probably 32 bit.

Which compiler are you using? 32 bit or 64 bit and a link to it would be great
and
Is this 5.x or 5.x

I have several BBW, an am335x SK and two BBB for hardware. I’m also a JTAG user so I’d prefer nothing in EMC I don’t know if that’s possible?

I also probably need SD preparation instructions to go with kernel.

You know something like Robert has and the SDK has that even a college student can follow

Thanks alot!!

Mark