Automatic FBL flash test method and device based on CAPL language

Through the automated FBL flashing test method based on CAPL language, the objective function is written using script language to realize forward and reverse flashing tests of the boot loader, the problem that traditional testing methods cannot fully evaluate the ECU flashing ability under abnormal conditions is solved, and the reliability and efficiency of the test are improved.

CN119557216APending Publication Date: 2025-03-04EVE ENERGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411605311.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

The traditional flash writing test method has limitations in execution, and it is impossible to fully evaluate the ECU's flash writing ability under abnormal conditions, and it lacks flexible control and simulation capabilities, making it difficult to effectively simulate transmission scenarios in actual working conditions.

Method used

The automated FBL flashing test method based on CAPL language is adopted to write objective functions through scripting language, including message sending function, result comparison function, secure access operation function and integrity verification function, to realize forward and reverse flashing test of the boot loader.

Benefits of technology

It reduces artificial flash test errors, improves the execution reliability and accuracy of software flash tests, enhances the evaluation of the ECU's flash test under abnormal conditions, and improves the testing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119557216A_ABST
    Figure CN119557216A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of flash test, and discloses an automatic FBL flash test method and device based on a CAPL language, and the method comprises the steps: carrying out the forward flash test of a boot loader according to a target function of the boot loader written by adopting a script language, and obtaining a forward flash test result corresponding to the boot loader; according to the test demand parameters of the boot loader, performing a reverse flashing test on the boot loader to obtain a reverse flashing test result corresponding to the boot loader; and determining a target flashing test result of the boot loader according to the forward flashing test result and the reverse flashing test result. Visibly, by implementing the application, the automatic forward and reverse flash test of the boot loader can be realized, and the target flash test result is obtained, so that the flash test errors caused by human factors can be reduced, and the execution reliability and accuracy of the software flash test are improved; and meanwhile, the execution efficiency of the software flashing test is also improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of flash writing test technology, and in particular to an automated FBL flash writing test method and device based on CAPL language. Background Art

[0002] In the development and verification process of modern automotive electronic control systems (ECUs), flash testing plays a vital role. It aims to ensure the safety performance of ECU software during the update process, thereby preventing software failures in actual vehicle operation.

[0003] In the traditional flash test method, the main focus is on the forward use case test, but there are obvious limitations in its execution: for example, after each test case is completed, the next use case needs to be manually reloaded, and when the test case encounters inconsistent responses during execution, the test tool will automatically stop the subsequent operations of the use case and cannot continue to execute the remaining test steps, thus failing to fully evaluate the flash capability of the ECU under abnormal conditions; in addition, when testing the transmission service alone, due to the lack of flexible control and simulation capabilities, it is difficult for testers to effectively simulate various transmission scenarios in actual working conditions, such as network delays, packet loss, etc. This not only reduces the test efficiency, but also increases the risk of human error, further limiting the comprehensiveness and accuracy of the test. It can be seen that it is particularly important to provide a method that can improve the accuracy of the flash test. Summary of the invention

[0004] The present application provides an automated FBL flash test method and device based on CAPL language, which can reduce flash test errors caused by humans, improve the execution reliability and accuracy of software flash test; at the same time, it also improves the execution efficiency of software flash test.

[0005] In order to solve the above technical problems, the first aspect of the present application discloses an automated FBL flash writing test method based on CAPL language, the method comprising:

[0006] A target function for a boot loader forward flash test is written in a scripting language; the target function includes a message sending and receiving function, a result comparison function, a security access operation function, and an integrity verification function;

[0007] According to the objective function, a forward flashing test operation is performed on the boot loader to obtain a forward flashing test result corresponding to the boot loader;

[0008] Determine test requirement parameters for the reverse flash test of the boot loader program, and perform a reverse flash test operation on the boot loader program according to the test requirement parameters to obtain a reverse flash test result corresponding to the boot loader program;

[0009] A target flash test result of the boot loader is determined according to the forward flash test result and the reverse flash test result.

[0010] As an optional implementation, in the first aspect of the present application, the target function for the boot loader forward flashing test written in a scripting language includes:

[0011] Determine the message sending and receiving requirement parameters of the unified diagnostic service corresponding to the boot loader; the message sending and receiving requirement parameters include at least one of a message sending object parameter, a message sending and receiving time parameter, a message sending and receiving content, a message sending and receiving frame number parameter, and a message sending and receiving response parameter;

[0012] According to the message sending and receiving requirement parameters of the unified diagnostic service, a message sending and receiving function for the boot loader forward flashing test is written in a scripting language.

[0013] As an optional implementation, in the first aspect of the present application, the target function for the boot loader forward flashing test written in a scripting language further includes:

[0014] Determine the security access requirement parameters of the unified diagnostic service; the security access requirement parameters include at least one of the access detection object requirement parameters, the access response time requirement parameters and the key verification requirement parameters;

[0015] According to the security access requirement parameters of the unified diagnostic service, the scripting language is used to write a security access operation function for the forward flashing test of the boot loader.

[0016] As an optional implementation, in the first aspect of the present application, the target function for the boot loader forward flashing test written in a scripting language further includes:

[0017] Determine the integrity verification requirement parameters of the unified diagnostic service; the integrity verification requirement parameters include at least one of a verification method requirement parameter, a verification response time requirement parameter, and a verification object requirement parameter;

[0018] According to the integrity verification requirement parameters of the unified diagnostic service, an integrity verification function for the forward flashing test of the boot loader is written in the scripting language.

