Method and device for generating executable file

CN118633268APending Publication Date: 2024-09-10YINWANG INTELLIGENT TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380010731.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-01-10
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

The open source issue of the AUTOSAR Classic Platform (CP) source code has damaged the security of software assets, making it difficult to protect the supplier's software assets.

Method used

By compiling the source code of the target function group defined by AUTOSAR into a static code library, and providing the static code library and configuration tools to the second device to generate an executable file, ensuring that users can only see the contents of the static code library but not the content of the static code library. Source code, realize the closed source of source code, and improve the security of software assets.

Benefits of technology

It improves the security of software assets, increases the speed of code generation and executable file generation, and ensures that the implementation logic of the source code is not leaked.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118633268A
    Figure CN118633268A
Patent Text Reader

Abstract

The invention discloses an executable file generation method and device, relates to the field of vehicle software architecture, and can solve the problem of source opening of source codes corresponding to AUTOSAR CP and improve the security of software assets. The method is executed by first equipment and comprises the steps that information of a target function group is obtained, and the target function group comprises at least one function defined by an automobile open system architecture AUTOSAR; obtaining a source code corresponding to the target function group; compiling a source code corresponding to the target function group into a static code library; and providing a static code library and a configuration tool for the second equipment, wherein the static code library and the configuration tool are used for the second equipment to generate an executable file corresponding to the target function group.
Need to check novelty before this filing date? Find Prior Art

Description

Method and device for generating executable file Technical Field

[0001] The present application relates to the field of vehicle software architecture, and in particular to a method and device for generating an executable file. Background Art

[0002] The Automotive Open System Architecture (AUTOSAR) is a software architecture jointly established by global automakers, component suppliers, and other electronics, semiconductor, and software systems companies. The members maintain a development partnership. AUTOSAR is committed to developing an open, standardized software architecture for the automotive industry.

[0003] Currently, to achieve high-security and high-real-time application scenarios, the AUTOSAR classic platform (CP) is typically deployed on core components of intelligent driving, such as microcontroller units (MCUs). Furthermore, the AUTOSAR CP can be integrated and developed using various development tools, such as Vector and EB.

[0004] Currently, component suppliers provide customers with core components, CP static code, and supporting configuration tools, who then conduct secondary development. This secondary development process typically begins with deploying various requirements within the basic software layer (BSW) of the CP software architecture using development tools, based on business needs. Based on the specific deployment requirements, corresponding functions and data structures are then enabled, generating the corresponding configuration code. Finally, the configuration code is compiled alongside the source code to implement the required requirements. This approach is detrimental to protecting software asset security.

[0005] Summary of the Invention

[0006] The present application provides an executable file generation method and device, which can solve the problem of open source source code corresponding to AUTOSAR CP and improve the security of software assets.

[0007] To achieve the above objectives, this application adopts the following technical solutions:

[0008] In a first aspect, a method for generating an executable file is provided, which is executed by a first device and includes: obtaining information of a target function group, where the target function group includes at least one function defined by AUTOSAR; obtaining source code corresponding to the target function group; compiling the source code corresponding to the target function group into a static code library; and providing the static code library and a configuration tool to a second device, where the static code library and the configuration tool are used by the second device to generate an executable file corresponding to the target function group.

[0009] Based on the above technical solution, the first device compiles the source code corresponding to the target function group into a static code library according to the target function group, and then provides the configuration tool and the static code library to the second device to generate an executable file corresponding to the target function group. Since the source code can see the specific implementation logic of the algorithm, while the static code library cannot see the specific implementation logic of the algorithm. In this way, for the user of the second device, what he can see is the content of the static code library, but not the content of the source code, that is, the source code is closed source, which is conducive to improving the security of software assets. In addition, the static code library provided to the second device is compiled from the source code, so when the second device generates the executable file, there is no need to compile this part of the code again, which can improve the code generation speed and the execution file generation speed.

[0010] In one possible design, the functional groups are determined based on the protocol stack supported by AUTOSAR, and the target functional groups are one or more of these functional groups. Based on this design, functional groups can be divided according to the protocol stack supported by AUTOSAR, allowing the user of the second device to select an appropriate functional group, i.e., the target functional group, based on their requirements for the protocol stack supported by AUTOSAR. This ensures that the compiled static code library meets the actual needs of the second device user.

[0011] In one possible design, the static code library is binary text; the configuration tool is used to set the parameter value corresponding to at least one function in the target function group. Based on this design, the static code library is binary text, which prevents the user of the second device from seeing the specific implementation logic of the algorithm, that is, the source code is closed-source, while also allowing the static code library to be recognized and executed by the second device. The configuration tool can be used to set the parameter value corresponding to at least one function in the target function group. This allows the user of the second device to use the configuration tool to set the parameter value they actually need, meeting their needs.

[0012] In a second aspect, a method for generating an executable file is provided, which is executed by a second device. The method includes: obtaining a static code library and a configuration tool provided by a first device, wherein the static code library is compiled by the first device according to a source code corresponding to a target function group, and the target function group includes at least one function defined by AUTOSAR; and generating an executable file corresponding to the target function group according to the static code library and the configuration tool.

[0013] In one possible design, generating the executable file corresponding to the target function group based on the static code library and the configuration tool includes: obtaining, through the configuration tool, a parameter value corresponding to at least one function in the target function group; generating configuration code based on the parameter value corresponding to the at least one function; and generating the executable file corresponding to the target function group based on the static code library and the configuration code. Based on this design, obtaining, through the configuration tool, the parameter value corresponding to at least one function in the target function group (i.e., the parameter value set by the user of the second device in the configuration tool), generating configuration code based on the parameter value, and then generating the executable file based on the configuration code and the static code library ensures that the generated executable file meets the user's actual needs.

[0014] In one possible design, generating configuration code based on the parameter values ​​corresponding to the at least one function includes: determining a first code generation template based on the target function group; and generating the configuration code based on the parameter values ​​corresponding to the at least one function and the first code generation template. Based on this design, the second device generates configuration code based on the first code configuration template, and the first code configuration template corresponds to the target function group, and the static code library also corresponds to the target function group. This allows the generated configuration code to match the static code library. Furthermore, when generating an executable file based on the configuration code and the static code library, the efficiency and accuracy of generating the executable file can be improved.

