How to develop an R5F processor in BeagleY-AI

I am currently working on a project using the BeagleY-AI, and I am trying to develop firmware for the Cortex-R5F core on the AM67A. Specifically, I want to develop with FreeRTOS, but I am unsure of how to get started or which tools to use for this purpose.

I initially intended to use TI’s Code Composer Studio (CCS) as the development IDE, but I realized that it does not support the AM67A (J722S) platform, which has made development impossible so far.

Could you please provide guidance on how to proceed with firmware development on the Cortex-R5F, particularly with FreeRTOS, or suggest alternative tools or methods that would work for this platform?

It should be possible to use OpenOCD to load code on the R5 similar to as with BeagleBone AI-64.

See Minimal Cortex-R5 example on BBAI-64 - #11 by Nishanth_Menon

If you have any success or trouble, please let us know. If you want a working session, schedule via Calendly - Jason Kridner.

Let me add one other suggestion, which is to try Zephyr RTOS.

There are already some example R5 firmware images installed in the default image:

beagle@beagle:~$ ls /opt/ti-zephyr-firmware/j722s/main-r5f0_0/
install-micropython.sh  install-openamp.sh  zephyr_micropython.elf  zephyr_openamp_rsc_table.elf

These are Zephyr-built images, including a Micropython interpreter. You can try out the Micropython build by doing:

beagle@beagle:~$ sudo /opt/ti-zephyr-firmware/j722s/main-r5f0_0/install-micropython.sh 
'./zephyr_micropython.elf' -> '/usr/lib/firmware/j722s-main-r5f0_0-fw'
update-initramfs: Generating /boot/initrd.img-6.1.83-ti-arm64-r63
'/boot/initrd.img-6.1.83-ti-arm64-r63' -> '/boot/firmware/initrd.img'
beagle@beagle:~$ sudo shutdown -r now

waiting for reboot, then…

beagle@beagle:~$ tio /dev/ttyRPMSG0 
[14:10:56.572] tio v2.5
[14:10:56.573] Press ctrl-t q to quit
[14:10:56.573] Connected

>>> import time
>>> start = time.ticks_ms()
>>> delta = time.ticks_diff(time.ticks_ms(), start)
>>> delta
17662
>>> import machine
>>> import zephyr
>>> dir(machine)
['__name__', 'I2C', 'Pin', 'SPI', 'Signal', 'UART', 'idle', 'mem16', 'mem32', 'mem8', 'reset', 'reset_cause', 'soft_reset']
>>> dir(zephyr)
['__name__', 'current_tid', 'is_preempt_thread', 'thread_analyze']
1 Like