[0019] As an optional implementation, in the first aspect of the present application, the target function for the boot loader forward flashing test written in a scripting language further includes:

[0020] Determine the result comparison requirement parameters of the unified diagnostic service; the result comparison requirement parameters include at least one of a result comparison object requirement parameter, a result response type requirement parameter, a result response time requirement parameter, and an expected result requirement parameter;

[0021] According to the result comparison requirement parameters of the unified diagnostic service, a result comparison function for the boot loader forward flashing test is written in the scripting language.

[0022] As an optional implementation, in the first aspect of the present application, performing a forward flash test operation on the boot loader according to the objective function to obtain a forward flash test result corresponding to the boot loader includes:

[0023] According to the message sending and receiving function, a forward flash test request is sent to a preset flash test request object, and it is determined whether a first processing response result sent by the flash test request object is received, and if so, it is determined whether a security access operation needs to be performed on the flash test request object;

[0024] When it is determined that a security access operation needs to be performed on the flash test request object, a security access operation is performed on the flash test request object according to the security access operation function and using a preset key parameter;

[0025] After completing the security access operation, judging whether the integrity of the data transmitted between the flash test request object and the flash test request object is greater than or equal to a preset integrity threshold according to the integrity check function;

[0026] When it is determined that the value is greater than or equal to the integrity threshold, a forward flash test operation is performed on the boot loader to obtain a first test result to be verified, and a forward flash test result corresponding to the boot loader is determined based on the first test result to be verified and the result comparison function.

[0027] As an optional implementation, in the first aspect of the present application, the objective function further includes a file extraction function;

[0028] The step of performing a forward flash test operation on the bootloader to obtain a first test result to be verified includes:

[0029] According to the file extraction function, a preset driver file and / or application file is extracted, and based on the driver file and / or the application file, a forward flashing test operation is performed on the boot loader to obtain a first test result to be checked.

[0030] As an optional implementation, in the first aspect of the present application, the test requirement parameter includes at least one of a transmission word count error test parameter, a transmission counter error test parameter, a data block repeated transmission test parameter, and a transmission length error test parameter;

[0031] The step of performing a reverse flash test operation on the boot loader according to the test requirement parameters to obtain a reverse flash test result corresponding to the boot loader includes:

[0032] Sending a reverse flash test request to the flash test request object, and determining whether a second processing response result sent by the flash test request object is received;

[0033] When the judgment result is yes, the boot loader is reverse-flashed according to the test requirement parameters to obtain a second test result to be verified, and the reverse-flashed test result corresponding to the boot loader is determined according to the second test result to be verified and the preset expected reverse-flashed result parameters.

[0034] The second aspect of the present application discloses an automated FBL flash writing test device based on CAPL language, the device comprising:

[0035] A writing module, used to write a target function for a boot loader forward flash test in a scripting language; the target function includes a message sending and receiving function, a result comparison function, a security access operation function, and an integrity verification function;

[0036] A testing module, configured to perform a forward flashing test operation on the boot loader according to the objective function, and obtain a forward flashing test result corresponding to the boot loader;

[0037] A determination module, used to determine test requirement parameters for the boot loader reverse flashing test;

[0038] The test module is further used to perform a reverse flash test operation on the boot loader according to the test requirement parameters to obtain a reverse flash test result corresponding to the boot loader;

[0039] The determination module is further configured to determine a target flashing test result of the boot loader according to the forward flashing test result and the reverse flashing test result.

[0040] As an optional implementation, in the second aspect of the present application, the writing module uses a scripting language to write the target function for the boot loader forward flashing test, specifically including:

[0041] Determine the message sending and receiving requirement parameters of the unified diagnostic service corresponding to the boot loader; the message sending and receiving requirement parameters include at least one of a message sending object parameter, a message sending and receiving time parameter, a message sending and receiving content, a message sending and receiving frame number parameter, and a message sending and receiving response parameter;

[0042] According to the message sending and receiving requirement parameters of the unified diagnostic service, a message sending and receiving function for the boot loader forward flashing test is written in a scripting language.

[0043] As an optional implementation, in the second aspect of the present application, the writing module uses a scripting language to write the target function for the boot loader forward flashing test, and specifically includes:

[0044] Determine the security access requirement parameters of the unified diagnostic service; the security access requirement parameters include at least one of the access detection object requirement parameters, the access response time requirement parameters and the key verification requirement parameters;

[0045] According to the security access requirement parameters of the unified diagnostic service, the scripting language is used to write a security access operation function for the forward flashing test of the boot loader.

[0046] As an optional implementation, in the second aspect of the present application, the writing module uses a scripting language to write the target function for the boot loader forward flashing test, and specifically includes:

[0047] Determine the integrity verification requirement parameters of the unified diagnostic service; the integrity verification requirement parameters include at least one of a verification method requirement parameter, a verification response time requirement parameter, and a verification object requirement parameter;

[0048] According to the integrity verification requirement parameters of the unified diagnostic service, an integrity verification function for the forward flashing test of the boot loader is written in the scripting language.

[0049] As an optional implementation, in the second aspect of the present application, the writing module uses a scripting language to write the target function for the boot loader forward flashing test, and specifically includes:

[0050] Determine the result comparison requirement parameters of the unified diagnostic service; the result comparison requirement parameters include at least one of a result comparison object requirement parameter, a result response type requirement parameter, a result response time requirement parameter, and an expected result requirement parameter;

