multicore
Skill68 starsChanged 7 months agoApache-2.0View on GitHub
Developing for multicore systems in Zephyr RTOS. Covers Symmetric Multiprocessing (SMP), Asymmetric Multiprocessing (AMP) with OpenAMP/RPMsg, inter-processor communication (IPC) patterns, and Linkable Extensions (LLEXT). Trigger when designing for SoCs with multiple homogeneous or heterogeneous cores.
In this repository21 other files it gives its agents.
- zephyr-agent-skillsSkill
- board-bringupSkill
- build-systemSkill
- connectivity-bleSkill
- connectivity-ipSkill
- connectivity-usb-canSkill
- devicetreeSkill
- hardware-ioSkill
- industrialSkill
- iot-protocolsSkill
- kernel-basicsSkill
- kernel-servicesSkill
- native-simSkill
- power-performanceSkill
- security-updatesSkill
- specializedSkill
- storageSkill
- testing-debuggingSkill
- zephyr-foundationsSkill
- zephyr-indexSkill
- zephyr-moduleSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Run the Zephyr kernel and your threads across multiple identical cores.
- Distinctive: line 52
Linux Bridging: Use OpenAMP/RPMsg to bridge Zephyr real-time logic with a Linux application controller.
- Distinctive: line 54
Zero-Copy Transfers: Use shared memory regions for large data (video/audio) and only pass meta-data via IPC channels to minimize overhead.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Zephyr Multicore Development
Leverage multiple CPU cores to increase performance, isolate critical tasks, and integrate heterogeneous systems.
Core Workflows
1. SMP Configuration
Run the Zephyr kernel and your threads across multiple identical cores.
- Reference: smp_configuration.md
- Key Tools:
CONFIG_SMP,k_spinlock, Thread Affinity.
2. OpenAMP & RPMsg
Communicate between heterogeneous cores (e.g., A-series and M-series) using standard protocols.
- Reference: openamp_rpmsg.md
- Key Tools:
CONFIG_OPENAMP, message vrings, Resource Tables.
3. IPC Patterns
Implement efficient data exchange between cores using high-level services or low-level mailboxes.
- Reference: ipc_patterns.md
- Key Tools:
IPC Service, IPM drivers, Shared Memory.
4. LLEXT (Linkable Extensions)
Dynamically load and run binary modules at runtime without a full firmware update.
- Reference: llext_basics.md
- Key Tools:
CONFIG_LLEXT, dynamic ELF loading, Symbol Export.
5. Multi-domain SoCs (nRF5340)
Build separate application-core and network-core images in one Sysbuild invocation.
- Reference: multidomain_sysbuild.md
- Key Tools:
west build --sysbuild,CONFIG_NRF53_BOOT_NETWORK_CORE_ON_STARTUP, domains.
Quick Start (SMP prj.conf)
# Enable SMP for dual-core SoCs
CONFIG_SMP=y
CONFIG_MP_NUM_CPUS=2// Using spinlocks for cross-core sync
struct k_spinlock lock;
k_spinlock_key_t key = k_spin_lock(&lock);
// ... critical section ...
k_spin_unlock(&lock, key);Professional Patterns (Architecture Design)
- Linux Bridging: Use OpenAMP/RPMsg to bridge Zephyr real-time logic with a Linux application controller.
- Core Isolation: Pin high-frequency interrupts (e.g., motor control) to Core 1 and keep the main application on Core 0 to prevent jitter.
- Zero-Copy Transfers: Use shared memory regions for large data (video/audio) and only pass meta-data via IPC channels to minimize overhead.
Automation Tools
- smp_config_check.py: Validate SMP-related Kconfig consistency in
prj.conf.
Examples & Templates
- rpmsg_channel_contract.md: Starter channel contract for RPMsg endpoint design.
Validation Checklist
- SMP builds run with expected CPU count and no cross-core race regressions.
- OpenAMP/RPMsg endpoint exchange passes bidirectional message tests.
- IPC latency and throughput remain within target budget under load.
- LLEXT module load/unload path resolves symbols and handles failure cases safely.
- Multi-domain Sysbuild builds both core images and
west flashprograms each domain.
Resources
- References:
smp_configuration.md: Configuration and spinlocks.openamp_rpmsg.md: AMP and Linux interoperability.ipc_patterns.md: Mailboxes and high-level IPC services.llext_basics.md: Dynamic code loading.
- Scripts:
smp_config_check.py: SMP config consistency checker.
- Assets:
rpmsg_channel_contract.md: RPMsg interface contract template.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

