Xpersona
E

Embedded ARM Development

CLAWHUB · Unverified

专业指导 ARM Cortex-M 和 RISC-V 嵌入式开发,聚焦 Rust embedded-hal 驱动、FreeRTOS 和异步框架应用。 Skill: Embedded ARM Development Owner: viewway Summary: 专业指导 ARM Cortex-M 和 RISC-V 嵌入式开发,聚焦 Rust embedded-hal 驱动、FreeRTOS 和异步框架应用。 Tags: latest:1.0.0 Version history: v1.0.0 | 2026-04-02T15:30:43.837Z | user Initial release: ARM Cortex-M, Rust embedded, FreeRTOS, peripheral drivers, low-power design Archive index: Archive v1.0.0: 3 files, 17646 bytes Files: skill-card.md (1830b), SKILL.md (37261b), _meta.json (131b)

62
Rank
84
Safety
1.0k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s172ahz3cp5bkx3k26ajgkdx4d84204a:embedded-arm
  1. Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-viewway-embedded-arm/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

32,902 characters of source documentation, loaded on request.

Extracted files

3 files captured from the source.

SKILL.md

# 嵌入式 ARM 全栈开发 (Embedded ARM)

ARM Cortex-M / RISC-V 嵌入式系统专业级开发指南,聚焦 Rust embedded + FreeRTOS 双栈。

---

## 1. MCU 架构

### 概述

ARM Cortex-M 系列是嵌入式主流架构,覆盖从低功耗传感器到高性能工业控制。RISC-V 正在部分领域替代。

### ARM Cortex-M 架构对比

| 特性 | M0/M0+ | M3 | M4 | M7 | M23 | M33 | M55 |
|------|--------|----|----|-----|------|------|------|
| **流水线** | 3级 | 3级 | 3级 | 6级(双发射) | 3级 | 3级 | 8级 |
| **FPU** | ✗ | ✗ | 单精度可选 | 双+单精度 | ✗ | 单精度可选 | 单+双精度 |
| **DSP** | ✗ | 部分SIMD | 可选 | ✗ | ✗ | 可选 | Helium MVE |
| **MPU** | 8区 | 8区 | 8区 | 16区 | ✗ | 可选 | 可选 |
| **TrustZone** | ✗ | ✗ | ✗ | ✗ | ✓ | ✓ | ✓ |
| **中断数** | 16-32 | 240 | 240 | 240 | 16-32 | 240 | 480 |
| **典型主频** | 48MHz | 72MHz | 180MHz | 480MHz+ | 48MHz | 100MHz | 400MHz |
| **DMIPS/MHz** | 0.84 | 1.25 | 1.25 | 2.14 | 0.83 | 1.5 | 3.3 |
| **能效(DMIPS/mW)** | ★★★★★ | ★★★ | ★★★ | ★★ | ★★★★★ | ★★★ | ★★ |
| **典型芯片** | STM32F0/G0, nRF51 | STM32F1 | STM32F4/L4, nRF52 | STM32H7, i.MX RT | STM32L0/G0 | STM32L5/U5, nRF53 | CORTEX-M55 |

### RISC-V (RV32IMAC) 对比

| 特性 | ARM Cortex-M | RISC-V RV32IMAC |
|------|-------------|-----------------|
| **指令集** | 固定16/32位 | 可扩展模块化 |
| **特权级** | Handler/Thread | M/S/U 三级 |
| **中断架构** | NVIC(向量+尾链) | CLIC/PLIC(平台定义) |
| **调试** | CoreSight(标准) | Debug Spec 1.0(JTAG) |
| **生态成熟度** | ★★★★★ | ★★★ |
| **授权成本** | 芯片厂商付费 | 开源免费 |
| **典型芯片** | STM32全系列 | CH32V, GD32VF103, ESP32-C3 |

### 中断架构 (NVIC)