[0051] According to the result comparison requirement parameters of the unified diagnostic service, a result comparison function for the boot loader forward flashing test is written in the scripting language.

[0052] As an optional implementation, in the second aspect of the present application, the test module performs a forward flash test operation on the boot loader according to the objective function, and a method of obtaining a forward flash test result corresponding to the boot loader specifically includes:

[0053] According to the message sending and receiving function, a forward flash test request is sent to a preset flash test request object, and it is determined whether a first processing response result sent by the flash test request object is received, and if so, it is determined whether a security access operation needs to be performed on the flash test request object;

[0054] When it is determined that a security access operation needs to be performed on the flash test request object, a security access operation is performed on the flash test request object according to the security access operation function and using a preset key parameter;

[0055] After completing the security access operation, judging whether the integrity of the data transmitted between the flash test request object and the flash test request object is greater than or equal to a preset integrity threshold according to the integrity check function;

[0056] When it is determined that the value is greater than or equal to the integrity threshold, a forward flash test operation is performed on the boot loader to obtain a first test result to be verified, and a forward flash test result corresponding to the boot loader is determined based on the first test result to be verified and the result comparison function.

[0057] As an optional implementation, in the second aspect of the present application, the objective function further includes a file extraction function;

[0058] The test module performs a forward flash test operation on the boot loader to obtain a first test result to be checked, which specifically includes:

[0059] According to the file extraction function, a preset driver file and / or application file is extracted, and based on the driver file and / or the application file, a forward flashing test operation is performed on the boot loader to obtain a first test result to be checked.

[0060] As an optional implementation, in the second aspect of the present application, the test requirement parameter includes at least one of a transmission word count error test parameter, a transmission counter error test parameter, a data block repeated transmission test parameter, and a transmission length error test parameter;

[0061] The test module performs a reverse flash test operation on the boot loader according to the test requirement parameters, and obtains a reverse flash test result corresponding to the boot loader in a manner that specifically includes:

[0062] Sending a reverse flash test request to the flash test request object, and determining whether a second processing response result sent by the flash test request object is received;

[0063] When the judgment result is yes, the boot loader is reverse-flashed according to the test requirement parameters to obtain a second test result to be verified, and the reverse-flashed test result corresponding to the boot loader is determined according to the second test result to be verified and the preset expected reverse-flashed result parameters.

[0064] The third aspect of the present application discloses another automatic FBL flash writing test device based on CAPL language, the device comprising:

[0065] A memory storing executable program code;

[0066] a processor coupled to the memory;

[0067] The processor calls the executable program code stored in the memory to execute the CAPL language-based automated FBL flash writing test method disclosed in the first aspect of the present application.

[0068] The fourth aspect of the present application discloses a computer storage medium, wherein the computer storage medium stores computer instructions, and when the computer instructions are called, they are used to execute the CAPL language-based automated FBL flash writing test method disclosed in the first aspect of the present application.

[0069] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0070] In the embodiment of the present application, according to the objective function of the boot loader written in the scripting language, the boot loader is subjected to a forward flash test to obtain the forward flash test result corresponding to the boot loader; according to the test requirement parameters of the boot loader, the boot loader is subjected to a reverse flash test to obtain the reverse flash test result corresponding to the boot loader; according to the forward flash test result and the reverse flash test result, the target flash test result of the boot loader is determined. It can be seen that the implementation of the present application can realize the automated forward and reverse flash test of the boot loader and obtain the target flash test result, so that the flash test errors caused by human factors can be reduced, and the execution reliability and accuracy of the software flash test can be improved; at the same time, the execution efficiency of the software flash test can also be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0072] Figure 1 It is a flowchart of an automated FBL flash writing test method based on CAPL language disclosed in an embodiment of the present application;

[0073] Figure 2 It is a flowchart of another CAPL language-based automated FBL flash writing test method disclosed in an embodiment of the present application;

[0074] Figure 3 It is a structural schematic diagram of an automated FBL flash writing test device based on CAPL language disclosed in an embodiment of the present application;

[0075] Figure 4 It is a structural schematic diagram of another CAPL language-based automated FBL flash writing test device disclosed in an embodiment of the present application. DETAILED DESCRIPTION

[0076] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0077] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, device, product or end that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or ends.

[0078] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0079] The present application discloses an automated FBL flash test method and device based on CAPL language, which can reduce flash test errors caused by humans, improve the execution reliability and accuracy of software flash test; at the same time, it also improves the execution efficiency of software flash test.

[0080] Embodiment 1

[0081] See also Figure 1 , Figure 1 This is a flow chart of an automated FBL flash test method based on CAPL language disclosed in the embodiment of the present application. Figure 1 The described CAPL-based automated FBL flash test method can be applied to the development and testing of automotive electronic systems, especially in scenarios where automotive electronic control units (ECUs) need to be flashed and verified. Optionally, the method can be implemented by a flash test device, which can be integrated into a flash test device (such as a CANoe platform), or can be a local server or cloud server for processing the flash test process, etc., which is not limited in the embodiments of the present application. Figure 1 As shown, the CAPL language-based automated FBL flash writing test method may include the following operations:

[0082] 101. Use scripting language to write the target function for the boot loader forward flashing test.