[0015] In a possible design, the functional groups are determined according to the protocol stacks supported by AUTOSAR, and the target functional groups are one or more of the functional groups.

[0016] In one possible design, both the configuration code and the source code are the code corresponding to the AUTOSAR Classic Platform CP. This design solves the issue of open-source source code corresponding to the AUTOSAR CP and improves the security of software assets.

[0017] In a third aspect, an executable file generation device is provided, including an acquisition unit and a processing unit; the acquisition unit is used to: obtain information of a target function group, the target function group including at least one function defined by AUTOSAR; obtain source code corresponding to the target function group; the processing unit is used to: compile the source code corresponding to the target function group into a static code library; provide the static code library and a configuration tool to a second device, the static code library and the configuration tool being used by the second device to generate an executable file corresponding to the target function group.

[0018] In a possible design, the functional groups are determined according to the protocol stacks supported by AUTOSAR, and the target functional groups are one or more of the functional groups.

[0019] In one possible design, the static code library is binary text; and the configuration tool is used to set a parameter value corresponding to at least one function in the target function group.

[0020] In a fourth aspect, an executable file generation device is provided, comprising an acquisition unit and a processing unit; the acquisition unit is used to acquire a static code library and a configuration tool provided by a first device, wherein the static code library is compiled by the first device according to the source code corresponding to the target function group, and the target function group includes at least one function defined by AUTOSAR; the processing unit is used to generate an executable file corresponding to the target function group based on the static code library and the configuration tool.

[0021] In one possible design, the acquisition unit is further used to obtain the parameter value corresponding to at least one function in the target function group through the configuration tool; the processing unit is further used to: generate configuration code according to the parameter value corresponding to the at least one function; and generate an executable file corresponding to the target function group based on the static code library and the configuration code.

[0022] In one possible design, the processing unit is specifically used to: determine a first code generation template based on the target function group; and generate the configuration code based on the parameter value corresponding to the at least one function and the first code generation template.

[0023] In a possible design, the functional groups are determined according to the protocol stacks supported by AUTOSAR, and the target functional groups are one or more of the functional groups.

[0024] In one possible design, the configuration code and the source code are both codes corresponding to the AUTOSAR CP.

[0025] In a fifth aspect, an executable file generation device is provided, comprising: a processor coupled to a memory; the processor configured to execute a computer program stored in the memory, so that the executable file generation device performs the method described in any one of the first or second aspects. Optionally, the memory may be coupled to the processor or independent of the processor.

[0026] The executable file generation device of the third aspect or the fourth aspect mentioned above can be a computing platform in the intelligent driving system, and the computing platform can be a vehicle-mounted computing platform or a cloud computing platform.

[0027] In a sixth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a computer program. When the computer program runs on an executable file generating device, the executable file generating device executes the method described in any one of the designs of the first aspect or the second aspect above.

[0028] In a seventh aspect, a computer program product is provided, comprising: a computer program or instructions, which, when executed on a computer, causes the computer to execute the method described in any one of the first or second aspects above.

[0029] In an eighth aspect, a chip system is provided, comprising at least one processor and at least one interface circuit, wherein the at least one interface circuit is used to perform transceiver functions and send instructions to the at least one processor. When the at least one processor executes the instructions, the at least one processor executes the method described in any one of the designs in the first or second aspect above.

[0030] In a ninth aspect, the present application provides a communication system, which includes a first device as described in the first aspect above and a second device as described in the second aspect above, and the first device and the second device implement the method provided in the embodiment of the present application through interaction.

[0031] It should be noted that the technical effects brought about by any design in the above-mentioned second to ninth aspects can refer to the technical effects brought about by the corresponding design in the first or second aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] FIG1 is a schematic diagram of an existing AUTOSAR software architecture;

[0033] FIG2 is a schematic diagram of an interface of an existing development tool;

[0034] FIG3 is a schematic diagram of the architecture of a system provided in an embodiment of the present application;

[0035] FIG4 is a schematic structural diagram of a first device provided in an embodiment of the present application;

[0036] FIG5 is a schematic structural diagram of another first device provided in an embodiment of the present application;

[0037] FIG6 is a flow chart of a method for generating an executable file according to an embodiment of the present application;

[0038] FIG7 is a schematic diagram of an interface of a configuration tool provided in an embodiment of the present application;

[0039] FIG8 is a schematic diagram of an interface of another configuration tool provided in an embodiment of the present application;

[0040] FIG9 is a flow chart of another method for generating an executable file provided in an embodiment of the present application;

[0041] FIG10 is a schematic structural diagram of an executable file generating device provided in an embodiment of the present application;

[0042] FIG11 is a schematic structural diagram of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0043] In the description of this application, unless otherwise specified, " / " indicates that the objects associated before and after are in an "or" relationship, for example, A / B can represent A or B; "and / or" in this application is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural.

[0044] In the description of this application, unless otherwise specified, "plurality" means two or more than two. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, a and b, a and c, b and c, a, b, and c, where a, b, and c can be single or plural.

[0045] In addition, to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art will understand that the words "first" and "second" do not limit the quantity or execution order, and the words "first" and "second" do not necessarily mean different.

[0046] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner to facilitate understanding.

[0047] The features, structures, or characteristics of this application may be combined in any suitable manner in one or more embodiments. In the various embodiments of this application, the order of the sequence numbers of the processes does not necessarily indicate the order of execution. The order of execution of the processes should be determined by their functions and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0048] Some optional features in the embodiments of the present application can be implemented independently in certain scenarios without relying on other features to solve corresponding technical problems and achieve corresponding effects. They can also be combined with other features in certain scenarios as needed.

[0049] In this application, unless otherwise specified, the same or similar parts between the various embodiments can be referenced to each other. In the various embodiments of this application, unless otherwise specified and there is no logical conflict, the terms and / or descriptions between different embodiments are consistent and can be referenced to each other. The technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships. The implementation methods of this application do not constitute a limitation on the scope of protection of this application.

