The invention provides a hex program file compiling and
rewriting method based on an Intel mode. The hex program file compiling and
rewriting method comprises the steps that firstly, a python script is used for adding, deleting, modifying and checking an ASW generated by a simulink model; 2, using a python script to complete file carrying work of the ASW, moving the file to a specified folder, and completing connection work with the BSW; step 3, designing an MFC
software interface, checking options of hex generated by each module, calling a python script through the MFC to execute a bat file, executing the bat file, calling a
makefile to compile and generate a hex program file required by each module; and 4, according to the Excel program variable table, the A2L file and the hex program file generated by compiling in the step 3, completing a
rewriting process of the hex program file, and generating the hex program file required by the vehicle-mounted controller. According to the method, the hex program file can be compiled within ten minutes, the rewriting process of the hex program file can be completed, a
computer program is used for replacing tedious adding, deleting, modifying and checking work in the process that
programming software and a
program rewriting tool CANape are used by people, the program release period is shortened, and the
software development efficiency is improved. And a plurality of programs can be tested in one workday.