[0083] In the embodiment of the present application, the scripting language may be CAPL language, and the boot loader, i.e., FBL (Firmware Boot Loader), is responsible for loading and running a higher-level boot loader or operating system when the system starts, which is usually used in embedded systems such as mobile phones, tablet computers or other hardware devices. Optionally, the target function includes a message sending and receiving function, a result comparison function, a security access operation function and an integrity check function, and also includes a file extraction function.

[0084] It should be noted that the following functions can be achieved by using CAPL language to write the objective function:

[0085] First, use CAPL language to write UDS (unified diagnostic service) diagnostic sending function and receiving function (message sending and receiving function) to realize single-frame / multi-frame sending and single-frame / multi-frame receiving of messages.

[0086] Second, use the CAPL language to write a function to determine whether the expected result is consistent with the actual result (i.e., the result comparison function) to automatically check the expected result against the actual result.

[0087] Third, use CAPL language to write security access operation functions to achieve unlocking and use in the subsequent flashing process.

[0088] Fourth, use CAPL language to write CRC32 check function (i.e. integrity check function) to check programming integrity during subsequent flashing.

[0089] Fifth, use CAPL language to write and extract Flash Driver files and APP files (i.e., file extraction function) for use in subsequent flashing and transmitting data.

[0090] 102. According to the objective function, a forward flashing test operation is performed on the boot loader to obtain a forward flashing test result corresponding to the boot loader.

[0091] In the embodiment of the present application, the forward flash test result may include a comparison result between the first test result to be verified (ie, the actual forward flash test result) and the expected forward flash result parameter.

[0092] 103. Determine test requirement parameters for a reverse flash test of the boot loader program, and perform a reverse flash test operation on the boot loader program according to the test requirement parameters to obtain a reverse flash test result corresponding to the boot loader program.

[0093] In an embodiment of the present application, the reverse flashing test result may include a comparison result between the second test result to be verified (i.e., the actual reverse flashing test result) and the expected reverse flashing result parameter. Optionally, the test requirement parameters include at least one of a transmission word count error test parameter, a transmission counter error test parameter, a data block repeated transmission test parameter, and a transmission length error test parameter. In this way, the reverse flashing use case in the flashing test is solved, and the reverse use case test requirements can be covered.

[0094] 104. Determine a target flashing test result of the boot loader according to the forward flashing test result and the reverse flashing test result.

[0095] In the embodiment of the present application, for example, whether the flash test of the boot loader is successful, whether there is a serious flash error, etc. is determined based on the degree of result matching in the forward flash test result and the degree of result matching in the reverse flash test result.

[0096] It can be seen that the implementation of the embodiments of the present application can realize the automated forward and reverse flash testing of the boot loader and obtain the target flash testing results. In this way, through the dual verification of the forward flash testing and the reverse flash testing, the flash testing errors caused by human factors can be reduced, and the execution reliability and accuracy of the software flash testing can be improved; at the same time, by writing the target function in a scripting language (such as CAPL), an automated testing process is realized, which improves the execution efficiency of the software flash testing.

[0097] In an optional embodiment, the target function for the boot loader forward flashing test written in a scripting language in step 101 above includes:

[0098] Determine the message sending and receiving requirement parameters of the unified diagnostic service corresponding to the boot loader;

[0099] According to the message sending and receiving requirement parameters of the unified diagnostic service, a message sending and receiving function for the boot loader forward flashing test is written in a scripting language.

[0100] In this optional embodiment, the message sending and receiving requirement parameters may include at least one of the message sending object parameters (e.g., the message object to be sent is ECU), message sending and receiving time parameters, message sending and receiving content, message sending and receiving frame number parameters (e.g., data below 8 bytes needs to be sent / received in a single frame, and data above 8 bytes needs to be sent / received in multiple frames), and message sending and receiving response parameters. Further, the message sending function and other target functions may be automatically written, or may be set and modified by the user through an interface or configuration file.

[0101] It can be seen that this optional embodiment can write a message sending and receiving function for the forward flash test according to the message sending and receiving requirement parameters corresponding to the boot loader. In this way, the flexibility, reliability and accuracy of the writing of the message sending and receiving function can be improved, and a variety of complex communication scenarios can be simulated, so as to comprehensively verify the performance of the boot loader under different conditions, so as to quickly and accurately locate and repair problems.

[0102] In another optional embodiment, the target function for the boot loader forward flashing test written in the scripting language in the above step 101 further includes:

[0103] Determine the security access requirement parameters for unified diagnostic services;

[0104] According to the security access requirement parameters of the unified diagnostic service, a security access operation function for the bootloader forward flash test is written in a scripting language.

[0105] In this optional embodiment, optionally, the security access requirement parameter includes at least one of an access detection object requirement parameter, an access response time requirement parameter, and a key verification requirement parameter.

[0106] It should be noted that when writing security access operation functions, since ECUs usually have multiple security access levels, each level corresponds to different operation permissions and data access ranges, the management of different security access levels should be considered, and the relevant security verification and key exchange should be changed.

[0107] It can be seen that this optional embodiment can write a security access operation function for the forward flash test according to the security access requirement parameters corresponding to the boot loader. This greatly enhances the security and reliability of the forward flash test, and can comprehensively evaluate the performance of the boot loader in response to security challenges, thereby ensuring the security and stability of the ECU in actual operation.

[0108] In yet another optional embodiment, the target function for the boot loader forward flashing test written in a scripting language in step 101 above further includes:

[0109] Determine the integrity verification requirement parameters for unified diagnostic services;

[0110] According to the integrity verification requirement parameters of the unified diagnostic service, an integrity verification function for the boot loader forward flashing test is written in a scripting language.