[0050] In addition, the network architecture and business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0051] Currently, to achieve high-security and high-real-time application scenarios, AUTOSAR CP is typically deployed on core components of intelligent driving (such as MCUs). For example, as shown in Figure 1, according to the CP specification, the AUTOSAR software architecture can be divided into at least four layers: the application layer (AppL), the runtime environment (RTE), the basic software (BSW), and the microcontroller abstraction layer (MCAL).

[0052] The AppL consists of several software components (SWCs), which can interact with each other through ports. Each SWC can contain one or more runnable entities (REs), which can be understood as specific logic control, algorithm, and other functions in the software. The AppL can call services in the BSW layer through the RTE layer.

[0053] The RTE layer acts as a bridge between the AppL and BSW layers, encapsulating BSW layer services and communications. It provides AppL with standardized basic software and communication interfaces, enabling AppL to call BSW layer services through the RTE layer. Furthermore, the RTE layer protects data consistency.

[0054] The BSW layer provides various services for AppL, such as hardware drivers, communication protocols, diagnostic services, system services (such as task scheduling, resource allocation, etc.), etc.

[0055] MCAL can directly access hardware MCU resources. MCAL includes various drivers, such as input and output drivers, microcontroller drivers, communication drivers, memory drivers, etc.

[0056] It is understood that the division method of the AUTOSAR software architecture shown in FIG1 is only for illustrative purposes. As the structure evolves in the future, the AUTOSAR software architecture may include more or fewer layers, or other division methods.

[0057] Currently, when developing software architectures like the one shown in Figure 1 using various development tools like Vector and EB, services are typically deployed first at the BSW layer based on business requirements. For example, if the business requires Ethernet data, the Ethernet protocol stack is deployed. If the business requires Controller Area Network (CAN) data, the CAN protocol stack is deployed. The RTE layer then generates interfaces for these services for use by the AppL. Each configured service may include one or more requirements.

[0058] Taking the deployment of the CAN protocol stack on the development tool as an example, Figure 2 shows a schematic diagram of the interface for configuring the CAN protocol stack. As shown in Figure 2, the CAN protocol stack includes various configuration modules (only four are shown in Figure 2), such as CAN, CAN interface (CANIF), protocol data unit router (PDUR), communication (COM) and other modules. Among them, the CAN module is directly oriented to the hardware, and it can be used to implement the configuration of the CAN controller, such as: reference clock, baud rate, sampling point, etc. The CANIF module is mainly used to implement the configuration of CAN data reception related functions, such as specifying the upper-level modules of each protocol data unit (PDU). The PDUR module is mainly used to implement the configuration of CAN data forwarding related functions, etc. The COM module is mainly used to implement the configuration of CAN data parsing related functions, etc.

[0059] Taking the configuration of the CANIF module as an example, as shown in Figure 2, the CANIF module includes multiple AUTOSAR-defined requirements, such as length detection and custom period detection. For each message, the user can choose whether to enable various requirements such as length detection and custom period detection based on their needs. After the user sets a requirement (e.g., turning it on or off) in a development tool interface such as the one shown in Figure 2, the development tool generates the corresponding configuration code based on the user's settings. In some embodiments, this configuration code includes functions and data structures.

[0060] As shown in FIG2 , the configuration code generated by the development tool according to the user's settings is illustrated by taking the case where the user enables the length detection requirement of the message identifier (ID) as “0x101” and the message length as “64” and does not enable the custom period detection requirement of the message as an example.

[0061] Illustratively, the configuration code generated by the development tool may be as shown in Table 1.

[0062] Table 1

[0063]

[0064] As shown in Table 1, "CANIF_DATA_LENGTH_CHECK_SUPPORT" and "CANIF_CYCLE_DETECT_SUPPORT" are functions included in the configuration code and can be used to enable or disable certain AUTOSAR-defined requirements. For example, if "CANIF_DATA_LENGTH_CHECK_SUPPORT" is "TRUE," the length check requirement for message ID "0x101" and message length "64" is enabled. Another example is if "CANIF_CYCLE_DETECT_SUPPORT" is "FALSE," which disables the custom cycle check requirement for message ID "0x101" and message length "64."

[0065] The part other than the functions is the data structure in the configuration code, which can be generated according to the specific settings of the user in the development tool interface such as shown in Figure 2, such as: including but not limited to the value of the message ID, the value of the message length, etc.

[0066] After enabling or disabling an AUTOSAR requirement through the configuration code above, the source code implements the requirement. For example, using the configuration code shown in Table 1, and implementing message length detection and custom period detection as examples, the corresponding source code can be shown in Table 2.

[0067] Table 2

[0068]

[0069]

[0070] As shown in Table 2, the source code includes specific code logic, which can be used to implement message length detection requirements, custom period detection requirements, etc.

[0071] The above configuration code and corresponding source code can be compiled together into an executable file to meet the user's actual needs. During the actual compilation process, the specific code branching logic can be determined based on the functions in the configuration code. For example, combining the examples in Tables 1 and 2, the configuration code described in Table 1 and the source code shown in Table 2 together to create an executable file can enable message length detection requirements, disable custom period detection requirements, and so on.

[0072] Because AUTOSAR defines many requirements, and core component suppliers cannot be sure which requirements users will enable or disable, to support these requirements, suppliers are forced to open source the source code corresponding to the aforementioned AUTOSAR CPs when providing core components. This is not conducive to protecting the security of suppliers' software assets.

[0073] Based on this, an embodiment of the present application provides an executable file generation method, which can solve the problem of open source source code corresponding to AUTOSAR CP and improve the security of software assets.

[0074] For example, Figure 3 shows a schematic diagram of a system architecture provided by an embodiment of the present application. As shown in Figure 3, the system architecture 30 includes a first device 100, a second device 200, and the like.

[0075] The first device 100 is configured to compile the source code into a static code library and provide the static code library to the second device 200. Source code is code in which the specific implementation logic is visible, while a static code library cannot be seen in which the specific implementation logic is visible, but can be recognized and executed by a computer. In some embodiments, the static code library can be binary text.

