基于Keil C51的嵌入式软件外设虚拟化设计与实现

2023,31(4):205-212
申 臻, 宋雷军, 魏冬冬, 于清华, 刘 涛
上海航天电子技术研究所
摘要:目前航空航天控制领域嵌入式软件的测试面临两个问题:软件实际运行物理环境的使用受限;在实物环境中由于无法执行某些故障、边界测试用例,导致测试覆盖性、准确性得不到满足。为解决以上问题,对嵌入式软件的外部设备进行了研究,提出构建数字化测试平台替代实物环境的方案,设计并完成总线1553B、总线RS422、AD采集、I/O等外部设备的虚拟化。平台模拟嵌入式软件真实的运行环境,测试过程不受实物环境制约,测试激励的注入不受任何限制,保障了测试的充分性。最后,以某电源下位机测试过程仿真为例,搭建不依赖真实硬件环境的数字仿真平台,能够实现故障注入、边界测试等特殊测试用例的执行,验证了平台在嵌入式软件测试中的有效性。
关键词:1553B虚拟化;Keil;嵌入式软件;数字测试环境;目标码覆盖率

Design and Implementation of Embedded Software Peripheral Virtualization Based on Keil C51

Abstract:At present, the testing of embedded software in the aerospace control field faces two problems: the use of the physical environment for the actual operation of the software is limited; in the physical environment, certain faults and boundary test cases cannot be executed, resulting in insufficient test coverage and accuracy. Satisfy. In order to solve the above problems, the external equipment of embedded software was researched, and a plan to build a digital test platform to replace the physical environment was proposed, and the virtualization of external equipment such as bus 1553B, bus RS422, AD acquisition, I/O, etc. was designed and completed. The platform simulates the real operating environment of the embedded software, the test process is not restricted by the physical environment, and the injection of test incentives is not restricted in any way, ensuring the adequacy of the test. Finally, taking the test process simulation of the lower computer of a certain power supply as an example, a digital simulation platform that does not rely on the real hardware environment can be built, which can realize the execution of special test cases such as fault injection and boundary testing, which verifies the effectiveness of the platform in embedded software testing.
Key words:1553B virtualization; Keil; embedded software; digital test environment; target code coverage
收稿日期:2022-08-20
基金项目:
     下载PDF全文