[0111] In this optional embodiment, the integrity check function may be a CRC32 check function. Optionally, the integrity check requirement parameter includes at least one of a check mode requirement parameter, a check response time requirement parameter, and a check object requirement parameter. Generally speaking, integrity checks are usually performed for specific data blocks or files. When writing a check function, it should be clearly specified which data needs to be checked, as well as the scope of the check (such as the entire file, a specific part of a file, or a specific data block), etc.

[0112] It can be seen that this optional embodiment can write an integrity verification function for the forward flash test according to the integrity verification requirement parameters corresponding to the boot loader. In this way, it can ensure that the data transmitted and stored during the flashing process maintains its originality and accuracy, effectively preventing the risk of data damage or tampering, which is beneficial to improving the security and stability of the boot loader.

[0113] In yet another optional embodiment, the target function for the boot loader forward flashing test written in a scripting language in step 101 above further includes:

[0114] Determine the result comparison requirement parameters of the unified diagnostic service;

[0115] According to the result comparison requirement parameters of the unified diagnostic service, a result comparison function for the bootloader forward flashing test is written in a scripting language.

[0116] In this optional embodiment, optionally, the result comparison requirement parameters include result comparison object requirement parameters (such as defining specific objects that need to be compared, such as diagnosis codes, status codes, data fields, etc.), result response type requirement parameters (such as positive response type, negative response type), result response time requirement parameters and at least one of expected result requirement parameters.

[0117] It can be seen that this optional embodiment can write a result comparison function for the forward flash test according to the result comparison requirement parameters corresponding to the boot loader. In this way, there is no need to manually test and compare the test results one by one, so that response delays or failures can be detected in time, thereby improving detection reliability and accuracy. In addition, it can also reduce environmental costs and manpower investment in testing, providing strong support for the optimization and improvement of the boot loader.

[0118] Embodiment 2

[0119] See also Figure 2 , Figure 2 : is a flowchart of another CAPL language-based automated FBL flash test method disclosed in the embodiment of the present application. Figure 2 The described CAPL-based automated FBL flash test method can be applied to the development and testing of automotive electronic systems, especially in scenarios where automotive electronic control units (ECUs) need to be flashed and verified. Optionally, the method can be implemented by a flash test device, which can be integrated into a flash test device (such as a CANoe platform), or can be a local server or cloud server for processing the flash test process, etc., which is not limited in the embodiments of the present application. Figure 2 As shown, the CAPL language-based automated FBL flash writing test method may include the following operations:

[0120] 201. Use scripting language to write the target function for the boot loader forward flashing test.

[0121] 202. According to the message sending and receiving function, a forward flash test request is sent to a preset flash test request object, and it is determined whether a first processing response result sent by the flash test request object is received. If so, it is determined whether a security access operation is required to the flash test request object.

[0122] In an embodiment of the present application, for example, when judging whether it is necessary to perform a security access operation on the flash test request object, it can be based on multiple factors, such as: 1. The sensitivity of the request: When the flash operation involves sensitive data or critical functions, additional security access verification may be required; 2. User permissions: Check whether the current user or process has the permission to perform security access operations; 3. Security policy: Determine whether it is necessary to perform a security access operation based on the security policy of the system or application.

[0123] 203. When it is determined that a security access operation needs to be performed on the flash test request object, a security access operation is performed on the flash test request object according to a security access operation function and using preset key parameters.

[0124] 204. After the security access operation is completed, determine, based on the integrity check function, whether the integrity of the data transmitted between the flash test request object is greater than or equal to a preset integrity threshold.

[0125] In the embodiment of the present application, optionally, the integrity check function may be CRC, HMAC, MD5, SHA-256, etc.

[0126] 205. When it is determined that the value is greater than or equal to the integrity threshold, a forward flash test operation is performed on the boot loader to obtain a first test result to be verified, and a forward flash test result corresponding to the boot loader is determined based on the first test result to be verified and a result comparison function.

[0127] In an embodiment of the present application, further, the method also includes: when it is determined that the degree of integrity is less than a threshold value, performing an error handling operation, wherein the error handling operation includes at least one of an error log recording operation, an error report sending operation, and a retry transmission operation.

[0128] Furthermore, a forward flash test operation is performed on the bootloader to obtain a first test result to be verified, including:

[0129] According to the file extraction function, a preset driver file and / or application file is extracted, and based on the driver file and / or application file, a forward flashing test operation is performed on the boot loader to obtain a first test result to be checked.

[0130] In the embodiment of the present application, the first test result to be verified is the actual test result in the forward flash test process.

[0131] 206 . Determine test requirement parameters for a reverse flash test of the boot loader program, and perform a reverse flash test operation on the boot loader program according to the test requirement parameters to obtain a reverse flash test result corresponding to the boot loader program.

[0132] 207. Determine a target flashing test result of the boot loader according to the forward flashing test result and the reverse flashing test result.

[0133] In the embodiment of the present application, for other descriptions of step 201, step 206 and step 207, please refer to the detailed description of step 101, step 103 and step 104 in embodiment 1, and the embodiment of the present application will not be repeated.

[0134] It can be seen that the implementation of the embodiment of the present application can perform a forward flash test operation on the boot loader according to the target function, and perform a reverse flash test operation on the boot loader according to the test requirement parameters, thereby obtaining a target flash test result of the boot loader. In this way, through the forward flash test and the reverse flash test, the flash test reliability and stability of the boot loader can be improved, and then the security and compliance of the test process can be improved, thereby providing users with a better flash test experience.