[0076] The second device 200 can generate an executable file based on the static code library. The executable file can be used to implement one or more requirements defined by AUTOSAR. It is understood that an executable file refers to a file that can be loaded and executed by an operating system. Optionally, the executable file can be run on the second device 200 to implement the one or more requirements, or it can be run on a device other than the second device 200 to implement the one or more requirements.

[0077] Optionally, the first device 100 and the second device 200 may be connected via a wired communication technology or a wireless communication technology. The wireless communication technology includes, but is not limited to, at least one of the following: near field communication (NFC), Bluetooth (BT) (e.g., traditional Bluetooth or Bluetooth low energy (BLE)), wireless local area networks (WLAN) (e.g., wireless fidelity (Wi-Fi) networks), Zigbee, frequency modulation (FM), infrared (IR), and a wide area network (WAN) relayed via a relay device.

[0078] Exemplarily, when the communication technology is the above-mentioned wide area network, the communication technology can be a third-generation wireless telephone technology (3G) network, a fourth-generation mobile communication technology (4G) network, a fifth-generation mobile communication technology (5G) network, a future evolved public land mobile network (PLMN) or the Internet, etc.

[0079] Optionally, the first device 100 and the second device 200 may communicate directly or forward the communication through other devices. The embodiment of the present application does not limit the specific communication method between the first device 100 and the second device 200.

[0080] Optionally, FIG3 is a simplified schematic diagram for ease of understanding. In actual applications, the above system may further include other devices, which are not shown in the figure.

[0081] Optionally, in an embodiment of the present application, the above-mentioned first device 100 and / or the above-mentioned second device 200 can be various terminal devices such as desktop computers, laptop computers, and notebook computers, or can be various computing devices with computing capabilities such as servers and cloud devices. The server can be a single server, a server cluster composed of multiple servers, or a vehicle-mounted computing platform.

[0082] The operating system installed on the first device 100 and / or the second device 200 includes but is not limited to Or other operating systems. In some embodiments, the first device 100 and / or the second device 200 can be a fixed device or a portable device. This application does not limit the specific type of the first device 100 and / or the second device 200 or the installed operating system.

[0083] Optionally, the first device 100 and the second device 200 may also be different processors deployed on different physical devices (such as a server or a server in a cluster).

[0084] For example, the first device 100 or the second device 200 may be a neural network processing unit (NPU), a graphics processing unit (GPU), a central processing unit (CPU), other general-purpose processors, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.

[0085] Optionally, the first device 100 and / or the second device 200 may be devices of the same type or different types. Optionally, the operating system installed on the first device 100 and the operating system installed on the second device 200 may be the same or different.

[0086] Taking the first device 100 as an example, illustratively, FIG4 shows a schematic structural diagram of the first device 100 provided in an embodiment of the present application.

[0087] The first device 100 includes a processor 410, an external memory interface 420, an internal memory 421, a universal serial bus (USB) interface 430, a charging management module 440, a power management module 441, a battery 442, a wireless communication module 450, an input device 460, a display screen 470, etc.

[0088] The processor 410 may include one or more processing units. For example, the processor 410 may include an application processor (AP), a GPU, an image signal processor (ISP), a controller, a memory, a DSP, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.

[0089] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0090] Processor 410 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 410 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 410. If processor 410 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 410 latency, and thus improves system efficiency.

[0091] In some embodiments, processor 410 may include one or more interfaces.

[0092] The charging management module 440 is configured to receive charging input from a charger, which may be a wireless charger or a wired charger.

[0093] The power management module 441 is used to connect the battery 442, the charging management module 440, and the processor 410. The power management module 441 receives input from the battery 442 and / or the charging management module 440 and provides power to the processor 410, the internal memory 421, the external memory, the wireless communication module 450, the input device 460, and the display screen 470.

[0094] The wireless communication module 450 can provide wireless communication solutions applied on the first device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc. The wireless communication module 450 can be one or more devices that integrate at least one communication processing module. The wireless communication module 450 receives electromagnetic waves via an antenna, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 410. The wireless communication module 450 can also receive the signal to be sent from the processor 410, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna.

[0095] The input device 460 may include a keyboard, a mouse, and the like. The keyboard is used to input English letters, numbers, punctuation marks, and the like into the first device 100, thereby issuing commands to the first device 100 and inputting data. The mouse is an indicator for the vertical and horizontal coordinates of the display system of the first device 100 and is used to input commands to the first device 100. The input device 460 may be connected to the first device 100 via a wired connection, for example, via a GPIO interface, a USB interface, or the like. The input device 460 may also be connected to the first device 100 wirelessly, for example, via Bluetooth, infrared, or the like.

[0096] The first device 100 implements display functionality through a GPU, display screen 470, and an application processor. The GPU is a microprocessor for image processing that connects the display screen 470 and the application processor. The GPU is used to perform mathematical and geometric calculations to achieve graphics rendering. The processor 410 may include one or more GPUs that execute program instructions to generate or change display information.

[0097] The display screen 470 is used to display images, etc. The display screen 470 includes a display panel. In some embodiments, the first device 100 may include 1 or N display screens 470, where N is a positive integer greater than 1.

[0098] The wireless communication function of the first device 100 can be implemented through the wireless communication module 450, and the wireless communication module 450 may include a built-in or external antenna.

[0099] The antenna is used to transmit and receive electromagnetic wave signals. Each antenna in the first device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.

[0100] In some embodiments of the present application, the wireless communication module 450 may be used for communication between the first device 100 and the second device 200 .

[0101] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the first device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0102] The external memory interface 420 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the first device 100. The external memory card communicates with the processor 410 through the external memory interface 420 to implement data storage functions. For example, files such as music and videos can be stored in the external memory card.

[0103] The internal memory 421 can be used to store computer executable program code, which includes instructions. The processor 410 executes various functional applications and data processing of the first device 100 by running the instructions stored in the internal memory 421. The internal memory 421 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.). The data storage area can store data created during the use of the first device 100 (such as audio data, a phone book, etc.). In addition, the internal memory 421 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0104] The above is merely an example of the structure of the first device 100 in the embodiment of the present application, and does not constitute a limitation on the structure and form of the first device 100. The embodiment of the present application does not limit the structure and form of the first device 100.

