# 嵌入式软件

**嵌入式软件**（Embedded software）是为控制特定设备或机器而编写的计算机软件，通常运行在较大机械或电气系统内部的专用微处理器或微控制器上，而不是在通用计算机上运行。标准机构将其视为为特定任务设计的软件，与在通用计算机上运行、执行计量或功能上通用工作的软件相对<sup>[1](https://www.nist.gov/system/files/documents/2017/05/09/Pub16-09-full-final.pdf)</sup>。在汽车质量管理中，控制乘用车、卡车、客车或摩托车所用部件的软件属于[IATF 16949](https://www.edgepedia.org/zh/iatf-16949)认证范围，而控制制造过程本身的软件则不属于<sup>[2](https://www.iatfglobaloversight.org/wp/wp-content/uploads/2021/04/IATF-16949-SIs-April-2021.pdf)</sup>。

| 关键事实 | 详情 |
|---|---|
| 定义属性 | 为专用硬件上的特定任务设计、而非在通用计算机上运行的软件<sup>[1](https://www.nist.gov/system/files/documents/2017/05/09/Pub16-09-full-final.pdf)</sup> |
| 早期里程碑 | 阿波罗制导计算机（Apollo Guidance Computer）由麻省理工学院仪器实验室（MIT Instrumentation Laboratory）设计、雷神公司（Raytheon）制造，使用磁芯绳存储器，其内容在制造后无法更改<sup>[3](https://www.nasa.gov/wp-content/uploads/static/history/computers/Ch2-5.html)</sup> |
| 首批微处理器 | 英特尔4004（Intel 4004）是一款为计算器设计的4位芯片，通常被认为是第一款微处理器；用于F-14飞行控制计算机的MP944芯片组由加勒特·艾研究公司（Garrett AiResearch）于1968年至1970年间开发<sup>[4](https://spectrum.ieee.org/the-surprising-story-of-the-first-microprocessors)</sup> |
| 主要架构 | 裸机、实时操作系统（RTOS）和嵌入式Linux，依据时序、并发、处理能力、成本和功耗要求选择<sup>[5](https://yusmpgroup.com/blog/embedded-software-development)</sup> |
| 领先的RTOS内核 | FreeRTOS支持40多种处理器架构；Zephyr是一个采用Apache 2.0许可证的小占用空间内核，支持ARM、RISC-V、x86、ARC及其他架构<sup>[6](https://www.freertos.freertos.org/)</sup><sup> • </sup><sup>[7](https://docs.zephyrproject.org/latest/introduction)</sup> |
| 汽车标准 | AUTOSAR经典平台（AUTOSAR Classic Platform）面向具有硬实时和安全约束的嵌入式系统，覆盖五个车辆域<sup>[8](https://www.autosar.org/standards)</sup> |
| 欧盟法规 | 《网络韧性法案》（Cyber Resilience Act），即欧盟第2024/2847号条例，于2024年12月10日生效，报告义务自2026年9月11日起适用，并于2027年12月11日全面适用<sup>[9](https://digital-strategy.ec.europa.eu/en/factpages/cyber-resilience-act-implementation)</sup> |
| 不合规处罚 | 最高1500万欧元或上一财年全球年营业额最高2.5%的罚款，以较高者为准<sup>[10](https://www.itpro.com/business/policy-and-legislation/cyber-resilience-act-three-things-businesses-need-to-know-as-new-rules-come-into-effect)</sup> |

## 历史

**阿波罗制导。** 阿波罗制导计算机是计算机作为较大组件内在组成部分的早期且有影响力的例子，在此例中该较大组件是制导系统<sup>[11](https://ntrs.nasa.gov/api/citations/19880069935/downloads/19880069935_Optimized.pdf)</sup>。其程序存储使用磁芯绳存储器，软件被编织进磁芯：六个模块，每个模块包含6144个16位字。这项技术能在更小空间内放入更多信息，但软件必须在预定任务数月前交付，以便制造和测试磁芯绳；而且一旦制造完成，每个密封模块都需要重新布线才能改动一个位。磁芯绳的特性迫使麻省理工学院的程序员必须第一次就把软件写对<sup>[3](https://www.nasa.gov/wp-content/uploads/static/history/computers/Ch2-5.html)</sup>。美国国家航空航天局（NASA）批准了75台计算机和138个显示与键盘单元，用于一个飞行航天器不到二十四艘的计划；其中57台计算机是后来的Block II设计<sup>[3](https://www.nasa.gov/wp-content/uploads/static/history/computers/Ch2-5.html)</sup>。载人任务的机载飞行软件开发由麻省理工学院仪器实验室的[玛格丽特·汉密尔顿](https://www.edgepedia.org/zh/margaret-hamilton-software-engineer)（Margaret Hamilton）领导；到1968年，她已是负责指令与服务舱团队的助理主任，后来于2016年获得[总统自由勋章](https://www.edgepedia.org/zh/presidential-medal-of-freedom)<sup>[12](https://apnews.com/article/277117af951ae33daa84c62658580322)</sup>。该计划中的一次飞行中事故展示了内置的软件恢复机制在应对未预料的错误状况时的价值，美国国家航空航天局表示，此后其载人航天软件中一直体现这一理念<sup>[13](https://www.nasa.gov/wp-content/uploads/static/history/computers/Ch2-6.html)</sup>。

**微处理器时代。** 微处理器出现后，嵌入式计算广泛传播。到20世纪60年代末，单个MOS集成电路可包含100个或更多逻辑门，F-14战斗机的飞行控制计算机使用了由加勒特·艾研究公司于1968年至1970年间开发的MP944 MOS-LSI芯片组。第一款微处理器的荣誉通常归于英特尔4004，这是一款为计算器设计的4位芯片；微处理器的一个关键特征是它在单芯片上提供可编程CPU，包括算术逻辑单元、控制功能以及程序计数器等寄存器<sup>[4](https://spectrum.ieee.org/the-surprising-story-of-the-first-microprocessors)</sup>。20世纪70年代，首批微处理器设计的发展——包括将处理器、ROM和RAM集成于单芯片的器件——促成了嵌入式系统在商业应用中的繁荣<sup>[14](https://weblibrary.mila.edu.my/upload/ebook/engineering/2014_Book_IntroductionToEmbeddedSystems.pdf)</sup>。

## 软件架构

嵌入式开发中的核心架构决策是：软件运行在裸机上、实时操作系统上，还是嵌入式Linux上。这一选择取决于设备需要多少时序控制、并发和处理能力，以及其成本和功耗预算<sup>[5](https://yusmpgroup.com/blog/embedded-software-development)</sup>。

**裸机。** 在裸机设计中，应用程序直接在硬件上运行，没有操作系统。在此基础上构建TCP/IP协议栈、USB主机驱动或图形合成器是一项重大的工程任务<sup>[15](https://vertechgroup.co.uk/insights/rtos-vs-embedded-linux-platform-choice-guide)</sup>。

**RTOS。** 实时操作系统增加一个调度器，通过允许开发者为每个执行线程分配优先级来提供确定性<sup>[16](https://freertos.org/Why-FreeRTOS/What-is-FreeRTOS)</sup>。FreeRTOS是面向微控制器和小型微处理器的实时内核，支持40多种处理器架构，内存占用小，支持对称多处理，并带有支持IPv6的线程安全TCP协议栈<sup>[6](https://www.freertos.freertos.org/)</sup>。Zephyr OS是面向资源受限系统的小占用空间内核，适用范围从环境传感器和LED可穿戴设备到嵌入式控制器、智能手表和物联网无线应用。它支持[ARM Cortex-M](https://www.edgepedia.org/zh/arm-cortex-m)、Cortex-A和Cortex-R、RISC-V、x86、ARC、MIPS、SPARC V8、Xtensa及其他架构，采用Apache 2.0许可证，并提供可配置调度（包括最早截止时间优先）、内存保护、原生网络协议栈和[低功耗蓝牙](https://www.edgepedia.org/zh/bluetooth-low-energy)5.0支持<sup>[7](https://docs.zephyrproject.org/latest/introduction)</sup>。POSIX API层已成为物联网和嵌入式应用中越来越流行的操作系统抽象层，出现在Zephyr、AWS FreeRTOS、TI-RTOS和NuttX中<sup>[17](https://docs.zephyrproject.org/latest/services/portability/posix/overview/index.html)</sup>。

**嵌入式Linux。** 嵌入式Linux或其他高级操作系统适合需要多进程、复杂网络、存储、图形、多媒体、远程管理或大型软件生态的产品<sup>[18](https://www.itechguides.com/making-embedded-processing-development-easy-part-2-do-you-need-an-operating-system/)</sup>。[Yocto项目](https://www.edgepedia.org/zh/yocto-project)（Yocto Project）是工业嵌入式Linux的常见构建基础<sup>[19](https://www.aestechno.com/en/industrial-embedded-software-guide/)</sup>。

## 行业标准

与安全相关的嵌入式领域通过行业标准来规范开发。在汽车软件中，AUTOSAR经典平台是具有硬实时和安全约束的嵌入式系统标准，为五个车辆域定义应用接口：车身与舒适、动力总成发动机、动力总成变速器、底盘控制、乘员与行人安全。经典平台与自适应平台共用的部分单独作为AUTOSAR基础（AUTOSAR Foundation）发布<sup>[8](https://www.autosar.org/standards)</sup>。[医疗器械](https://www.edgepedia.org/zh/medical-device)软件受行业标准规范，这些标准规定合规设备必须满足的要求，工业实践中包括[IEC 62304](https://www.edgepedia.org/zh/iec-62304)<sup>[20](https://arxiv.org/abs/2107.08185)</sup><sup> • </sup><sup>[19](https://www.aestechno.com/en/industrial-embedded-software-guide/)</sup>。

## 欧盟《网络韧性法案》下的监管

该法规于2024年12月10日生效，其报告义务于2026年9月11日开始适用，并于2027年12月11日全面适用<sup>[9](https://digital-strategy.ec.europa.eu/en/factpages/cyber-resilience-act-implementation)</sup>。合规与[CE标志](https://www.edgepedia.org/zh/ce-marking)挂钩，CE标志表明符合该法规的要求<sup>[22](https://www.consilium.europa.eu/en/press/press-releases/2024/10/10/cyber-resilience-act-council-adopts-new-law-on-security-requirements-for-digital-products/pdf/)</sup>。

**报告义务。** 制造商必须在24小时内向[欧盟网络安全局](https://www.edgepedia.org/zh/european-union-agency-for-cybersecurity)（European Union Agency for Cybersecurity，ENISA）通报任何正在被积极利用的漏洞，在72小时内提供完整报告，包括初步严重性评估和缓解措施，并在14天内（针对正在被积极利用的漏洞）或一个月内（针对严重安全事件）提交最终详细报告<sup>[10](https://www.itpro.com/business/policy-and-legislation/cyber-resilience-act-three-things-businesses-need-to-know-as-new-rules-come-into-effect)</sup>。

**对嵌入式团队的实际影响。** 嵌入到更广泛产品中的组件的开发者面临脱离上下文设计的问题：在尚不知道最终应用或最终用户环境之前，就要构建并保障某个元素的安全<sup>[10](https://www.itpro.com/business/policy-and-legislation/cyber-resilience-act-three-things-businesses-need-to-know-as-new-rules-come-into-effect)</sup>。

## 验证与可靠性

由于嵌入式内核是许多系统中最关乎安全与安保的关键组件，形式化验证在该领域已有很长历史。完全人工证明一个内核需要巨大工作量，seL4约需20万行证明，CertiKOS约需10万行，这使该技术超出大多数嵌入式开发组织的能力范围。直接从内核二进制可执行文件验证不存在运行时错误和不存在权限提升的自动化方法，已在某个工业实时内核上得到演示，且无需修改其代码<sup>[23](https://arxiv.org/abs/2011.15065)</sup>。

## References

1. [NIST Handbook 44, Appendix D: Definition of Electronic Devices, Software-Based](https://www.nist.gov/system/files/documents/2017/05/09/Pub16-09-full-final.pdf)
2. [IATF 16949 Sanctions and Interpretations, April 2021](https://www.iatfglobaloversight.org/wp/wp-content/uploads/2021/04/IATF-16949-SIs-April-2021.pdf)
3. [Computers on Board the Apollo Spacecraft, NASA history series, Ch. 2-5](https://www.nasa.gov/wp-content/uploads/static/history/computers/Ch2-5.html)
4. [The Surprising Story of the First Microprocessors, IEEE Spectrum](https://spectrum.ieee.org/the-surprising-story-of-the-first-microprocessors)
5. [Embedded Software Development: A 2026 Guide, YuSMP](https://yusmpgroup.com/blog/embedded-software-development)
6. [FreeRTOS: Real-time operating system for microcontrollers and small microprocessors](https://www.freertos.freertos.org/)
7. [Introduction, Zephyr Project Documentation](https://docs.zephyrproject.org/latest/introduction)
8. [Standards of AUTOSAR](https://www.autosar.org/standards)
9. [Cyber Resilience Act - Implementation, Shaping Europe's Digital Future, European Commission](https://digital-strategy.ec.europa.eu/en/factpages/cyber-resilience-act-implementation)
10. [Cyber Resilience Act: Three things businesses need to know as new rules come into effect, ITPro](https://www.itpro.com/business/policy-and-legislation/cyber-resilience-act-three-things-businesses-need-to-know-as-new-rules-come-into-effect)
11. [Computers on Board the Apollo Spacecraft, NASA Technical Reports Server](https://ntrs.nasa.gov/api/citations/19880069935/downloads/19880069935_Optimized.pdf)
12. [Margaret Hamilton, who led a software team for NASA's Apollo program, dies at 90, AP News](https://apnews.com/article/277117af951ae33daa84c62658580322)
13. [Computers on Board the Apollo Spacecraft, NASA history series, Ch. 2-6](https://www.nasa.gov/wp-content/uploads/static/history/computers/Ch2-6.html)
14. [Introduction to Embedded Systems, Chapter 1.1: History and Overview](https://weblibrary.mila.edu.my/upload/ebook/engineering/2014_Book_IntroductionToEmbeddedSystems.pdf)
15. [RTOS vs Embedded Linux: Which Should You Choose and When?, Vertech Group](https://vertechgroup.co.uk/insights/rtos-vs-embedded-linux-platform-choice-guide)
16. [What is FreeRTOS?, FreeRTOS documentation](https://freertos.org/Why-FreeRTOS/What-is-FreeRTOS)
17. [POSIX API overview, Zephyr Project Documentation](https://docs.zephyrproject.org/latest/services/portability/posix/overview/index.html)
18. [Making Embedded Processing Development Easy Part 2: Do You Need an Operating System?, iTechGuides](https://www.itechguides.com/making-embedded-processing-development-easy-part-2-do-you-need-an-operating-system/)
19. [Industrial embedded software: RTOS, Linux, certification, AES Techno](https://www.aestechno.com/en/industrial-embedded-software-guide/)
20. [Assessing Support for Industry Standards in Reference Medical Software Architectures, arXiv](https://arxiv.org/abs/2107.08185)
21. [Preparing an AI-Augmented SIEM for the EU Cyber Resilience Act, arXiv](https://arxiv.org/abs/2610.07873)
22. [Cyber resilience act: Council adopts new law on security requirements for digital products, Council of the EU](https://www.consilium.europa.eu/en/press/press-releases/2024/10/10/cyber-resilience-act-council-adopts-new-law-on-security-requirements-for-digital-products/pdf/)
23. [No Crash, No Exploit: Automated Verification of Embedded Kernels, arXiv](https://arxiv.org/abs/2011.15065)

---
*Initially written Sep 17, 2026 · Reviewed: Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 软件与编程 › Software engineering and development process

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/embedded-software

English original: https://www.edgepedia.org/embedded-software