[0135] In an optional embodiment, in the above step 206, performing a reverse flash test operation on the boot loader according to the test requirement parameters to obtain a reverse flash test result corresponding to the boot loader includes:

[0136] Sending a reverse flash test request to the flash test request object, and determining whether a second processing response result sent by the flash test request object is received;

[0137] When the judgment result is yes, the boot loader is reversely flashed according to the test requirement parameters to obtain a second test result to be verified, and the reverse flash test result corresponding to the boot loader is determined according to the second test result to be verified and the preset expected reverse flash result parameters.

[0138] In this optional embodiment, a Panel interface may also be written to implement visual file loading operations to implement flash type (such as CAN type or CANFD type) and request ID selection operations.

[0139] It can be seen that this optional embodiment can ensure the initiative and controllability of the flash test by sending a reverse flash test request to the flash test request object and waiting for its response. This two-way communication mechanism not only improves the flexibility of the test, but also can promptly discover and deal with potential problems during the test, thereby improving the efficiency and accuracy of the test, and providing strong data support for subsequent optimization and improvement.

[0140] Embodiment 3

[0141] See also Figure 3 , Figure 3 Schematic diagram of the structure of an automated FBL flash writing test device based on CAPL language disclosed in the embodiment of the present application. Figure 3 As shown, the CAPL language-based automated FBL flash writing test device may include:

[0142] A writing module 301 is used to write a target function for a bootloader forward flashing test using a scripting language;

[0143] The testing module 302 is used to perform a forward flashing test operation on the boot loader according to the target function, and obtain a forward flashing test result corresponding to the boot loader;

[0144] A determination module 303, used to determine test requirement parameters for a bootloader reverse flashing test;

[0145] The test module 302 is further used to perform a reverse flash test operation on the boot loader according to the test requirement parameters to obtain a reverse flash test result corresponding to the boot loader;

[0146] The determination module 303 is further configured to determine a target flashing test result of the boot loader according to the forward flashing test result and the reverse flashing test result.

[0147] In an embodiment of the present application, the target function includes a message sending and receiving function, a result comparison function, a security access operation function and an integrity verification function.

[0148] It can be seen that the implementation Figure 3 The described automated FBL flash test device based on CAPL language can realize automated forward and reverse flash tests on the boot loader and obtain target flash test results. In this way, through the dual verification of forward flash test and reverse flash test, it is possible to reduce human-caused flash test errors and improve the execution reliability and accuracy of software flash test. At the same time, by writing the target function in a scripting language (such as CAPL), an automated test process is realized, thereby improving the execution efficiency of software flash test.

[0149] In an optional embodiment, the writing module 301 uses a scripting language to write the target function for the boot loader forward flashing test, specifically including:

[0150] Determine the message sending and receiving requirement parameters of the unified diagnostic service corresponding to the boot loader;

[0151] According to the message sending and receiving requirement parameters of the unified diagnostic service, a message sending and receiving function for the boot loader forward flashing test is written in a scripting language.

[0152] In this optional embodiment, the message sending and receiving requirement parameters include at least one of a message sending object parameter, a message sending and receiving time parameter, a message sending and receiving content, a message sending and receiving frame number parameter, and a message sending and receiving response parameter.

[0153] It can be seen that the implementation Figure 3 The described automated FBL flashing test device based on CAPL language can write a message sending and receiving function for a forward flashing test according to the message sending and receiving requirement parameters corresponding to the boot loader. In this way, the flexibility, reliability and accuracy of writing the message sending and receiving function can be improved, and a variety of complex communication scenarios can be simulated, so as to comprehensively verify the performance of the boot loader under different conditions, so as to quickly and accurately locate and repair problems.

[0154] In another optional embodiment, the writing module 301 uses a scripting language to write the target function for the boot loader forward flashing test, which specifically includes:

[0155] Determine the security access requirement parameters for unified diagnostic services;

[0156] According to the security access requirement parameters of the unified diagnostic service, a security access operation function for the bootloader forward flash test is written in a scripting language.

[0157] In this optional embodiment, the security access requirement parameter includes at least one of an access detection object requirement parameter, an access response time requirement parameter, and a key verification requirement parameter.

[0158] It can be seen that the implementation Figure 3 The described CAPL-based automated FBL flashing test device can write a security access operation function for a forward flashing test according to the security access requirement parameters corresponding to the boot loader. This greatly enhances the security and reliability of the forward flashing test, and can comprehensively evaluate the performance of the boot loader in response to security challenges, thereby ensuring the security and stability of the ECU in actual operation.

[0159] In yet another optional embodiment, the writing module 301 uses a scripting language to write the target function for the boot loader forward flashing test, and specifically includes:

[0160] Determine the integrity verification requirement parameters for unified diagnostic services;

[0161] According to the integrity verification requirement parameters of the unified diagnostic service, an integrity verification function for the boot loader forward flashing test is written in a scripting language.

[0162] In this optional embodiment, the integrity check requirement parameters include at least one of a check method requirement parameter, a check response time requirement parameter, and a check object requirement parameter.

[0163] It can be seen that the implementation Figure 3 The described automated FBL flashing test device based on CAPL language can write an integrity verification function for a forward flashing test according to the integrity verification requirement parameters corresponding to the boot loader. In this way, it can ensure that the data transmitted and stored during the flashing process remains original and accurate, effectively preventing the risk of data damage or tampering, thereby helping to improve the security and stability of the boot loader.