[0105] For example, the first device 100 may also be implemented by the communication device shown in Figure 5. Figure 5 is a schematic structural diagram of another first device 100 provided in an embodiment of the present application. The first device 100 includes at least one processor 501, a communication line 502, a memory 503, and at least one communication interface 504.

[0106] The processor 501 can be a general-purpose CPU, a microprocessor, an ASIC, or one or more integrated circuits for controlling the execution of the program of the present application.

[0107] Communication link 502 may include a pathway for transmitting information between the aforementioned components.

[0108] Communication interface 504 is used to communicate with other devices. In embodiments of the present application, communication interface 504 may be a module, circuit, bus, interface, transceiver, or other device capable of implementing communication functions. Optionally, when the communication interface is a transceiver, the transceiver may be a standalone transmitter that can be used to send information to other devices, or a standalone receiver that can be used to receive information from other devices. The transceiver may also be a component that integrates the functions of sending and receiving information. Embodiments of the present application do not limit the specific implementation of the transceiver.

[0109] The memory 503 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, an optical disc storage (including a compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer. The memory 503 may exist independently and be connected to the processor 501 via the communication line 502. The memory 503 may also be integrated with the processor 501.

[0110] The memory 503 is used to store computer-executable instructions for implementing the solution of the present application. The processor 501 is used to execute the computer-executable instructions stored in the memory 503, thereby implementing the methods provided in the following embodiments of the present application.

[0111] Optionally, the computer-executable instructions in the embodiments of the present application may also be referred to as application code, instructions, computer programs or other names, which are not specifically limited in the embodiments of the present application.

[0112] In a specific implementation, as an embodiment, the processor 501 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 5 .

[0113] In a specific implementation, as an embodiment, the first device 100 may include multiple processors, such as processor 501 and processor 505 in Figure 5. Each of these processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. The processor here may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0114] The first device 100 mentioned above can be a general device or a dedicated device. The embodiment of the present application does not limit the type of the first device 100.

[0115] In other embodiments of the present application, the first device 100 may include more or fewer components than those shown in Figures 4 and 5, or may combine certain components, separate certain components, replace certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0116] Optionally, the specific structure of the second device 200 may refer to the implementation of the first device 100. The second device 200 may include more or fewer components than the first device 100.

[0117] It is understood that in the embodiments of the present application, the first device and / or the second device may perform some or all of the steps in the embodiments of the present application. These steps or operations are merely examples, and the embodiments of the present application may also perform other operations or variations of various operations. In addition, the various steps may be performed in a different order than those presented in the embodiments of the present application, and it is possible that not all operations in the embodiments of the present application need to be performed.

[0118] For example, FIG6 shows a flow chart of a method for generating an executable file provided in an embodiment of the present application, which method includes the following steps:

[0119] S601: A first device obtains information of a target function group.

[0120] The target functional group includes at least one function defined by AUTOSAR. Optionally, a function can be used to implement one or more requirements defined by AUTOSAR.

[0121] For example, the target function group includes the AUTOSAR-defined "CANIF_DATA_LENGTH_CHECK_SUPPORT" function and the AUTOSAR-defined "CANIF_CYCLE_DETECT_SUPPORT" function. The AUTOSAR-defined "CANIF_DATA_LENGTH_CHECK_SUPPORT" function can be used to implement AUTOSAR-defined length detection requirements. The AUTOSAR-defined "CANIF_CYCLE_DETECT_SUPPORT" function can be used to implement AUTOSAR-defined custom cycle detection requirements, etc.

[0122] In some embodiments, the target functional group may be one or more functional groups determined by the protocol stack supported by AUTOSAR. For example, if the protocol stack supported by AUTOSAR includes the CAN protocol stack and the Ethernet protocol stack, the functional groups may include the CAN functional group and the Ethernet functional group. The CAN functional group includes one or more functions related to the CAN protocol stack, and the Ethernet functional group includes one or more functions related to the Ethernet protocol stack.

[0123] The target functional group may be one or more of the CAN functional group and the Ethernet functional group. In some embodiments, the user may select one or more functional groups from the divided multiple functional groups according to actual needs, and these functional groups selected by the user are the target functional groups.

[0124] In other embodiments, the target functional group may be one or more functional groups determined based on different users' selections of AUTOSAR-defined requirements. For example, assuming that AUTOSAR-defined requirements include Requirement 1, Requirement 2, Requirement 3, Requirement 4, Requirement 5, and Requirement 6, user A's selected requirements include Requirement 1, Requirement 3, and Requirement 5; user B's selected requirements include Requirement 2, Requirement 4, and Requirement 5; and user C's selected requirements include Requirement 1 and Requirement 2. The functional groups thus divided may include Function Group A, Function Group B, and Function Group C. At least one function in Function Group A can be used to implement the requirement selected by user A, at least one function in Function Group B can be used to implement the requirement selected by user B, and at least one function in Function Group C can be used to implement the requirement selected by user C.

[0125] The target function group may be one of function group A, function group B, and function group C. It is understood that the target function group corresponding to user A is function group A, the target function group corresponding to user B is function group B, the target function group corresponding to user C is function group C, and so on.

[0126] It is understood that this example is based on the example of all requirements selected by a user being realized through one function group. In other embodiments, multiple requirements selected by a user can also be realized through multiple function groups, that is, the target function group corresponding to a user can include multiple function groups.

[0127] Optionally, the target function group information may include an identifier of the target function group, or functions included in the target function group, etc. Optionally, the target function group information may be input into the first device by a user, or may be obtained by the first device from another device.

[0128] In some embodiments, one or more function groups are stored in the first device or other device, and the first device or other device may determine the target function group from the one or more function groups according to information of the target function group.

[0129] S602: The first device obtains source code corresponding to the target function group.

[0130] Optionally, for different target function groups, the corresponding source codes may be completely different or partially the same.

[0131] Optionally, the first device may pre-store source code corresponding to the target function group, or may obtain the source code corresponding to the target function group from other devices.

[0132] S603: The first device compiles source code corresponding to the target function group into a static code library.