```
中断优先级分组(ARMv7-M+):
  AIRCR[10:8] = PRIGROUP
  0b000 = 16个抢占优先级, 0个子优先级
  0b101 = 8个抢占优先级, 2个子优先级  (常用)
  0b111 = 4个抢占优先级, 4个子优先级

中断进入延迟:
  M3/M4: 12周期 (尾链优化至 6周期)
  M7:   12-16周期
  M0/M0+: 16周期

关键寄存器:
  NVIC_ISER  - 中断使能
  NVIC_ICER  - 中断清除使能
  NVIC_ISPR  - 中断挂起
  NVIC_IPR   - 优先级 (4bit/中断)
  SCB->AIRCR - 优先级分组
  SCB->SHCSR - 系统异常控制
```

### MPU 配置

```c
// STM32F4 MPU 配置示例: 保护 SRAM 区域
void MPU_Config(void) {
    MPU_Region_InitTypeDef MPU_InitStruct = {0};
    HAL_MPU_Disable();

    // 区域0: 保护堆栈 (不可执行, 只读数据区)
    MPU_InitStruct.Enable           = MPU_REGION_ENABLE;
    MPU_InitStruct.Number           = MPU_REGION_NUMBER0;
    MPU_InitStruct.BaseAddress      = 0x20000000;
    MPU_InitStruct.Size             = MPU_REGION_SIZE_256KB;
    MPU_InitStruct.SubRegionDisable = 0x00;
    MPU_InitStruct.TypeExtField     = MPU_TEX_LEVEL0;
    MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS;
    MPU_InitStruct.DisableExec      = MPU_INSTRUCTION_ACCESS_DISABLE;  // XN=1
    MPU_InitStruct.IsShareable      = MPU_ACCESS_SHAREABLE;
    MPU_InitStruct.IsCacheable      = MPU_ACCESS_CACHEABLE;
    MPU_InitStruct.IsBufferable     = MPU_ACCESS_BUFFERABLE;
    HAL_MPU_ConfigRegion(&MPU_InitStruct);

    HAL_MPU_Enable(MPU_PRIVILEGED_DEFAULT);
}
```

### 存储器映射 (Cortex-M 典型)

```
0xFFFFFFFF ──────────── System
0xE0100000 ──────────── Private Peripherals (NVIC, SysTick, SCB, MPU)
0xA0000000 ──────────── External Device
0x60000000 ──────────── External RAM
0x40000000 ──────────── Peripheral (APB/AHB 外设寄存器)
0x20000000 ──────────── SRAM
0x00000000 ──────────── Code (Flash/ROM, 别名到 0x08000000)
```

### 最佳实践

- **M0/M0+ 选型*

_meta.json

{
  "ownerId": "kn70d6aqacz2a4wn5hwgeqrzc582gggx",
  "slug": "embedded-arm",
  "version": "1.0.0",
  "publishedAt": 1775143843837
}

skill-card.md

## Description:

Provides Chinese-language guidance for ARM Cortex-M and RISC-V embedded development, including Rust embedded-hal drivers, FreeRTOS patterns, async frameworks, peripheral drivers, low-power design, debugging, and MCU selection references.

This skill is ready for commercial/non-commercial use.

## Publisher:

[viewway](https://clawhub.ai/user/viewway)

### License/Terms of Use:

MIT-0

## Use Case:

Developers and embedded engineers use this skill as a Chinese-language reference for planning and implementing ARM Cortex-M and RISC-V firmware, including Rust embedded setup, RTOS design, peripheral drivers, low-power behavior, debugging workflows, and MCU selection.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: Firmware, flashing, debugging, and memory-access examples may modify device flash or memory if adapted and run on hardware.

Mitigation: Treat code blocks as illustrative and review flash address bounds, alignment, page coverage, write verification, power-loss safety, and MPU permissions before execution.

## Reference(s):

- [Embedded ARM Development on ClawHub](https://clawhub.ai/viewway/skills/embedded-arm)

## Skill Output:

**Output Type(s):** [Guidance, Markdown, Code, Shell commands, Configuration]

**Output Format:** [Markdown with C, Rust, TOML, YAML, and shell code blocks]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Chinese-language reference content with hardware-specific examples]

## Skill Version(s):

1.0.0 (source: server release metadata)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to Embedded ARM Development and adjacent AI workflows.