How danmilea/open-amp works
Project Type and Purpose
• This is a C-language middleware library (OpenAMP) plus demonstration applications for Asymmetric Multiprocessing (AMP) systems.
• Purpose: provide a hardware-agnostic framework for remote processor lifecycle management and inter-processor communication (IPC) via virtio/rpmsg stacks, compatible with both baremetal and Linux hosts/remotes.
File Structure Analysis
• Top level:
• lib/ – core library code subdivided into virtio/, rpmsg/, remoteproc/, proxy/, plus service and utils.
• apps/ (mentioned in README) – sample/demo applications.
• cmake/ and CMakeLists.txt – build system and platform toolchain support.
• doc/ – design docs and graph sources.
• scripts/ – contributor tooling (checkpatch, linter).
• .github/ – CI workflows and GitHub Actions.
• Key patterns:
• Layered architecture (hardware abstraction, core IPC layers, application layer).
• Plugin points via libmetal for system/memory/irq primitives.
• CMake options control inclusion of proxy, virtio driver/device, apps, static/shared builds.
README Insights
• Confirms layered structure: libmetal (system layer) beneath OpenAMP core.
• Core APIs: remoteproc (manage remote contexts), virtio (vdev/vdrv), rpmsg (message queues), proxy (file-API forwarding).
• Supported configurations: Linux↔baremetal, baremetal↔Linux, Linux userspace↔Linux userspace.
• Build flow: CMake toolchains for cross-compilation, options to toggle components.