analogdevicesinc / sharc-reusable-components

A collection of embedded C code packaged into a library of reusable components and starter examples designed to facilitate customers’ easy deployment into demo or production systems using a SHARC DSP
Apache License 2.0
20 stars 4 forks source link

[Question] this vs bare metal SDK #3

Open pfeatherstone opened 6 months ago

pfeatherstone commented 6 months ago

What is the intended use of this repository vs the Bare Metal SDK? Are they sort of competing drivers or are they intended to be used for different things, hardware platforms, etc?

Cheers

ggeerling commented 6 months ago

the "reusable components" are an evolution/extension of the original Bare Metal SDK. we started with those same drivers but added support for OS support (FreeRTOS). and also added a lot of components with the intent of easy system integration to help create flexible systems and proof-of-concept projects. The "audio starter" projects are examples of this: they use the "reusable components" and add in the ability to have a command shell user interface, a2b support, usb audio class 2.0 for mulit-channel audio in and out, an efficient interprocessor communication system, an audio routing engine to make it easy to connect any audio source/sink to any other audio source/sink and a number of other features. for more info and some getting started, hopefully the wiki is helpful: https://wiki.analog.com/resources/tools-software/sharc-audio-module/advanced-audio-projects

pfeatherstone commented 6 months ago

Thank you very much. I'm running Yocto Linux on the ARM. Are some of these components suitable for the ARM ? Specifically I want to stream audio from one of the SHARCs controlling the ADAU1761 device to the ARM. I was going to use rpmsg-lite or icap as recommended by the documentation. Maybe that's not the recommended method anymore now that this repository provides the SAE module. But not sure if that module supports Linux, only bare-metal or FreeRTOS

pfeatherstone commented 6 months ago

Also, would you say Yocto Linux is still the recommended OS to install on the ARM or FreeRTOS ? Very sorry for the unrelated questions but it seems like there are several ways to program the board and different members of ADI advise different tools. Thank you very much. I appreciate it.

kfurge-egi commented 6 months ago

The choice of Linux or FreeRTOS depends on the application and performance requirements. Core-to-core audio under FreeRTOS is done using the SAE. Linux uses rpmsg/icap. Bringing the SAE to Linux has been discussed, but no plans currently exist to develop that solution.

If you don't need the full feature set of Linux, I recommend the FreeRTOS + SAE approach. It is very small, fast and efficient. Check out the related Audio Starter projects, especially the networking branch of the SAM Audio Starter, for an example of FreeRTOS on the ARM core with networking, command shell, USB audio, file system support, and more. This example was built from these reusable components and demonstrates how to integrate them into highly functional systems.

https://github.com/analogdevicesinc/sam-audio-starter/tree/Networking-2.0.0-Github

pfeatherstone commented 6 months ago

We've decided to use Linux for ease of building software. We need to build libraries which will be very difficult or impossible to port to FreeRTOS without investing a huge amount of software labour. So it looks like rpmsg/icap is the way to go. Thank you very much.

pfXnt commented 5 months ago

Is there a minimal example on how to read audio samples off the ADAU1761 ADC on one of the SHARCs assuming the ARM is running Linux? The examples are more like fully blown frameworks, whereas I need a bare minimal example that reads samples, or sets up SPORT which triggers a callback when a buffer is full. Looking at the ICAP example, it's sets everything up without Bare Metal SDK or Sharc-Reusable-Components. Is it necessary to use either of these frameworks if all you want is read audio from the ADC? Cheers