王宇 谭砚磊 邹雄飞 胡哲昊


摘 要:针对汽车ECU的Bootloader开发问题,使用恩智浦(NXP)S32DS IDE工具进行相关的开发与实现。作为汽车电子程序中需要运行的第一段代码,Bootloader的开发问题是该行业开发人员所面临的首要问题。恩智浦所提供的S32DS IDE工具,具有图形化的配置界面。通过该IDE工具,并基于恩智浦的S32R274芯片来详细说明关于此芯片的Bootloader开发与配置过程。并设计了一个简单的实验,以验证Bootloader是否成功跳转到应用程序中,用以说明整个基于此芯片的Bootloader的开发与配置。
关键词:汽车ECU;Bootloader;S32R274;NXP;S32DS IDE
中图分类号:TP311.11 文献标识码:A 文章编号:2096-4706(2021)02-0041-04
Abstract:Aiming at the problem of Bootloader development of automotive ECU,NXP(NXP)S32DS IDE tool is used to develop and implement it. As the first code to run in automotive electronic program,the development of Bootloader is the most important problem for developers in this industry. S32DS IDE tool provided by NXP has a graphical configuration interface. Through this IDE tool,and based on S32R274 chip of NXP,the development and configuration process of Bootloader about this chip are explained in detail. And a simple experiment is designed to verify whether the Bootloader can jump to the application successfully,which is used to explain the development and configuration of the whole Bootloader based on this chip.
Keywords:automotive ECU;Bootloader;S32R274;NXP;S32DS IDE
0 引 言
Bootloader是微處理器ECU非易失性存储器中的一段程序加载代码,每次ECU复位后都会运行Bootloader[1,2]。它会检查是否有来自通信总线的远程加载请求,如果有则进入Bootloader模式,建立与程序下载端的应用程序,解析其地址和数据代码,运行NVM(None ValitaleMomory——非易失性存储器)驱动程序,将其编程到NVM中,并校验其完整性,从而完成应用程序更新。如果没有来自通信总线的远程程序加载请求,则直接跳转到应用程序复位入口函数,运行应用程序[3-5]。
恩智浦针对自己研制的芯片开发了相对应的IDE工具,通过IDE工具可以初步实现对Bootloader的图形化配置,大大缩短了芯片开发周期,提高开发人员的工作效率。本文基于IDE工具和S32R274芯片来说明一个完整的Bootloader配置过程。
1 总体配置方案
为保证Bootloader正常运行,还要保证Bootloader能够正常启动和加载应用程序,就需要将Bootloader程序和应用程序放在不同的内存分区。
恩智浦S32R274芯片分为三个内核,其中Z4核属于启动核,Bootloader程序也主要在此启动内核中运行;外两个内核Z7_1/2核属于DSP核,主要用于应用程序的运行。……