[0133] It can be understood that the source code corresponding to the target function group is also the source code corresponding to the functions included in the target function group. For example, taking the functions shown in Table 1 above as an example, the source code corresponding to the functions can be as shown in Table 2 above.

[0134] It can also be understood that source code is code in which the specific implementation logic can be seen, while static code libraries cannot see the specific implementation logic, but can be recognized and run by computers.

[0135] In some embodiments, after obtaining the source code corresponding to the target functional group, the first device can automatically compile the source code corresponding to the target functional group into a static code library. In some embodiments, the static code library can be a binary text.

[0136] In other embodiments, after obtaining the source code corresponding to the target functional group, the first device may also receive a user operation and, in response to the user operation, compile the source code corresponding to the target functional group into a static code library.

[0137] The embodiment of the present application does not limit the timing when the first device compiles the source code corresponding to the target function group into a static code library.

[0138] It will be appreciated that this embodiment uses the example of a first device compiling the source code corresponding to the target functional group into a static code library. In other embodiments, this process can also be performed by other devices. For example, the first device can send the acquired source code corresponding to the target functional group to the other device, which compiles the source code into a static code library and then sends the static code library to the first device.

[0139] S604: The first device provides a static code library and a configuration tool to the second device.

[0140] Correspondingly, the second device obtains the static code library and configuration tool provided by the first device.

[0141] The static code library and the configuration tool are used by the second device to generate an executable file corresponding to the target function group.

[0142] In some embodiments, the configuration tool can be used to set a parameter value corresponding to at least one function in the target function group. It is understood that the parameter value corresponding to the function in the target function group is also the parameter value corresponding to the requirement for implementing the function.

[0143] For example, if the function in the target function group is "CANIF_DATA_LENGTH_CHECK_SUPPORT", the corresponding parameter value may be message ID, message length, etc.

[0144] In some examples, the interface of the configuration tool provided by the first device to the second device may be as shown in Figure 7. In the example shown in Figure 7, the interface of the configuration function may display the requirements for implementing the functions included in the target function group and the parameter values ​​corresponding to the requirements (i.e., the parameter values ​​corresponding to the functions), but may not display the requirements for implementing the functions not included in the target function group and the parameter values ​​corresponding to the requirements.

[0145] For example, the target function group includes the function "CANIF_DATA_LENGTH_CHECK_SUPPORT," which implements the length detection requirement, and excludes the function "CANIF_CYCLE_DETECT_SUPPORT," which implements the custom cycle detection requirement. As shown in Figure 7, the configuration tool interface displays the length detection requirement and the corresponding parameter values, such as the message ID and message length. However, the custom cycle detection requirement and its corresponding parameter values ​​are not displayed.

[0146] In other examples, the interface of the configuration tool provided by the first device to the second device is also shown in Figure 8. In the example shown in Figure 8, in addition to displaying the requirements for implementing the functions included in the target function group and the parameter values ​​corresponding to the requirements, the requirements for implementing the functions not included in the target function group and the parameter values ​​corresponding to the requirements can also be displayed. However, the requirements for implementing the functions not included in the target function group and the parameter values ​​corresponding to the requirements can be presented in an inoperable state (such as grayed out, etc.), that is, the user cannot set the parameter values ​​of these inoperable states.

[0147] Let's take the example where the function included in the target function group is "CANIF_DATA_LENGTH_CHECK_SUPPORT", which implements the requirement of length detection, and the function not included is "CANIF_CYCLE_DETECT_SUPPORT", which implements the requirement of custom cycle detection. As shown in Figure 8, the interface of the configuration tool can present the length detection requirement and the parameter values ​​corresponding to the length detection requirement, and the parameter values ​​are presented in an operational state, such as message ID, message length, etc., and the user can set the parameter values ​​of these operational states. The interface of the configuration tool can also present the custom cycle detection requirement and the parameter values ​​corresponding to the custom cycle detection requirement, but the parameter values ​​are presented in an inoperable state, and the user cannot set the parameter values ​​of these inoperable states.

[0148] It is understood that the first device and the second device can communicate directly. That is, the first device can directly send the configuration tool and the static code library to the second device, and accordingly, the second device can directly receive the configuration tool and the static code library from the second device. Alternatively, the first device and the second device can also forward communication through other devices. For example, the first device sends the configuration tool and the static code library to the other device, and the second device then obtains the configuration tool and the static code library from the other device. The embodiments of the present application do not impose any restrictions on the manner in which the second device obtains the configuration tool and the static code library provided by the first device.

[0149] S605: The second device generates an executable file corresponding to the target function group according to the static code library and the configuration tool.

[0150] Based on the above technical solution, after the first device compiles the source code corresponding to the functional group into a static code library, it provides the configuration tool and the static code library to the second device to generate an executable file. It can be understood that the source code can see the specific implementation logic of the algorithm, while the static code library cannot see the specific implementation logic of the algorithm. In this way, for the user of the second device, what he can see is the content of the static code library, but not the content of the source code, that is, the source code is closed source, which is conducive to improving the security of software assets. In addition, the static code library provided to the second device is compiled from the source code, so when the second device generates the executable file, there is no need to compile this part of the code again, which can improve the code generation speed and the execution file generation speed.

[0151] In some embodiments, step S605 shown in FIG. 6 may be specifically implemented as steps S606 to S608 shown in FIG. 9 .

[0152] S606: The second device obtains a parameter value corresponding to at least one function in the target function group through a configuration tool.

[0153] Optionally, each function in the target function group may correspond to one or more parameter values.

[0154] Optionally, the parameter value corresponding to at least one function in the target function group may be set by the user through a configuration tool, and the setting method may refer to the above description. Alternatively, the parameter value corresponding to at least one function in the target function group may also be a default parameter value.

[0155] S607: The second device generates a configuration code according to a parameter value corresponding to at least one function.

[0156] In some embodiments, the second device may determine a first code generation template according to the target function group, and then generate the configuration code according to a parameter value corresponding to at least one function and the first code generation template.

[0157] Optionally, different function groups have different corresponding configuration code generation templates. That is, different functions have different corresponding configuration code generation templates. Therefore, the second device may first determine the first code generation template, i.e., the corresponding configuration code generation template, based on the target function group.

