A System and Method for Graphical Configuration and Automatic Generation of BMS Upgrade Firmware
Through graphical configuration and online compilation systems, the problem of frequent code writing in BMS product applications is solved, the user's self-service customized function needs are realized, and development efficiency and adaptability are improved.
Patent Information
- Application Number
- CN202510288548.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-12
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2045-03-12
AI Technical Summary
In BMS product applications, users need to communicate frequently with BMS manufacturers and rewrite program codes to meet changes in parameters and protocols and increase or decrease in functions, which leads to inefficient development.
Provides a system that configures graphically and automatically generates BMS upgrade firmware, uses graphical interface to convert user needs into program code, and generates BMS software upgrade firmware through online compilation.
Users can complete custom function requirements without learning programming knowledge, save time and cost, and greatly improve the adaptability of BMS products to different application scenarios.
Smart Images

Figure CN119806601B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of battery management systems, and more particularly to a system and method for graphically configuring and automatically generating BMS upgrade firmware. Background Art
[0002] In the application of BMS (Battery Management System) products, there are varying degrees of program customization requirements. Changes in parameters and protocols and addition or subtraction of functions of BMS products often require developers to rewrite code to meet the requirements. In actual application scenarios, users are often not BMS developers. Therefore, it is necessary to communicate with BMS manufacturers repeatedly for modification, which takes a long time and greatly reduces the development efficiency of projects. Summary of the Invention
[0003] In view of this, the present invention provides a system and method for graphically configuring and automatically generating BMS upgrade firmware, which converts the user's requirements into program code through parameter configuration using a graphical interface, and then generates an upgrade firmware for the BMS software for the user through online compilation. Users can complete customized functional requirements without learning programming knowledge and skills, can independently complete the customized functional requirements of BMS products, save time costs, and greatly improve the adaptation efficiency of BMS products to different application scenarios.
[0004] To achieve the above object, the technical solution adopted by the present invention is as follows:
[0005] In a first aspect, the present invention provides a system for graphically configuring and automatically generating BMS upgrade firmware, the system includes: a graphical interface, a custom parameter module, a firmware configuration module, and an online compilation module, wherein:
[0006] The graphical interface is used to display visual graphs of the custom parameter module, the firmware configuration module, and the online compilation module;
[0007] The custom parameter module is used to customize the parameter names to be obtained and perform related operations on the firmware custom parameters;
[0008] The firmware configuration module is used to select and modify the function configuration of the firmware and customize the protocol;
[0009] The online compilation module is used to automatically convert the parameter configurations of the custom parameter module and the firmware configuration module into program code and compile to generate a firmware file for BMS software upgrade.
[0010] In an optional embodiment, the custom parameter module performs related operations on the firmware custom parameters, including: searching, adding, modifying, and exporting the firmware custom parameters; the firmware custom parameters include Bit type parameters.
[0011] In an optional embodiment, the firmware configuration module includes: a basic configuration unit, a custom CAN message unit, a custom Modbus message unit, and a custom UART message unit, where:
[0012] The basic configuration unit is used to provide optional functions and configurable parameters;
[0013] The custom CAN message unit is used to customize CAN messages. The items that need to be configured include: the ID of the configured frame, the type of the frame, and the endian mode; N bytes of the CAN message form a frame, and the content includes fixed values and optional data items;
[0014] The custom Modbus message unit is used to customize Modbus messages. The items that need to be configured include: the protocol ID and the starting address; the message content includes fixed values and optional data items;
[0015] The custom UART message unit is used to customize UART messages. The UART message allows multiple frames to be customized, and each frame configures the received message and the response message simultaneously; the items that need to be configured include: the endian mode, the verification method, and the verification start byte; the received message content includes fixed values, and the response message content includes fixed values, optional data items, and a check code.
[0016] In an optional embodiment, in the basic configuration unit, the optional functions include: a heating function, a current limiting function, and a CAN communication parallel operation function; the configurable parameters include: basic parameters, protection parameters, calibrated voltage, and switch parameters.
[0017] In an optional embodiment, in the custom CAN message unit, the type of the frame includes: a standard frame and an extended frame.
[0018] In an optional embodiment, in the custom UART message unit, the verification methods include: CRC verification, exclusive OR verification, and sum verification.
[0019] In an optional embodiment, the system further includes: a firmware management module, which is used to manage the firmware files of the BMS software generated by compilation.
[0020] In a second aspect, the present invention further provides a method for graphically configuring and automatically generating a BMS upgrade firmware, which is applied to the above-mentioned system for graphically configuring and automatically generating a BMS upgrade firmware to generate a firmware file for BMS software upgrade. The method includes:
[0021] S1. Configure the parameters, functions, and protocol content of the BMS software through a graphical interface;
[0022] After the configuration is completed, structured program code is generated according to the configuration;
[0023] S3. Based on the generated program code, a firmware file for BMS software upgrade is compiled and generated.
[0024] Compared with the prior art, the present invention has at least the following beneficial technical effects:
[0025] The present invention uses a graphical interface to convert the user's requirements into program code through parameter configuration, and then generates an upgraded firmware for the BMS software for the user through online compilation. Users can complete customized functional requirements without learning programming knowledge and skills, can independently complete the customized functional requirements of the BMS product, save time costs, and greatly improve the adaptation efficiency of the BMS product to different application scenarios.
[0026] Other features and advantages of the present invention will be described in the following description of the specification, and part of them will be obvious from the description of the specification, or will be understood by implementing the present invention. The objectives and other advantages of the present invention can be achieved and obtained through the structures specifically pointed out in the written specification and the drawings.
[0027] The technical solution of the present invention will be further described in detail below through the drawings and embodiments. Description of the Drawings
[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0029] The drawings are used to provide a further understanding of the present invention, and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the present invention, and do not constitute a limitation to the present invention.
[0030] Figure 1 It is a schematic structural diagram of a system for graphical configuration and automatic generation of BMS upgrade firmware provided by an embodiment of the present invention.
[0031] Figure 2 It is a schematic diagram of the working process principle of a method for graphical configuration and automatic generation of BMS upgrade firmware provided by an embodiment of the present invention.
[0032] Figure 3 It is a schematic diagram of a newly created firmware provided by an embodiment of the present invention.
[0033] Figure 4Schematic diagram of adding firmware custom parameters provided by an embodiment of the present invention.
[0034] Figure 5 Schematic diagram of adding custom Bit type parameters provided by an embodiment of the present invention.
[0035] Figure 6 Schematic diagram of code generated based on basic configuration provided by an embodiment of the present invention.
[0036] Figure 7 Schematic diagram of code generated based on custom CAN messages provided by an embodiment of the present invention.
[0037] Figure 8 Schematic diagram of code generated based on custom Modbus messages provided by an embodiment of the present invention.
[0038] Figure 9 Schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Detailed implementation manners
[0039] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Usually, the components of the embodiments of the present invention described and illustrated in the accompanying drawings here can be arranged and designed in various different configurations.
[0040] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be fully conveyed to those skilled in the art.
[0041] Combined with Figure 1 and Figure 2 As shown, an embodiment of the present invention provides a system for graphically configuring and automatically generating BMS upgrade firmware, which includes: a graphical interface, a custom parameter module, a firmware configuration module, an online compilation module, and a firmware management module; where:
[0042] The graphical interface is used to display the visual graphs of the custom parameter module, the firmware configuration module, and the online compilation module;
[0043] The custom parameter module is used to customize the parameter names to be obtained and perform related operations on the firmware custom parameters;
[0044] The firmware configuration module is used to select and modify the function configuration and custom protocols of the firmware; specifically including: the basic configuration unit, the custom CAN message unit, the custom Modbus message unit, and the custom UART message unit.
[0045] The online compilation module is used to automatically convert the user-defined configuration (parameter configurations of the custom parameter module and the firmware configuration module) into program code. Specifically: first define a standardized program code template, extract the configurable parameters in the template as software-configurable parameters, and automatically convert the code by replacing the parameters configured by the user in the software interface with the parameters in the standard program template. Further, compile and generate the firmware file (bin file) for BMS software upgrade. Specifically: call the open-source compilation toolchain to compile the generated code and generate a bin-format file that can be burned into the BMS board.
[0046] The firmware management module is used to manage the firmware files of the BMS software generated by compilation.
[0047] Using the present invention, the user can configure the basic parameters, functions, and protocol content of the BMS product through a graphical interface. After the configuration is completed, the system automatically generates structured C code according to the configuration, and the generated C code can be directly used to compile and generate a firmware file for BMS product upgrade.
[0048] The following details a system for graphical configuration and automatic generation of BMS upgrade firmware of the present invention:
[0049] 1. System working process:
[0050] In the embodiment of the present invention, the BMS program is modularly designed to form a standardized engineering template, and at the same time, the selectable functions and parameters are extracted and provided to the user, and converted into customizable parameters. The user can freely modify the function configuration and custom protocols (protocols such as UART, MODBUS, and CAN) to meet the personalized customization requirements of the BMS. The specific working process is as Figure 2 shown.
[0051] 2. Functions and parameters:
[0052] Different standard projects include different basic functions. This part of the functions is determined by the standard project and is an essential function. This part of the functions only provides configurable parameters. Different standard projects have supporting default parameters, and the user only needs to modify a small part of the parameters that need to be modified.
[0053] 2.1 Optional functions:
[0054] In the embodiment of the present invention, the optional functions include: heating function, current limiting function, and CAN communication parallel operation.
[0055] 2.2 Parameters:
[0056] In the embodiments of the present invention, the configurable parameters include: basic parameters, protection parameters, calibration voltage, and switch parameters; for the detailed parameters, see Tables 1 to 4 below.
[0057] Table 1 Basic Parameters
[0058]
[0059] Table 2 Protection Parameters
[0060]
[0061] Table 3 Calibration Voltage
[0062]
[0063] Table 4 Other Parameters
[0064]
[0065] 3. Custom Message:
[0066] In the embodiments of the present invention, the message is the data format for communication between the BMS protection board and other devices. When the fixed messages provided by the standard project cannot meet the requirements, the user can generate the message format they need by customizing the message.
[0067] 3.1 CAN Message:
[0068] In the embodiments of the present invention, multiple CAN messages can be customized. The items that need to be configured for each message are as follows:
[0069] ① Configure the ID of the frame (non-repeating when there are multiple messages);
[0070] ② Frame type (standard frame, extended frame);
[0071] ③ Endian mode (big endian mode, little endian mode);
[0072] ④ Each CAN message has 8 bytes per frame, and the content can be fixed values or optional data items.
[0073] 3.2 Modbus Message:
[0074] The Modbus message has only one frame. The items that need to be configured are as follows:
[0075] ① Protocol ID;
[0076] ② Starting address;
[0077] ③The message content can be a fixed value or an optional data item, and the byte length shall not exceed the maximum length limit of Modbus protocol communication.
[0078] 3.3 UART Message:
[0079] In the embodiments of the present invention, the UART message can be customized into multiple frames, and each frame needs to configure the received message and the response message simultaneously. The items to be configured are as follows:
[0080] ①Endianness mode (big-endian mode, little-endian mode);
[0081] ②Check mode (CRC check, XOR check, sum check);
[0082] ③Check start byte;
[0083] ④The received message content is a fixed value;
[0084] ⑤The response message content can be a fixed value, an optional data item, or a check code.
[0085] The following introduces the specific working process of the system with reference to the attached drawings;
[0086] 1. Create a new firmware: As Figure 3 shown, fill in the project model, firmware name, and firmware version in sequence, and then click the OK button to add the firmware.
[0087] 2. Add custom parameters (optional operation): Refer to Figure 4 shown, the operation process includes: a. Select the original parameter; b. Enter the parameter alias; c. Modify the number of bytes, modification coefficient (multiple relationship with the original parameter), and offset (position offset value from the original parameter); d. Click the OK button to add the custom parameter.
[0088] 3. Add custom Bit type parameters: Refer to Figure 5 shown, the operation process includes: a. Enter the parameter name; b. Enter the number of bytes; c. Select the parameter item represented by each bit; d. Click the OK button to add the Bit type parameter.
[0089] 4. Basic function configuration: The operation process includes: a. Enter the firmware version; b. Select the cell type according to the type of battery pack cells; c. Select whether heating, current limiting, and CAN parallel operation functions are required; d. Set the basic parameters according to the battery pack parameters. The generated code is shown in Figure 6 shown.
[0090] 5. Custom CAN Message (Optional Configuration): The operation process includes: a. Enter the message ID; b. Select the frame type (standard frame / extended frame); c. Select the endian mode (big endian / little endian); d. Select the message content. The generated code can be seen in Figure 7 as shown.
[0091] 6. Custom Modbus Message (Optional Configuration): The operation process includes: a. Enter the communication protocol ID; b. Enter the starting address; c. Select the message content. The generated code can be seen in Figure 8 as shown.
[0092] 7. Custom UART Message: The operation process includes: a. Select the endian mode (big endian / little endian); b. Check mode (CRC check, XOR check, sum check); c. Enter the starting byte of the check; d. Enter the received message; e. Select the response message content.
[0093] 8. Submit for Generation: Submit the configuration file to the server.
[0094] 9. Wait for the server to compile and generate the firmware file: Convert the user's custom configuration into structured C code according to certain rules, and then use the standard project and the generated code file to compile and generate the bin file. The compilation process is completed by the background without the user's participation. The rules for generating structured C code refer to: converting basic parameters and functions into macros, or converting custom messages into code functions, etc.; for example, if a value is entered for the undervoltage protection value, the generated C code is "#define SC_CUV_Threshold 2700" (refer to Figure 6 shown in line 28 of Figure 7 as shown). After configuring the CAN protocol message, the corresponding generated C code is as
[0095] shown. After generating this C code, then use the compiler to compile this C code to generate the upgrade firmware that can be burned into the BMS board.
[0096] From the description of the above embodiments, those skilled in the art can know that the present invention provides a system for graphically configuring and automatically generating the BMS upgrade firmware, which converts the user's requirements into program code through parameter configuration on a graphical interface, and then generates the upgrade firmware of the BMS software for the user through online compilation. Users do not need to learn programming knowledge and skills to complete the custom function requirements, and can complete the customized function requirements of the BMS product by themselves, thus greatly improving the adaptation efficiency of the BMS product to different application scenarios.
[0097] In an optional embodiment, the embodiment of the present invention further provides a method for graphically configuring and automatically generating BMS upgrade firmware, which is applied to a system for graphically configuring and automatically generating BMS upgrade firmware in the above embodiment to generate a firmware file for BMS software upgrade. For the general working process, please also refer to Figure 2 as shown. The method mainly includes:
[0098] S1. Configure the parameters, functions, and protocol content of the BMS software through a graphical interface;
[0099] S2. After the configuration is completed, generate structured program code according to the configuration;
[0100] S3. Compile and generate a firmware file for BMS software upgrade based on the generated program code.
[0101] For the method for graphically configuring and automatically generating BMS upgrade firmware provided by the embodiment of the present invention, its implementation principle and the technical effects produced are the same as those of the foregoing system embodiment. For the sake of brief description, for the parts not mentioned in this embodiment, reference can be made to the corresponding content in the foregoing system embodiment, and details will not be repeated here.
[0102] Further, referring to Figure 9 as shown, the embodiment of the present invention further provides an electronic device for graphically configuring and automatically generating BMS upgrade firmware. The electronic device may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13, and may further include a computer program stored in the memory 11 and operable on the processor 10.
[0103] Among them, the processor 10 may be composed of integrated circuits in some embodiments. For example, it may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits with the same or different functions, including a combination of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control core (Control Unit) of the electronic device, connecting various components of the entire electronic device through various interfaces and lines, and executing various functions of the electronic device and processing data by running or executing programs or modules stored in the memory 11 (computer-readable storage medium) and calling the data stored in the memory 11.
[0104] Examples of such computer-readable storage media include: read-only memory (ROM), programmable read-only memory (PROM), electrically erasable programmable read-only memory (EEPROM), random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), flash memory, non-volatile memory, CD-ROM, DVD-ROM, Blu-ray or optical disk storage, hard disk drive (HDD), solid state drive (SSD), card memory (such as, multimedia card, secure digital (SD) card, or extreme digital (XD) card), magnetic tape, floppy disk, magneto-optical data storage device, optical data storage device, hard disk, solid state disk, and any other device configured to store in a non-transitory manner a computer program and any associated data, data files, and data structures and to provide the computer program and any associated data, data files, and data structures to a processor or computer such that the processor or computer can execute the computer program. The computer programs in the above computer-readable storage media can run in an environment deployed in computer devices such as clients, hosts, proxy devices, servers, etc.
[0105] Those skilled in the art should understand that the embodiments of the present invention can be provided as products such as software systems, methods, or electronic devices. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0106] It should be noted that the word "comprising" does not exclude the presence of components or steps not listed in the claims. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The present invention can be implemented by means of hardware including several different components and by means of a suitably programmed computer.
[0107] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts among the various embodiments can be referred to each other.
[0108] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A system for graphically configuring and automatically generating BMS upgrade firmware, characterized in that: The system uses a graphical interface to convert user requirements into program code through parameter configuration, and then generates BMS software upgrade firmware for users through online compilation. The system includes: a graphical interface, a custom parameter module, a firmware configuration module, and an online compilation module, among which: The graphical interface is used to display visual graphics of the custom parameter module, firmware configuration module and online compilation module; The custom parameter module is used to customize the parameter name to be obtained and perform related operations of the firmware custom parameters; the related operations include: searching, adding, modifying and exporting firmware custom parameters; the firmware custom parameters include Bit type parameters; The firmware configuration module is used to select and modify the functional configuration of the firmware, as well as the custom protocol; the firmware configuration module includes: a basic configuration unit, a custom CAN message unit, a custom Modbus message unit and a custom UART message unit, wherein: The basic configuration unit is used to provide optional functions and configurable parameters; The custom CAN message unit is used to customize the CAN message. The items that need to be configured include: the ID of the configuration frame, the type of the frame, and the big-endian and small-endian modes; N bytes of the CAN message constitute a frame, and the content includes fixed values and optional data items; The custom Modbus message unit is used to customize the Modbus message. The items that need to be configured include: protocol ID and start address; the message content includes fixed values and optional data items; The custom UART message unit is used to customize the UART message. The UART message allows customizing multiple frames, and each frame configures the receiving message and the response message at the same time; the items that need to be configured include: big-endian mode, small-endian mode, and check start byte; the content of the receiving message includes a fixed value, and the content of the response message includes a fixed value, an optional data item, and a check code; The online compiling module is used to convert the parameter configurations of the custom parameter module and the firmware configuration module into program codes, and compile and generate firmware files for BMS software upgrades.
2. A system for graphically configuring and automatically generating BMS upgrade firmware according to claim 1, characterized in that: In the basic configuration unit, the optional functions include: heating function, current limiting function and CAN communication parallel function; the configurable parameters include: basic parameters, protection parameters, calibrated voltage and switch parameters.
3. A system for graphically configuring and automatically generating BMS upgrade firmware according to claim 1, characterized in that: In the custom CAN message unit, the frame types include: standard frame and extended frame.
4. A system for graphically configuring and automatically generating BMS upgrade firmware according to claim 1, characterized in that: In the custom UART message unit, the verification methods include: CRC verification, XOR verification, and cumulative verification.
5. The system for graphically configuring and automatically generating BMS upgrade firmware according to claim 1, characterized in that: The system also includes: a firmware management module, which is used to manage the firmware files of the compiled BMS software.
6. A method for graphically configuring and automatically generating BMS upgrade firmware, characterized in that: A system for graphically configuring and automatically generating BMS upgrade firmware according to any one of claims 1 to 5, generating a firmware file for BMS software upgrade, the method comprising: S1. Configure the parameters, functions and protocol contents of the BMS software through the graphical interface; S2. After the configuration is completed, a structured program code is generated according to the configuration; S3. Compile and generate a firmware file for BMS software upgrade based on the generated program code.
Citation Information
Patent Citations
BMS parameter expansion and display system
CN106909331A
Platform development system of BMS
CN119322726A