Computer Engineering and Applications ›› 2022, Vol. 58 ›› Issue (4): 298-303.DOI: 10.3778/j.issn.1002-8331.2008-0384

• Engineering and Applications • Previous Articles     Next Articles

Design of Firmware Update System Based on RISC-V Processor

GUO Jun, YU Zhiguo, HONG Guangwei, GU Xiaofeng   

  1. Engineering Research Center of Internet of Things Technology Applications, Ministry of Education, Department of Electronic Engineering, Jiangnan University, Wuxi, Jiangsu 214122, China
  • Online:2022-02-15 Published:2022-02-15

基于RISC-V处理器的固件更新系统设计

郭俊,虞致国,洪广伟,顾晓峰   

  1. 江南大学 电子工程系 物联网技术应用教育部工程研究中心,江苏 无锡 214122

Abstract: In order to simplify the operating process of embedded developers to update the RISC-V processor firmware, an easy-to-operate, efficient and flexible firmware update system design method is proposed, including the BootROM boot design and the in-application programming(IAP) design. In the BootROM boot design, the boot parameter reconfiguration method can make the boot process compatible with multiple boot modes such as the SRAM boot and main memory boot. In the IAP design, the processor first receives the new firmware sent from the host computer through the universal asynchronous receiver/transmitter(UART) by using the Ymodem protocol, and then the off-chip Flash is reprogrammed through the serial peripheral interface(SPI) to complete the system firmware update. Meanwhile, a cyclic redundancy check(CRC) algorithm is designed to ensure the reliability of received new firmware. Finally, the system firmware update is successfully realized in multiple experiments performed on field programmable gate array(FPGA), thus the feasibility and stability of the design are verified.

Key words: RISC-V processor, BootROM design, in-application programming(IAP), Ymodem protocol, field programmable gate array(FPGA)

摘要: 为简化嵌入式开发人员更新RISC-V处理器固件的操作流程,提出了一种易操作、高效且稳定的固件更新系统设计方法,包括BootROM引导流程设计和在应用中编程(in-application programming,IAP)设计。在BootROM引导流程设计中,通过启动参数再配置的方法,可使此引导流程兼容多种启动模式,如SRAM启动、主内存启动。在IAP设计中,处理器先通过通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接收从上位机发送过来的新固件,该固件采用Ymodem协议发送,再通过串行外设接口(serial peripheral interface,SPI)进行片外Flash的重新烧写,以完成对系统固件的更新,同时,为保证接收新固件的可靠性,加入了循环冗余校验(cyclic redundancy check,CRC)算法。在现场可编程门阵列(field programmable gate array,FPGA)上对该系统进行了多次测试,均完成了对系统固件的更新,验证了该设计的可行性与稳定性。

关键词: RISC-V处理器, BootROM设计, 在应用中编程(IAP), Ymodem协议, 现场可编程门阵列(FPGA)