[0158] For example, taking the function included in the function group as "CANIF_DATA_LENGTH_CHECK_SUPPORT" as an example, the configuration code generation template corresponding to the function group may be as shown in Table 3.

[0159] Table 3

[0160]

[0161]

[0162] In some embodiments, the second device may enter a parameter value corresponding to at least one function into the first code generation template to generate a configuration code. For example, in conjunction with the configuration code generation template shown in Table 3, the parameter value corresponding to the function "CANIF_DATA_LENGTH_CHECK_SUPPORT" includes: a message ID of "0x101" and a message length of 64. For example, the generated configuration code may be as shown in Table 4.

[0163] Table 4

[0164]

[0165] As shown in Table 4, the second device fills in the value of "canId" as "0x101", fills in the value of "canIdLength" as "64U", and so on.

[0166] It is understood that Table 3 and Table 4 are merely exemplary illustrations for facilitating understanding of the embodiments of the present application and do not constitute limitations of the present application. In actual applications, the configuration code generation template and the generated configuration code may be different.

[0167] Optionally, in the embodiment of the present application, both the configuration code and the source code may be codes corresponding to AUTOSAR CP.

[0168] S608: The second device generates an executable file corresponding to the target function group according to the static code library and the configuration code.

[0169] In some embodiments, the second device may compile the configuration code first, and then link the compiled file to a static code library to generate an executable file corresponding to the target functional group.

[0170] It is understood that the above configuration code and static code library are both BSW layer codes. Optionally, the second device can also compile the AppL layer code, MCAL layer code and configuration code together, and then link the compiled files to the static code library to jointly generate the above executable file.

[0171] Based on this solution, the second device generates configuration code based on the first code configuration template. The first code configuration template corresponds to the target functional group, and the static code library also corresponds to the target functional group. This ensures that the generated configuration code matches the static code library. Furthermore, when an executable file is generated based on the configuration code and the static code library, the efficiency and accuracy of executable file generation can be improved.

[0172] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of method. It is understandable that, in order to realize the above functions, the executable file generation device includes hardware structures and / or software modules corresponding to the execution of each function. In combination with the units and algorithm steps of each example described in the embodiment disclosed in this application, the embodiment of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer-driven hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiment of the present application.

[0173] The present application is an embodiment that can divide the functional modules of the executable file generation device according to the above method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.

[0174] As shown in Figure 10, a schematic diagram of the structure of an executable file generation device provided in an embodiment of the present application is provided. The executable file generation device 1000 can be used to implement the methods described in the above method embodiments. Exemplarily, the executable file generation device may include: an acquisition unit 1001 and a processing unit 1002.

[0175] In one possible example, taking the executable file generation apparatus 1000 as the first device 100 shown in FIG3 as an example, the acquisition unit 1001 is configured to support the executable file generation apparatus 1000 in performing steps S601 to S602 in FIG6 . Furthermore, / or, the acquisition unit 1001 is further configured to support the executable file generation apparatus 1000 in performing steps S601 to S602 in FIG9 . Furthermore, / or, the acquisition unit 1001 is further configured to support the executable file generation apparatus 1000 in performing other steps performed by the first device 100 in the embodiments of the present application.

[0176] The processing unit 1002 is configured to support the executable file generation apparatus 1000 in executing steps S603 to S604 in FIG. 6 . And / or, the processing unit 1002 is further configured to support the executable file generation apparatus 1000 in executing steps S603 to S604 in FIG. 9 . And / or, the processing unit 1002 is further configured to support the executable file generation apparatus 1000 in executing other steps executed by the first device 100 in the embodiments of the present application.

[0177] In another possible example, taking the executable file generation apparatus 1000 as the second device 200 shown in FIG3 as an example, the acquisition unit 1001 is configured to support the executable file generation apparatus 1000 in performing step S606 in FIG9 . And / or, the acquisition unit 1001 is further configured to support the executable file generation apparatus 1000 in performing other steps performed by the second device 200 in the embodiments of the present application.

[0178] The processing unit 1002 is configured to support the executable file generation apparatus 1000 in executing step S605 in FIG. 6 . And / or, the processing unit 1002 is further configured to support the executable file generation apparatus 1000 in executing steps S607 to S608 in FIG. 9 . And / or, the processing unit 1002 is further configured to support the executable file generation apparatus 1000 in executing other steps executed by the second device 200 in the embodiments of the present application.

[0179] Optionally, the executable file generating apparatus 1000 shown in FIG10 may further include a communication unit 1003, which is used to support the executable file generating apparatus 1000 in executing the steps of communicating between the executable file generating apparatus and other devices in the embodiment of the present application.

[0180] Optionally, the executable file generating device 1000 shown in FIG10 may further include a storage unit (not shown in FIG10 ) storing a program or instruction. When the processing unit 1002 executes the program or instruction, the executable file generating device 1000 shown in FIG10 may execute the method described in the above method embodiment.

[0181] The technical effects of the executable file generation device 1000 shown in FIG10 can refer to the technical effects described in the above method embodiments and will not be repeated here. The processing unit 1002 involved in the executable file generation device 1000 shown in FIG10 can be implemented by a processor or processor-related circuit components, and can be a processor or processing module. The communication unit 1003 can be implemented by a transceiver or transceiver-related circuit components, and can be a transceiver or transceiver module.

[0182] An embodiment of the present application also provides a chip system, as shown in Figure 11, which includes at least one processor 1101 and at least one interface circuit 1102. The processor 1101 and the interface circuit 1102 can be interconnected via lines. For example, the interface circuit 1102 can be used to receive signals from other devices. For another example, the interface circuit 1102 can be used to send signals to other devices (such as the processor 1101). Exemplarily, the interface circuit 1102 can read instructions stored in the memory and send the instructions to the processor 1101. When the instructions are executed by the processor 1101, the executable file generation device can execute the various steps performed by the executable file generation device in the above embodiment. Of course, the chip system can also include other discrete devices, which is not specifically limited in the embodiment of the present application.

[0183] Optionally, there may be one or more processors in the chip system. The processor may be implemented in hardware or software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented in software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.