[0164] In yet another optional embodiment, the writing module 301 uses a scripting language to write the target function for the boot loader forward flashing test, and specifically includes:

[0165] Determine the result comparison requirement parameters of the unified diagnostic service;

[0166] According to the result comparison requirement parameters of the unified diagnostic service, a result comparison function for the bootloader forward flashing test is written in a scripting language.

[0167] In this optional embodiment, the result comparison requirement parameters include at least one of a result comparison object requirement parameter, a result response type requirement parameter, a result response time requirement parameter, and an expected result requirement parameter.

[0168] It can be seen that the implementation Figure 3 The described automated FBL flashing test device based on the CAPL language can write a result comparison function for the forward flashing test according to the result comparison requirement parameters corresponding to the boot loader. In this way, there is no need to manually test and compare the test results one by one, so that response delays or failures can be detected in time, thereby improving detection reliability and accuracy. In addition, it can also reduce environmental costs and manpower investment in testing, providing strong support for the optimization and improvement of the boot loader.

[0169] In yet another optional embodiment, the testing module 302 performs a forward flashing test operation on the boot loader according to the target function, and a method of obtaining a forward flashing test result corresponding to the boot loader specifically includes:

[0170] According to the message sending and receiving function, a forward flash test request is sent to a preset flash test request object, and it is determined whether a first processing response result sent by the flash test request object is received, and if so, it is determined whether a security access operation needs to be performed on the flash test request object;

[0171] When it is determined that a security access operation needs to be performed on the flash test request object, a security access operation is performed on the flash test request object according to the security access operation function and using a preset key parameter;

[0172] After completing the security access operation, judging whether the integrity of the data transmitted between the flash test request object is greater than or equal to a preset integrity threshold according to the integrity check function;

[0173] When it is determined that the value is greater than or equal to the integrity threshold, a forward flash test operation is performed on the boot loader to obtain a first test result to be verified, and a forward flash test result corresponding to the boot loader is determined based on the first test result to be verified and the result comparison function.

[0174] In this optional embodiment, further, the target function also includes a file extraction function;

[0175] The test module 302 performs a forward flash test operation on the boot loader to obtain a first test result to be checked, specifically including:

[0176] According to the file extraction function, a preset driver file and / or application file is extracted, and based on the driver file and / or application file, a forward flashing test operation is performed on the boot loader to obtain a first test result to be checked.

[0177] It can be seen that the implementation Figure 3 The described automated FBL flash test device based on CAPL language can perform a forward flash test operation on the boot loader according to a target function, and perform a reverse flash test operation on the boot loader according to test requirement parameters, thereby obtaining a target flash test result of the boot loader. In this way, through the forward flash test and the reverse flash test, the flash test reliability and stability of the boot loader can be improved, and then the security and compliance in the test process can be improved, thereby providing users with a better flash test experience.

[0178] In yet another optional embodiment, the test requirement parameters include at least one of a transmission word count error test parameter, a transmission counter error test parameter, a data block repeated transmission test parameter, and a transmission length error test parameter;

[0179] The test module 302 performs a reverse flash test operation on the boot loader according to the test requirement parameters, and obtains the reverse flash test result corresponding to the boot loader in the following manner:

[0180] Sending a reverse flash test request to the flash test request object, and determining whether a second processing response result sent by the flash test request object is received;

[0181] When the judgment result is yes, the boot loader is reversely flashed according to the test requirement parameters to obtain a second test result to be verified, and the reverse flash test result corresponding to the boot loader is determined according to the second test result to be verified and the preset expected reverse flash result parameters.

[0182] It can be seen that the implementation Figure 3 The described automated FBL flash test device based on CAPL language can ensure the initiative and controllability of the flash test by sending a reverse flash test request to the flash test request object and waiting for its response. This two-way communication mechanism not only improves the flexibility of the test, but also can timely discover and deal with potential problems during the test process, thereby improving the efficiency and accuracy of the test and providing strong data support for subsequent optimization and improvement.

[0183] Embodiment 4

[0184] See also Figure 4 , Figure 4 FIG. 1 is a schematic diagram of another automatic FBL flash writing test device based on CAPL language disclosed in an embodiment of the present application. Figure 4 As shown, the CAPL language-based automated FBL flash writing test device may include:

[0185] A memory 401 storing executable program codes;

[0186] a processor 402 coupled to the memory 401;

[0187] The processor 402 calls the executable program code stored in the memory 401 to execute the steps of the CAPL language-based automated FBL flashing test method described in the first embodiment of the present application or the second embodiment of the present application.

[0188] Embodiment 5

[0189] The embodiment of the present application discloses a computer storage medium, which stores computer instructions. When the computer instructions are called, they are used to execute the steps of the automatic FBL flash writing test method based on the CAPL language described in the first embodiment of the present application or the second embodiment of the present application.

[0190] Embodiment 6

[0191] An embodiment of the present application discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to enable a computer to execute the steps of the CAPL language-based automated FBL flash test method described in Embodiment 1 or Embodiment 2.

[0192] The device embodiments described above are only illustrative, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, i.e., they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative work.

