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.

BEAGLEBK: Bare-metal programming with pru and gpio

Part Number: BEAGLEBK

Hello, I am new to bare metal programming but I'm hoping to create a bare metal application with FreeRTOS on the beaglebone black using both pru and gpio. I plan to cross compile from Debian 10. I have 2 question that I hope someone can help me with.

  1. Is the pru-cgt compiler(www.ti.com/.../PRU-CGT-2-1) a bare-metal/freestanding compiler? And can I use it from my host linux machine to cross compile for beaglebone as the target?
  2. I understand that pru-cgt can compile c/asm code written for the pru but can it also compile code written for the gpio on P8 and P9 headers? Ill be using the ti starter ware for AM335x to write code for the gpio and the pru support package to program the pru

Also i want to avoid JTAG related hardware, thank you.

  • Hello Franklin,

    Yes, the pru-cgt compiler generates bare-metal PRU code. Please reference our Hands-On Labs. You can also find sample C / asm code in the PRU Software Support Package (PSSP) under labs/Getting_Started_Labs. You can find more PRU information at the PRU ICSS wiki page.

    I am working on migrating the existing PRU wiki pages to another web location and finishing the documentation for the Getting Started Labs, but I do not have a date I can promise for when those tasks will be completed.

    The pru-cgt compiles code to run on the PRU core. You will need to use a different compiler to compile code to run on the AM335x ARM core. Note that you have options depending on what you want to do: ARM controls GPIO pins, PRU controls PRU GPI/GPO pins, or PRU controls GPIO pins (note that the lowest latency is for signals to travel from PRU --> PRU GPI/GPO if you are trying to bitbang a protocol or create a PWM waveform without using the PWM modules).

    Regards,

    Nick

  • Hello Nick, thanks for the reply. I have one more question. How would i load in the pru code (.out) into the BBB if the ARM core is being programmed bare metal? I heard of ways to load programs into ARM core with a sd card flashed with an image but is it also possible to do this simultaneously with pru and arm core when they are both bare metal?  

  • Hello Franklin,

    On AM335x I would expect the ARM core to get initialized first. Then software running on the ARM core would initialize the PRU. Please take a look at the pruss driver documented here.

    I am not an ARM RTOS/bare metal expert, so I am not sure whether that is an RTOS only driver or if it applies to both RTOS and bare metal. If it does not work for you I'll reassign the thread to another TI engineer to comment.

    Regards,

    Nick