[0184] Optionally, the memory in the chip system may be one or more memories. The memory may be integrated with the processor or may be provided separately from the processor, which is not limited in this application. For example, the memory may be a non-transient processor, such as a ROM, which may be integrated with the processor on the same chip or provided on different chips. This application does not specifically limit the type of memory or the configuration of the memory and the processor.

[0185] Exemplarily, the chip system can be an FPGA, an ASIC, a system on chip (SoC), a CPU, a network processor (NP), a DSP, an MCU, a programmable logic device (PLD), or other integrated chips.

[0186] It should be understood that each step in the above method embodiment can be completed by hardware integrated logic circuits in a processor or by software instructions. The method steps disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware processor, or by a combination of hardware and software modules in a processor.

[0187] An embodiment of the present application further provides a computer storage medium, in which computer instructions are stored. When the computer instructions are executed on an executable file generating device, the executable file generating device executes the method described in the above method embodiment.

[0188] An embodiment of the present application provides a computer program product, which includes: a computer program or instructions, which, when executed on a computer, causes the computer to execute the method described in the above method embodiment.

[0189] In addition, an embodiment of the present application also provides a device, which can specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer-executable instructions, and when the device is running, the processor can execute the computer-executable instructions stored in the memory to enable the device to execute the methods in the above-mentioned method embodiments.

[0190] Among them, the executable file generation device, computer storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0191] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0192] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The various embodiments can be combined with each other or referenced to each other without conflict. The device embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0193] Units described as separate components may or may not be physically separate, and components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0194] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0195] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0196] The above content is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A method for generating an executable file, It is characterized in that The method is performed by a first device, and includes: Acquire information of a target function group, where the target function group includes at least one function defined by an automotive open system architecture AUTOSAR; Obtaining source code corresponding to the target function group; Compile the source code corresponding to the target function group into a static code library; The static code library and the configuration tool are provided to the second device, and the static code library and the configuration tool are used by the second device to generate an executable file corresponding to the target function group.

2. The method according to claim 1, It is characterized in that The functional groups are determined according to the protocol stack supported by AUTOSAR, and the target functional groups are one or more of the functional groups.

3. The method according to claim 1 or 2, It is characterized in that The static code library is binary text; the configuration tool is used to set a parameter value corresponding to at least one function in the target function group.

4. A method for generating an executable file, It is characterized in that The method is performed by a second device, and includes: Acquire a static code library and a configuration tool provided by a first device, wherein the static code library is compiled by the first device according to source code corresponding to a target function group, wherein the target function group includes at least one function defined by AUTOSAR; An executable file corresponding to the target function group is generated according to the static code library and the configuration tool.

5. The method according to claim 4, It is characterized in that The step of generating an executable file corresponding to the target function group according to the static code library and the configuration tool includes: Acquiring, by means of the configuration tool, a parameter value corresponding to at least one function in the target function group; Generate a configuration code according to a parameter value corresponding to the at least one function; An executable file corresponding to the target function group is generated according to the static code library and the configuration code.

6. The method according to claim 5, It is characterized in that The generating a configuration code according to the parameter value corresponding to the at least one function comprises: Determine a first code generation template according to the target function group; The configuration code is generated according to the parameter value corresponding to the at least one function and the first code generation template.

7. The method according to any one of claims 4 to 6, It is characterized in that The functional groups are determined according to the protocol stack supported by AUTOSAR, and the target functional groups are one or more of the functional groups.

8. The method according to any one of claims 4 to 7, It is characterized in that The configuration code and the source code are codes corresponding to the AUTOSAR classic platform CP.

9. An executable file generating device, It is characterized in that including an acquisition unit and a processing unit; The acquisition unit is used to: Acquire information of a target function group, where the target function group includes at least one function defined by AUTOSAR; Obtaining source code corresponding to the target function group; The processing unit is used for: Compile the source code corresponding to the target function group into a static code library; The static code library and the configuration tool are provided to the second device, and the static code library and the configuration tool are used by the second device to generate an executable file corresponding to the target function group.

10. The device according to claim 9, It is characterized in that The functional groups are determined according to the protocol stack supported by AUTOSAR, and the target functional groups are one or more of the functional groups.

11. The device according to claim 9 or 10, It is characterized in that The static code library is binary text; the configuration tool is used to set a parameter value corresponding to at least one function in the target function group.

12. An executable file generating device, It is characterized in that including an acquisition unit and a processing unit; The acquisition unit is configured to acquire a static code library and a configuration tool provided by the first device, wherein the static code library is compiled by the first device according to source code corresponding to a target function group, wherein the target function group includes at least one function defined by AUTOSAR; The processing unit is used to generate an executable file corresponding to the target function group according to the static code library and the configuration tool.

13. The device according to claim 12, It is characterized in that The acquisition unit is further configured to acquire, through the configuration tool, a parameter value corresponding to at least one function in the target function group; The processing unit is further used for: Generate a configuration code according to a parameter value corresponding to the at least one function; An executable file corresponding to the target function group is generated according to the static code library and the configuration code.

14. The device according to claim 13, It is characterized in that The processing unit is specifically used for: Determine a first code generation template according to the target function group; The configuration code is generated according to the parameter value corresponding to the at least one function and the first code generation template.

15. The device according to any one of claims 12 to 14, It is characterized in that The functional groups are determined according to the protocol stack supported by AUTOSAR, and the target functional groups are one or more of the functional groups.

16. The device according to any one of claims 12 to 15, It is characterized in that The configuration code and the source code are both codes corresponding to the AUTOSAR CP.

17. An executable file generating device, It is characterized in that include: a processor coupled to the memory; The processor is used to execute the computer program stored in the memory so that the executable file generating device performs the method as described in any one of claims 1-3, or so that the executable file generating device performs the method as described in any one of claims 4-8.

18. A computer-readable storage medium, It is characterized in that The computer-readable storage medium includes a computer program, which, when executed on an executable file generating device, enables the executable file generating device to execute the method as claimed in any one of claims 1 to 3, or enables the executable file generating device to execute the method as claimed in any one of claims 4 to 8.