This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PRU without LINUX

Other Parts Discussed in Thread: AM3359

Hi there,

trying to familiarize with the PRUs (BBB with AM3359), I have been looking around for code examples. But so far I only found examples that are based on LINUX.

That can be very useful, but what if you cannot use LINUX for some reason?
What are the single steps to build and debug for bare metal? Using Starterware for instance.

I understand that 2 projects are required: One for the PRU and one for A9.
The Cortex A9 somehow has to load the binary code to the PRU. (Is that the code that is generated using hexpru.exe as described in the readme file of compiler version 2?)
Some LINUX examples include a file pru.h with special functions for the PRU (initialization etc.). Is there something similar for NON-LINUX users?

I have come to a point where I can load a very simple PRU project and step through it (CCSv6). But that's it.

In previous threads I found that other people were looking for such an example code as well.
As some time has gone by since then I would like to ask the question again:
Does anybody know of such an example for programming the PRU and A9 without using LINUX?
Or can anybody provide some pointers to specific information regarding that?

All comments are welcome!

Thank you.

Martin

  • Hello Martin,

    I'm going to try to answer all of your questions, but I'm going to break your post down into sub-sections below.

    Martin H. said:
    That can be very useful, but what if you cannot use LINUX for some reason?
    What are the single steps to build and debug for bare metal? Using Starterware for instance.
    This is currently a gap in that we do not have a full-fledged Starterware driver available for loading the PRU. Bear in mind that the PRUSS memory and register sets are all memory-mapped to the ARM, so writing a loader is a possibility (granted that it's extra time and effort). Today we don't have this available.

    In case you did not already know there is a driver available in SYS/BIOS as part of the Industrial Development Kit, but I am not familiar with that package or the support model.

    Martin H. said:
    The Cortex A9 somehow has to load the binary code to the PRU. (Is that the code that is generated using hexpru.exe as described in the readme file of compiler version 2?)
    The Linux remoteproc driver actually loads a .out file. It uses an ELF parser to strip out all of the debug information and loads the requisite sections into memory as defined in the linker command file. In a StarterWare driver it would probably be easier to use a .hex file instead.

    Martin H. said:
    Some LINUX examples include a file pru.h with special functions for the PRU (initialization etc.). Is there something similar for NON-LINUX users?
    No; however, a header file generally doesn't necessarily contain OS-specific stuff or at least not too much that it's impossible to clean up. I am not sure if there is anything in the IDK package I previously mentioned.

    Martin H. said:
    Does anybody know of such an example for programming the PRU and A9 without using LINUX?
    I do not know if the community has created a non-Linux driver as of yet, but hopefully someone else can chime in here.

  • TimHarron. said:
    but hopefully someone else can chime in. 

    Yes, that would be great.

    Meanwhile I will have a look at the IDK.

    Thanks for your valuable response.

    Martin