BeagleBoard/GSoC/2023 Proposal/PrashanthS

=GSoC Proposal for Zephyr on R5/M4F (K3) =

About Student: Prashanth S Mentors: NishanthMenon, Vaishnav Achath Code: https://github.com/slpp95prashanth/gsoc-application/tree/cc-task/ Wiki: http://elinux.org/BeagleBoard/GSoC/ProposalTemplate GSoC: GSoC entry

=Status= This project is currently just a proposal.

=Proposal= I have completed the Cross Compilation Task CC-Task

The goal of the project is to add Zephyr RTOS support to run on Cortex R5 processor cores loaded from A72 core running Linux through remoteproc and add few peripheral support (Interrupts, Gpio, UART, Timers) on TDA4VM SoC. The Cortex R5 processor cores are built to provide deeply embedded real-time and safety-critical systems. So adding Zephyr RTOS support for R5 core in TDA4VM will be very helpful for the users.

About you
Github: slpp95prashanth School: Bannari Amman Institute of Technology Country: India Primary language : English, Tamil Typical work hours : 9AM - 6PM Previous GSoC participation: I am learning embedded systems only through open source community, I like to contribute back to community and I believe GSoC gives me an opportunity to do so with Mentors and this is very helpful for a newbie to contribute to open source. I participated in GSoC 2022 and contributed to the RTEMS community developing the CAN framework and DCAN peripheral support for Beaglebone Black. GSoC 2022 Other Contributions: I developed a very minimal firmware which can be used as a learning tool kit (helped me a lot in understanding interrupt vectors, ARM modes, ethernet drivers ...). Beaglebone black

About your project
Project name: Zephyr on R5/M4F

Description
Current SoCs frequently feature heterogeneous remote processor units in asymmetric multiprocessing (AMP) setups, which may be running several Linux or other real-time OS instances. One such SoC is TDA4VM, with heterogeneous multicore support it can run different operating systems simultaneously. TDA4VM has Dual 64-bit Arm® Cortex®-A72 microprocessor subsystem at up to 2.0 GHz, Six Arm® Cortex®-R5F MCUs at up to 1.0 GHz, Two C66x floating point DSP, up to 1.35 GHz, 40 GFLOPS, 160 GOPS and 3D GPU PowerVR® Rogue 8XE GE8430, up to 750 MHz, 96 GFLOPS, 6 Gpix/sec.

Zephyr is a small real-time operating system for connected, resource-constrained and embedded devices supporting multiple architectures. Zephyr allows for easy handling of multiple configuration options, APIs and external components, and is well suited to structured application development. Another benefit of Zephyr is that it targets some very serious protocol and standard implementations, being e.g. the first open source RTOS to introduce TSN support – by way of Antmicro’s contribution. The rising popularity of TSN in automotive and aerospace applications, and just about everywhere else, could be a very important reason to start using Zephyr in your TSN-capable product.

The goal of the project is to add Zephyr RTOS support to run on Cortex R5 processor cores loaded from A72 core running Linux through remoteproc and add few peripheral support (Interrupts, Gpio, UART, Timers) for TDA4VM. The Cortex R5 processor core are built to provide deeply embedded real-time and safety-critical systems. So adding Zephyr RTOS support for R5 cores in TDA4VM will be very helpful for the product developers.

Programming Languages: Assembly Programming, C.

I got introduced to embedded linux through Beaglebone Black, which is helping me in understanding the basics. I like to take this opportunity to contribute to beagleboard. I also developed a very minimal firmware which can be used as a learning tool kit (helped me a lot in understanding interrupt vectors, ARM modes, ethernet drivers ...), which might be helpful for a beginner to get started. Beaglebone black

References:
 * https://www.ti.com/lit/ds/symlink/tda4vm.pdf
 * https://docs.kernel.org/staging/remoteproc.html


 * https://www.zephyrproject.org/zephyr-rtos-and-cortex-r5-on-zynq-ultrascale-2/
 * https://en.wikipedia.org/wiki/Zephyr_(operating_system)
 * https://developer.arm.com/Processors/Cortex-R5#:~:text=The%20Arm%20Cortex%2DR5%20processor,time%20and%20safety%2Dcritical%20systems.

Experience and approach
My personal Projects:
 * Developed a learning tool kit for Beaglebone Black to understand the minimum support required for a general system to boot and understand how to configure peripherals like GPIO, Ethernet, UART, Timers and Interrupt support Beaglebone black.
 * Developed a learning application to understand LwIP with shell (few commands) by porting it to work on linux userspace. LwIP application LwIP.
 * Developed a basic application to understand .wav audio files and amplify the audio data through software Amplify audio signal.

Contingency
I try to gather the docs required for the project, ask beagleboard community, Zephyr community (as the project is to add BSP support on Zephyr) and other open source communities.

Benefit
Adding BSP support for TDA4VM SoC in Zephyr,
 * I will be creating documents in parallel. I believe, this will be helpful for beginners to learn adding new BSP support for Multiprocessor environment.
 * Will help users to develop real time applications on Zephyr.

Quotes
"a decent Zephyr port on the R5 on BBAI-64 with good amount of examples and proper west integration around remoteproc would make the development flow for R5 cores much easier than it is now(+all the other benefits that Zephyr offers)" - Vaishnav M A "This will also directly tie into enabling openAMP on tda4vm" - Nishanth Menon

Pull Request Link
Cross Compilation Task PR #173.