[0193] Through the specific description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the above technical solution can be essentially or partly contributed to the prior art in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0194] Finally, it should be noted that the automated FBL flash test method and device based on CAPL language disclosed in the embodiment of the present application is only a preferred embodiment of the present application, which is only used to illustrate the technical solution of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, ordinary technicians in this field should understand that it is still possible to modify the technical solutions recorded in the aforementioned embodiments, or to replace some of the technical features therein by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application.

Claims

1. An automated FBL flash writing test method based on CAPL language, characterized in that: The method comprises: A target function for a boot loader forward flash test is written in a scripting language; the target function includes a message sending and receiving function, a result comparison function, a security access operation function, and an integrity verification function; According to the objective function, a forward flashing test operation is performed on the boot loader to obtain a forward flashing test result corresponding to the boot loader; Determine test requirement parameters for the reverse flash test of the boot loader program, and perform a reverse flash test operation on the boot loader program according to the test requirement parameters to obtain a reverse flash test result corresponding to the boot loader program; A target flash test result of the boot loader is determined according to the forward flash test result and the reverse flash test result.

2. The CAPL language-based automated FBL flash writing test method according to claim 1, characterized in that: The target function for the bootloader forward flashing test written in a scripting language includes: Determine the message sending and receiving requirement parameters of the unified diagnostic service corresponding to the boot loader; the message sending and receiving requirement parameters include at least one of a message sending object parameter, a message sending and receiving time parameter, a message sending and receiving content, a message sending and receiving frame number parameter, and a message sending and receiving response parameter; According to the message sending and receiving requirement parameters of the unified diagnostic service, a message sending and receiving function for the boot loader forward flashing test is written in a scripting language.

3. The CAPL language-based automated FBL flash writing test method according to claim 2, characterized in that: The target function for the bootloader forward flashing test written in a scripting language also includes: Determine the security access requirement parameters of the unified diagnostic service; the security access requirement parameters include at least one of the access detection object requirement parameters, the access response time requirement parameters and the key verification requirement parameters; According to the security access requirement parameters of the unified diagnostic service, the scripting language is used to write a security access operation function for the forward flashing test of the boot loader.

4. The CAPL language-based automated FBL flash writing test method according to claim 3, characterized in that: The target function for the bootloader forward flashing test written in a scripting language also includes: Determine the integrity verification requirement parameters of the unified diagnostic service; the integrity verification requirement parameters include at least one of a verification method requirement parameter, a verification response time requirement parameter, and a verification object requirement parameter; According to the integrity verification requirement parameters of the unified diagnostic service, an integrity verification function for the forward flashing test of the boot loader is written in the scripting language.

5. The CAPL language-based automated FBL flash writing test method according to claim 4, characterized in that: The target function for the bootloader forward flashing test written in a scripting language also includes: Determine the result comparison requirement parameters of the unified diagnostic service; the result comparison requirement parameters include at least one of a result comparison object requirement parameter, a result response type requirement parameter, a result response time requirement parameter, and an expected result requirement parameter; According to the result comparison requirement parameters of the unified diagnostic service, a result comparison function for the boot loader forward flashing test is written in the scripting language.

6. The CAPL language-based automated FBL flash writing test method according to any one of claims 1 to 5, characterized in that: The step of performing a forward flash test operation on the boot loader according to the objective function to obtain a forward flash test result corresponding to the boot loader includes: According to the message sending and receiving function, a forward flash test request is sent to a preset flash test request object, and it is determined whether a first processing response result sent by the flash test request object is received, and if so, it is determined whether a security access operation needs to be performed on the flash test request object; When it is determined that a security access operation needs to be performed on the flash test request object, a security access operation is performed on the flash test request object according to the security access operation function and using a preset key parameter; After completing the security access operation, judging whether the integrity of the data transmitted between the flash test request object and the flash test request object is greater than or equal to a preset integrity threshold according to the integrity check function; When it is determined that the value is greater than or equal to the integrity threshold, a forward flash test operation is performed on the boot loader to obtain a first test result to be verified, and a forward flash test result corresponding to the boot loader is determined based on the first test result to be verified and the result comparison function.

7. The CAPL language-based automated FBL flash writing test method according to claim 6, characterized in that: The target function also includes a file extraction function; The step of performing a forward flash test operation on the bootloader to obtain a first test result to be verified includes: According to the file extraction function, a preset driver file and / or application file is extracted, and based on the driver file and / or the application file, a forward flashing test operation is performed on the boot loader to obtain a first test result to be checked.

8. The CAPL language-based automated FBL flash writing test method according to claim 7, characterized in that: The test requirement parameters include at least one of a transmission word count error test parameter, a transmission counter error test parameter, a data block repeated transmission test parameter, and a transmission length error test parameter; The step of performing a reverse flash test operation on the boot loader according to the test requirement parameters to obtain a reverse flash test result corresponding to the boot loader includes: Sending a reverse flash test request to the flash test request object, and determining whether a second processing response result sent by the flash test request object is received; When the judgment result is yes, the boot loader is reverse-flashed according to the test requirement parameters to obtain a second test result to be verified, and the reverse-flashed test result corresponding to the boot loader is determined according to the second test result to be verified and the preset expected reverse-flashed result parameters.

9. An automated FBL flash writing test device based on CAPL language, characterized in that: The device comprises: A memory storing executable program code; a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the CAPL language-based automated FBL flash writing test method according to any one of claims 1 to 8.

10. A computer storage medium, characterized in that: The computer storage medium stores computer instructions, and when the computer instructions are called, they are used to execute the CAPL language-based automated FBL flash writing test method according to any one of claims 1 to 8.