CCS Project For C66x/C71x Preloaded Firmware

I’m investigating the DSP processors on the AI-64, and I see that they are up and running on the Debian Linux distribution that comes with the board. For example, looking at “/sys/class/remoteproc/remoteproc12/state” it says “running”. The firmware is “vision_apps_eaik/vx_app_rtos_linux_c6x_1.out”.

In the “/lib/firmware” directory I can see j7-c66_0-fw.tisdk, j7-c66_1-fw.tisdk, and j7-c71_0-fw.tisdk. Also there is a vision_apps_eaik folder under firmware, with a number of “.out” files such as vx_app_rtos_linux_c6x_1.out, etc.

Looking at dmesg, I see the following:
[ 12.956528] k3-dsp-rproc 4d80800000.dsp: configured DSP for remoteproc mode
[ 12.986321] k3-dsp-rproc 4d80800000.dsp: local reset is deasserted for device
[ 13.030984] k3-dsp-rproc 4d81800000.dsp: assigned reserved memory node vision-apps-c66-dma-memory@a8000000
[ 13.044335] k3-dsp-rproc 4d81800000.dsp: configured DSP for remoteproc mode
[ 13.068549] k3-dsp-rproc 4d81800000.dsp: local reset is deasserted for device
[ 13.092159] remoteproc remoteproc12: powering up 4d80800000.dsp
[ 13.098137] remoteproc remoteproc12: Booting fw image vision_apps_eaik/vx_app_rtos_linux_c6x_1.out, size 1461044
[ 13.110395] k3-dsp-rproc 4d80800000.dsp: booting DSP core using boot addr = 0xa8d9a000
[ 13.126120] remoteproc12#vdev0buffer: assigned reserved memory node vision-apps-c66-dma-memory@a9000000
[ 13.148052] remoteproc12#vdev0buffer: registered virtio0 (type 7)
[ 13.154691] remoteproc remoteproc12: remote processor 4d80800000.dsp is now up


How was this built? Is there a CCS project I can clone or download to examine this code? Alternatively, is there a tutorial or code example to demonstrate some basic functionality in the C6x DSP?

I found a similar application for the EVM board, but I can’t find any way to build the EAIK firmware.

There is a “PRU Basics” posting which is very helpful for getting a simple GPIO example running on a PRU, it would be nice if there was something – anything – for the DSPs.

The TI page for Vision Apps is located here:

This is not a Hello World example, but I’m hoping to learn enough about creating a useful DSP application to get started on my own project.

If anybody could point me to a more friendly tutorial (using CCS preferably) that would be very helpful. In any case, I will document what I learn in this thread.

Hi, you can try the examples also in the TI RTOS SDK ti-processor-sdk-rtos-j721e-evm-08_04_00_06/pdk_jacinto_08_04_00_21/packages/ti/drv/ipc/examples/linux/ipc_echo_test.c but you need to change the device tree for the reserved memory to match the linker settings. This example is more helloworld and implements a basic ping pong application.

1 Like

Also you can then use e.g to control from Linux userspace.

1 Like

Hello, Thank you for this timely information. Would you know if this example will also run baremetal on the R5F?

Hi, you are right, my example above if using Freertos. In general the IPC examples can compiled for any of the accelerators. I used it also on the R5F.

That said, there is also a example for baremetal ti-processor-sdk-rtos-j721e-evm-08_04_00_06/pdk_jacinto_08_04_00_21/packages/ti/drv/ipc/examples/baremetal/ipc_baremetal_echo_test.c but I have not tried that.

One thing to note: When you run the example in parallel on several accelerator, it is doing a ping pong between all of them. Especially when you run Linux on the Cortex-A cores the sample kernel driver is also playing ping pong which sometimes is not so good during development :-). You probably can remove the sample driver doing this by recompiling the kernel.

Yes, I too had success with the FreeRTOS version running on R5SS0_CORE0. I will try to get the baremetal version working. If I get stuck, I will create a new thread and ask the group for help :slight_smile:

EDIT FYI: For baremetal R5F to Linux, the example is: ipc_echo_baremetal_test.