Compiling method and device based on multi-chip integration platform, equipment and medium
By identifying the target chip and a general recipe file template in a multi-chip integration platform, injecting macro definitions, and generating the target recipe file, the problems of chaotic dependency library management and cumbersome compilation and maintenance are solved, achieving automated and precise conditional compilation and improving compilation performance and flexibility.
Patent Information
- Application Number
- CN202611220437.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-12
- Publication Date
- 2026-11-24
AI Technical Summary
Traditional multi-chip integrated platforms suffer from problems such as chaotic dependency library management, cumbersome compilation and maintenance, and redundant compilation scripts, leading to frequent compilation errors and affecting the performance of conditional compilation.
By identifying the enabled target chips and general recipe file templates in the multi-chip integration platform, injecting macro definitions of the target chips, and combining them with a set of third-party libraries, the target recipe file is generated, achieving automated and precise conditional compilation at the system level.
It achieves the flexibility and scalability of conditional compilation on a multi-chip integrated platform, improves compilation performance, simplifies the compilation and maintenance process, and avoids library linking conflicts and compilation errors.
Smart Images

Figure CN123157175A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, specifically to a compilation method, apparatus, device, and medium based on a multi-chip heterogeneous platform. Background Technology
[0002] As the diverse computing power demands of various IoT devices continue to grow, more and more IoT devices will adopt multi-chip integrated platforms as their software development platforms to improve software development performance.
[0003] Currently, traditional multi-chip integration platforms typically store all third-party library files that each chip depends on in a centralized manner, and maintain independent compilation scripts for each chip. This presents the following challenges for multi-chip integration platforms: 1) The multi-chip integrated platform has a chaotic management of the dependency libraries of each chip, which may cause library linking conflicts, symbol duplication or dependency library mismatch when compiling a project using any chip; 2) Each chip in a multi-chip integrated platform requires an independent compilation script and build configuration, which makes the compilation and maintenance of the multi-chip integrated platform more complicated and results in higher maintenance costs, thus making it prone to compilation errors; 3) Each chip in a multi-chip integrated platform maintains an independent compilation script, which uses a lot of redundant conditional compilation code, resulting in poor code readability and making compilation and maintenance difficult.
[0004] This significantly impacts the conditional compilation performance of multi-chip integrated platforms. Summary of the Invention
[0005] This application provides a compilation method, apparatus, device, and medium based on a multi-chip integrated platform, which enables precise conditional compilation at the system level in the multi-chip integrated platform, ensures the flexibility of conditional compilation in the multi-chip integrated platform, enhances the scalability of conditional compilation in the multi-chip integrated platform, and improves the conditional compilation performance of the multi-chip integrated platform.
[0006] In a first aspect, embodiments of this application provide a compilation method based on a multi-chip integrated platform, the method comprising: Determine the common recipe file template for the target chips that are enabled and the projects to be compiled in the multi-chip integration platform; From the chip catalog of the target chip, determine the set of third-party libraries that the target chip depends on; The macro definition of the target chip is injected into the general recipe file template, and the target recipe file of the project to be compiled is generated based on the third-party library set. Execute the target recipe file to obtain the compiled executable file.
[0007] Secondly, embodiments of this application provide a compilation apparatus based on a multi-chip integrated platform, the apparatus comprising: The information determination module is used to determine the target chips that have been enabled in the multi-chip integration platform and the general recipe file template of the project to be compiled; A third-party library determination module is used to determine the set of third-party libraries that the target chip depends on from the chip catalog of the target chip; The recipe adaptation module is used to inject the macro definition of the target chip into the general recipe file template, and generate the target recipe file of the project to be compiled based on the third-party library set. The compilation module is used to execute the target recipe file to obtain the compiled executable file.
[0008] Thirdly, embodiments of this application provide an electronic device, which includes: A processor and a memory, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the compilation method based on a multi-chip integrated platform provided in the first aspect of this application.
[0009] Fourthly, embodiments of this application provide a computer-readable storage medium for storing a computer program that causes a computer to execute the compilation method based on a multi-chip integrated platform as provided in the first aspect of this application.
[0010] Fifthly, embodiments of this application provide a computer program product, including a computer program / instruction, which, when executed by a processor, implements the compilation method based on a multi-chip integrated platform as provided in the first aspect of this application.
[0011] The technical solution provided in this application, for a single project to be compiled, firstly determines the common recipe file template for the enabled target chip and the project to be compiled in the multi-chip integration platform, to support the sharing of recipe files between different chips in the multi-chip integration platform, simplifying the compilation and maintenance process. Then, it determines the set of third-party libraries that the target chip depends on from the chip directory of the target chip, to support the physical isolation of dependency libraries between different chips in the multi-chip integration platform, strengthening the fine-grained management of dependency libraries. Furthermore, it injects the macro definitions of the target chip into the common recipe file template, and combines it with the set of third-party libraries to generate the target recipe file for the project to be compiled and execute it, thereby obtaining the compiled executable file. This achieves automated and precise conditional compilation at the system level in the multi-chip integration platform, ensuring the flexibility of conditional compilation in the multi-chip integration platform, enhancing the scalability of conditional compilation in the multi-chip integration platform, and improving the conditional compilation performance of the multi-chip integration platform. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 A flowchart illustrating a compilation method based on a multi-chip integrated platform provided in this application embodiment; Figure 2 An exemplary schematic diagram of the chip catalog architecture provided in the embodiments of this application; Figure 3 Another exemplary schematic diagram of the chip catalog architecture provided in the embodiments of this application; Figure 4 A flowchart illustrating another compilation method based on a multi-chip integrated platform provided in this application embodiment; Figure 5 A schematic block diagram of a compilation device based on a multi-chip integrated platform provided for embodiments of this application; Figure 6 A schematic block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0014] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0015] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0016] To address the issues of chaotic dependency library management and cumbersome compilation and maintenance in traditional multi-chip integration platforms, which negatively impact the conditional compilation performance of these platforms, this application proposes a novel conditional compilation scheme based on a multi-chip integration platform. For a single project to be compiled, firstly, a common recipe file template is determined for both the target chip and the project to be compiled within the multi-chip integration platform. This supports recipe file sharing among different chips within the platform, simplifying the compilation and maintenance process. Then, the set of third-party libraries that the target chip depends on is determined from the target chip's chip directory. This supports physical isolation of dependency libraries among different chips within the multi-chip integration platform, enhancing the fine-grained management of dependency libraries. Finally, macro definitions for the target chip are injected into the common recipe file template, and combined with the third-party library set, the target recipe file for the project to be compiled is generated and executed. This yields the compiled executable file, thereby achieving automated and precise conditional compilation at the system level within the multi-chip integration platform and improving its conditional compilation performance.
[0017] Figure 1 This is a flowchart illustrating a compilation method based on a multi-chip integrated platform, as provided in this application. This method can be executed by the compilation apparatus based on the multi-chip integrated platform provided in this application. The compilation apparatus based on the multi-chip integrated platform can be implemented in any software and / or hardware manner. Exemplarily, this compilation apparatus based on the multi-chip integrated platform can be applied to any electronic device, which may include, but is not limited to, various computing devices developed using a multi-chip integrated platform. This application does not impose any restrictions on the specific type of electronic device.
[0018] Specifically, such as Figure 1 As shown, the method may include the following steps: S110, determine the common recipe file template for the target chip that has been enabled and the project to be compiled in the multi-chip integration platform.
[0019] A multi-chip integrated platform refers to a hardware solution that integrates two or more hardware chips with different functions and architectures into an electronic system to work together through shared memory, buses, or high-speed interfaces to complete complex tasks. Multi-chip integrated platforms belong to a type of heterogeneous computing platform.
[0020] It is understandable that, given the diverse computing power requirements of various electronic devices, multi-chip integrated platforms will exist as software development platforms for electronic devices, and different electronic devices will use different chips integrated in the multi-chip integrated platform to complete software development.
[0021] Moreover, multi-chip integrated platforms can support the development of various software with different functions.
[0022] Among them, the project to be compiled refers to the software project for a specific function developed by any Internet of Things device using a multi-chip integrated platform, such as the software project of a single driver monitoring system (DMS) or a single passenger monitoring system (OMS) developed in a smart cockpit.
[0023] For each project to be compiled, the overall software functional architecture and software logic required for the various chips integrated in the multi-chip integrated platform are usually the same. The only difference lies in the development characteristics under different chips due to the differences in the kernel, dependent libraries and other underlying tools of different chips.
[0024] Therefore, in order to ensure the efficiency and accuracy of conditional compilation on the multi-chip integrated platform, this application can support developers to pre-write a set of common compilation files for the overall software functional architecture and software logic that the project to be compiled needs to develop for each chip. In addition, based on the differentiated development characteristics of the project to be compiled under the differences in the underlying tools of different chips, some implementation scripts that support the differentiated development characteristics can be written in the above common compilation files. This forms a set of general compilation files applicable to each chip integrated in the multi-chip integrated platform, which serves as a general recipe file template for the project to be compiled in this application.
[0025] For example, the generic recipe file template in this application can be a Yocto recipe file.
[0026] Therefore, for a single project to be compiled, the multi-chip integration platform can accurately maintain a set of universal recipe file templates for that project to be compiled, so as to support the sharing of recipe files between different chips in the multi-chip integration platform, simplify the compilation and maintenance process, reduce maintenance costs, and ensure the accuracy of the universal recipe file templates as much as possible to prevent compilation errors.
[0027] In this application, when any electronic device uses a multi-chip integrated platform to develop a single project to be compiled, it first uses the interface layer of the multi-chip integrated platform to detect in real time the driver loading status and bus enumeration information of each chip to identify the enabled status of each chip integrated in the multi-chip integrated platform, thereby determining the enabled target chip in the multi-chip integrated platform. Therefore, the electronic device needs to use the aforementioned target chip to execute the conditional compilation process of the project to be compiled.
[0028] Furthermore, in order to ensure the efficiency and accuracy of conditional compilation on the multi-chip integrated platform, this application can also directly obtain the general recipe file template maintained by the multi-chip integrated platform for the project to be compiled, so as to execute the specific conditional compilation process in the future.
[0029] S120: Determine the set of third-party libraries that the target chip depends on from the chip catalog of the target chip.
[0030] Given that different chips rely on different third-party libraries, the projects to be compiled may require different third-party libraries for different chips. Traditional multi-chip integration platforms tend to store all the library files for each chip in a centralized and mixed manner, resulting in a chaotic dependency management problem.
[0031] To address the aforementioned issues, this application proposes a solution where a separate chip directory is created for each chip in the multi-chip integration platform within the project directory of the project to be compiled. Furthermore, each chip's chip directory contains a record of all third-party libraries it depends on, thereby achieving physical isolation of dependency libraries between different chips.
[0032] Specifically, for each chip's chip directory, this application can set the directory name of each chip's chip directory to the chip identifier, such as the chip's identification (ID). This allows for efficient indexing in the project directory of the project to be compiled by using the chip identifier of any chip, thus enabling accurate searching of the chip's dependency libraries.
[0033] In some implementations, since different chips in a multi-chip integration platform may depend on different third-party libraries, a third-party directory, such as the 3rdparts / directory, will be set up in the project directory of the project to be compiled to record the third-party libraries that each chip depends on.
[0034] Therefore, in order to ensure efficient and orderly management of dependency libraries, such as Figure 2 As shown, the third-party directory of the project to be compiled in this application can be divided into chip directories for each chip in the multi-chip integration platform, and each chip directory includes a set of third-party libraries that the chip depends on. The chip directory name for each chip can be the chip identifier of that chip, thereby implementing a chip identifier-driven physical isolation architecture for dependency libraries in the multi-chip integration platform.
[0035] In other implementations, since all the third-party libraries depended on by each chip belong to multiple types and the number of third-party libraries depended on by each chip is large, this application can also set up a corresponding layered architecture for the third-party libraries in the multi-chip integration platform according to their type to manage the third-party libraries depended on by each chip in a layered manner. This allows the multi-chip integration platform to include multiple layered dependency libraries, such as basic libraries, algorithm libraries, hardware layers, etc.
[0036] Therefore, in order to strengthen the refined and orderly management of dependency libraries, such as Figure 3 As shown, the project to be compiled in this application can be divided into chip directories for each chip in the multi-chip integration platform under the third-party directory of each layered dependency library, and each chip directory includes a set of third-party libraries that the chip depends on and that correspond to the layered dependency library. Therefore, based on the chip identifier-driven physical isolation architecture of the dependency library in the multi-chip integration platform, it further supports layered management of the dependency library in the multi-chip integration platform, so that independent updates of the dependency libraries of each chip can be performed under each layered dependency library.
[0037] Under the aforementioned chip identifier-driven dependency library physical isolation architecture, the set of third-party libraries that each chip depends on can be efficiently managed through the chip directory of each chip. Therefore, when a corresponding chip is added to the multi-chip integration platform, this application can also add a chip directory for the new chip under the third-party directory for any newly added chip in the multi-chip integration platform, and configure the set of third-party libraries that the new chip depends on in the chip directory of the new chip.
[0038] Specifically, for any new chip added to the multi-chip integration platform, this application first identifies all third-party libraries that the new chip depends on and compiles them into a set of third-party libraries that the new chip depends on. Then, it locates the designated third-party directory in the project directory of the project to be compiled, adds a subdirectory under the third-party directory, and uses the chip identifier of the new chip as the directory name of this subdirectory, making this subdirectory the chip directory of the new chip. Furthermore, it configures the set of third-party libraries that the new chip depends on in the chip directory of the new chip to support conditional compilation of the project to be compiled for the new chip, ensuring the flexibility of conditional compilation on the multi-chip integration platform and enhancing its scalability.
[0039] In summary, after identifying the target chip that has been enabled in the multi-chip integration platform, this application can directly use the chip identifier of the target chip to quickly locate the chip directory of the target chip from the project directory of the project to be compiled, and find all the third-party libraries that the target chip depends on in the chip directory to form the third-party library set in this application, so as to achieve accurate conditional compilation of the multi-chip integration platform in the future.
[0040] S130 injects the macro definitions of the target chip into the general recipe file template and generates the target recipe file of the project to be compiled based on the third-party library set.
[0041] To ensure accurate conditional compilation of the project by the multi-chip integration platform, after determining the enabled target chip and the common recipe file template of the project to be compiled in the multi-chip integration platform, this application can define a macro value for the target chip as its macro definition. Then, the macro definition of the target chip is automatically injected into the aforementioned common recipe file template to determine the effective code in the template.
[0042] Furthermore, while knowing the effective code in the aforementioned general recipe file template, it is also possible to make differentiated configurations for each third-party library in the set of third-party libraries that the target chip depends on in the aforementioned general recipe file template. This allows the use of the effective code in the aforementioned general recipe file template and the configuration information of the third-party libraries that the target chip depends on to generate the target recipe file for the project to be compiled, so that the target recipe file is highly adapted to the compilation requirements of the project to be compiled under the target chip.
[0043] S140, execute the target recipe file to obtain the compiled executable file.
[0044] After obtaining the target recipe file of the project to be compiled, this application can directly use a compiler to execute the target recipe file to convert the source code in the target recipe file into executable binary instructions, thereby obtaining the compiled executable file and realizing automated and precise conditional compilation at the system level in a multi-chip integrated platform.
[0045] The technical solution provided in this application, for a single project to be compiled, firstly determines the common recipe file template for the enabled target chip and the project to be compiled in the multi-chip integration platform, to support the sharing of recipe files between different chips in the multi-chip integration platform, simplifying the compilation and maintenance process. Then, it determines the set of third-party libraries that the target chip depends on from the chip directory of the target chip, to support the physical isolation of dependency libraries between different chips in the multi-chip integration platform, strengthening the fine-grained management of dependency libraries. Furthermore, it injects the macro definitions of the target chip into the common recipe file template, and combines it with the set of third-party libraries to generate the target recipe file for the project to be compiled and execute it, thereby obtaining the compiled executable file. This achieves automated and precise conditional compilation at the system level in the multi-chip integration platform, ensuring the flexibility of conditional compilation in the multi-chip integration platform, enhancing the scalability of conditional compilation in the multi-chip integration platform, and improving the conditional compilation performance of the multi-chip integration platform.
[0046] As an optional implementation scheme in this application, in order to ensure automated and accurate conditional compilation at the system level in a multi-chip integrated platform, this application can provide a detailed explanation of the specific generation process of the target recipe file of the project to be compiled.
[0047] Figure 4A flowchart of another compilation method based on a multi-chip integrated platform provided in this application embodiment is shown below. Figure 4 As shown, the method may specifically include the following steps: S410 identifies the generic recipe file template for the target chips that are enabled and the projects to be compiled in the multi-chip integration platform.
[0048] S420 determines the path to the target chip's dependent libraries based on the target chip's chip catalog.
[0049] After identifying the target chip enabled in the multi-chip integration platform, this application can directly use the target chip's chip identifier to index third-party directories in the project directory of the project to be compiled, so as to quickly locate the target chip's chip directory from the third-party directories. Then, by querying the various third-party libraries recorded in the target chip's chip directory, and combining the chip directory and its hierarchical directories, the path of the target chip's dependent libraries is determined, so as to accurately obtain the various third-party libraries that the target chip depends on in the subsequent process.
[0050] S430, passing dependency library paths to determine the set of third-party libraries that the target chip depends on.
[0051] After determining the dependency library paths of the target chip, this application can pass the dependency library paths of the target chip to the compiler through CMake variables, so that the compiler can accurately and quickly find the various third-party libraries that the target chip depends on based on the dependency library paths, thereby determining the set of third-party libraries that the target chip depends on, so as to achieve accurate conditional compilation of the multi-chip integration platform in the future.
[0052] S440 injects the target chip's macro definition into the general recipe file template to obtain the first recipe file of the project to be compiled.
[0053] To ensure accurate conditional compilation of the project by the multi-chip integration platform, after determining the enabled target chip and the general recipe file template of the project to be compiled in the multi-chip integration platform, this application can define a macro value for the target chip as its macro definition. Then, the macro definition of the target chip is automatically injected into the aforementioned general recipe file template via a MACHINE variable to obtain the first recipe file of the project to be compiled. At this point, the macro definition of the target chip in the first recipe file can indicate which code segment in the first recipe file is effective, so that the effective code in the first recipe file can be compiled subsequently, thus ensuring the accuracy of conditional compilation by the multi-chip integration platform.
[0054] S450, based on the package configuration items in the first recipe file, configures the on / off state of each third-party library in the third-party library set to obtain the target recipe file of the project to be compiled.
[0055] It is understandable that different chips in a multi-chip integrated platform will depend on different third-party libraries. Therefore, the above-mentioned general recipe file template will set up a package configuration mechanism to flexibly enable or disable the optional functions of the project to be compiled under different chips according to the different chip requirements, so as to avoid maintaining multiple recipe files for the slight differences between different chips.
[0056] Therefore, after injecting the target chip's macro definition into the aforementioned general recipe file template to obtain the first recipe file of the project to be compiled, this application can use the package configuration items in the first recipe file to configure each third-party library in the set of third-party libraries that the target chip depends on to be enabled, while the third-party libraries that other chips depend on are disabled. This allows the package configuration mechanism in the recipe file to efficiently manage the optional dependencies of the project to be compiled under different chips, thereby generating the target recipe file of the project to be compiled, making the target recipe file highly compatible with the compilation requirements of the project to be compiled under the target chip.
[0057] S460, execute the target recipe file to obtain the compiled executable file.
[0058] The technical solution provided in this application, for a single project to be compiled, firstly determines the common recipe file template for the enabled target chip and the project to be compiled in the multi-chip integration platform, to support the sharing of recipe files between different chips in the multi-chip integration platform, simplifying the compilation and maintenance process. Then, it determines the set of third-party libraries that the target chip depends on from the chip directory of the target chip, to support the physical isolation of dependency libraries between different chips in the multi-chip integration platform, strengthening the fine-grained management of dependency libraries. Furthermore, it injects the macro definitions of the target chip into the common recipe file template, and combines it with the set of third-party libraries to generate the target recipe file for the project to be compiled and execute it, thereby obtaining the compiled executable file. This achieves automated and precise conditional compilation at the system level in the multi-chip integration platform, ensuring the flexibility of conditional compilation in the multi-chip integration platform, enhancing the scalability of conditional compilation in the multi-chip integration platform, and improving the conditional compilation performance of the multi-chip integration platform.
[0059] Figure 5 This is a schematic block diagram of a compilation device based on a multi-chip integrated platform, provided as an embodiment of this application. Figure 5 As shown, the device 500 may include: Information determination module 510 is used to determine the common recipe file template of the target chip that has been enabled in the multi-chip integration platform and the project to be compiled; The third-party library determination module 520 is used to determine the set of third-party libraries that the target chip depends on from the chip catalog of the target chip; The recipe adaptation module 530 is used to inject the macro definition of the target chip into the general recipe file template, and generate the target recipe file of the project to be compiled based on the third-party library set. The compilation module 540 is used to execute the target recipe file to obtain the compiled executable file.
[0060] In some implementations, the third-party directory of the project to be compiled contains a chip directory for each chip in the multi-chip integration platform, and the chip directory for each chip includes a set of third-party libraries that the chip depends on.
[0061] In some implementations, the project to be compiled has a chip directory for each chip in the multi-chip integration platform under the third-party directory of each layered dependency library, and the chip directory of each chip includes a set of third-party libraries that the chip depends on and that correspond to the layered dependency library.
[0062] In some implementations, the compilation apparatus 500 based on a multi-chip integrated platform may also include a new chip configuration module. This new chip configuration module can be used for: For any new chip added to the multi-chip integration platform, a chip directory for the new chip is added to the third-party directory, and the set of third-party libraries that the new chip depends on is configured in the chip directory of the new chip.
[0063] In some implementations, the third-party library determines module 520, which can be specifically used for: Based on the chip catalog of the target chip, determine the dependent library paths of the target chip; The dependency library path is passed to determine the set of third-party libraries that the target chip depends on.
[0064] In some implementations, the recipe adaptation module 530 can be specifically used for: The macro definition of the target chip is injected into the general recipe file template to obtain the first recipe file of the project to be compiled; Based on the package configuration items in the first recipe file, the on / off state of each third-party library in the third-party library set is configured to obtain the target recipe file of the project to be compiled.
[0065] In this embodiment, for a single project to be compiled, firstly, a common recipe file template for the target chip already enabled in the multi-chip integration platform and the project to be compiled is determined to support the sharing of recipe files between different chips in the multi-chip integration platform, simplifying the compilation and maintenance process. Then, the set of third-party libraries that the target chip depends on is determined from the chip directory of the target chip to support physical isolation of dependency libraries between different chips in the multi-chip integration platform, strengthening the fine-grained management of dependency libraries. Furthermore, the macro definitions of the target chip are injected into the common recipe file template, and combined with the set of third-party libraries, the target recipe file of the project to be compiled is generated and executed, thus obtaining the compiled executable file. This achieves automated and precise conditional compilation at the system level in the multi-chip integration platform, ensuring the flexibility of conditional compilation in the multi-chip integration platform, enhancing the scalability of conditional compilation in the multi-chip integration platform, and improving the conditional compilation performance of the multi-chip integration platform.
[0066] It should be understood that the device embodiments and method embodiments can correspond to each other, and similar descriptions can be referred to the method embodiments. To avoid repetition, further details will not be provided here. Specifically, Figure 5 The apparatus 500 shown can execute any of the method embodiments provided in this application, and the foregoing and other operations and / or functions of each module in the apparatus 500 are respectively for implementing the corresponding processes in the various methods of the embodiments of this application. For the sake of brevity, they will not be described in detail here.
[0067] The apparatus 500 of this application embodiment has been described above from the perspective of functional modules in conjunction with the accompanying drawings. It should be understood that this functional module can be implemented in hardware, in software instructions, or in a combination of hardware and software modules. Specifically, the steps of the method embodiments in this application can be completed by integrated logic circuits in the processor's hardware and / or by software instructions. The steps of the method disclosed in this application embodiment can be directly embodied as being executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. Optionally, the software module can reside in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps in the above method embodiments.
[0068] Figure 6 A schematic block diagram of an electronic device provided in an embodiment of this application.
[0069] like Figure 6 As shown, the electronic device 600 may include: The system includes a memory 610 and a processor 620. The memory 610 stores computer programs and transfers the program code to the processor 620. In other words, the processor 620 can retrieve and run the computer program from the memory 610 to implement the methods described in the embodiments of this application.
[0070] For example, the processor 620 can be used to execute the above-described method embodiments according to instructions in the computer program.
[0071] In some embodiments of this application, the processor 620 may include, but is not limited to: General-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0072] In some embodiments of this application, the memory 610 includes, but is not limited to: Volatile memory and / or non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).
[0073] In some embodiments of this application, the computer program may be divided into one or more modules, which are stored in the memory 610 and executed by the processor 620 to perform the method provided in this application. The one or more modules may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the electronic device.
[0074] like Figure 6 As shown, the electronic device may also include: Transceiver 630, which can be connected to processor 620 or memory 610.
[0075] The processor 620 can control the transceiver 630 to communicate with other devices; specifically, it can send information or data to other devices or receive information or data sent by other devices. The transceiver 630 may include a transmitter and a receiver. The transceiver 630 may further include antennas, and the number of antennas may be one or more.
[0076] It should be understood that the various components in the electronic device are connected through a bus system, which includes a data bus, a power bus, a control bus, and a status signal bus.
[0077] This application also provides a computer storage medium storing a computer program thereon, which, when executed by a computer, enables the computer to perform the methods of the above-described method embodiments. Alternatively, this application also provides a computer program product containing instructions that, when executed by a computer, cause the computer to perform the methods of the above-described method embodiments.
[0078] When implemented using software, it can be implemented entirely or partially as a computer program product. This computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital video disc (DVD)), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0079] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0080] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.
[0081] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. For example, the functional modules in the various embodiments of this application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0082] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A compilation method based on a multi-chip integrated platform, characterized in that, include: Determine the common recipe file template for the target chips that are enabled and the projects to be compiled in the multi-chip integration platform; From the chip catalog of the target chip, determine the set of third-party libraries that the target chip depends on; The macro definition of the target chip is injected into the general recipe file template, and the target recipe file of the project to be compiled is generated based on the third-party library set. Execute the target recipe file to obtain the compiled executable file.
2. The method according to claim 1, characterized in that, The third-party directory of the project to be compiled contains a chip directory for each chip in the multi-chip integration platform, and the chip directory for each chip includes a set of third-party libraries that the chip depends on.
3. The method according to claim 2, characterized in that, The project to be compiled has a chip directory for each chip in the multi-chip integration platform under the third-party directory of each layered dependency library, and the chip directory of each chip includes a set of third-party libraries that the chip depends on and that correspond to the layered dependency library.
4. The method according to claim 2 or 3, characterized in that, The method further includes: For any new chip added to the multi-chip integration platform, a chip directory for the new chip is added to the third-party directory, and the set of third-party libraries that the new chip depends on is configured in the chip directory of the new chip.
5. The method according to claim 1, characterized in that, Determining the set of third-party libraries that the target chip depends on from the chip catalog of the target chip includes: Based on the chip catalog of the target chip, determine the dependent library paths of the target chip; The dependency library path is passed to determine the set of third-party libraries that the target chip depends on.
6. The method according to claim 1, characterized in that, The step of injecting the macro definition of the target chip into the general recipe file template and generating the target recipe file of the project to be compiled based on the third-party library set includes: The macro definition of the target chip is injected into the general recipe file template to obtain the first recipe file of the project to be compiled; Based on the package configuration items in the first recipe file, the on / off state of each third-party library in the third-party library set is configured to obtain the target recipe file of the project to be compiled.
7. A compilation device based on a multi-chip integrated platform, characterized in that, include: The information determination module is used to determine the target chips that have been enabled in the multi-chip integration platform and the general recipe file template of the project to be compiled; A third-party library determination module is used to determine the set of third-party libraries that the target chip depends on from the chip catalog of the target chip; The recipe adaptation module is used to inject the macro definition of the target chip into the general recipe file template, and generate the target recipe file of the project to be compiled based on the third-party library set. The compilation module is used to execute the target recipe file to obtain the compiled executable file.
8. An electronic device, characterized in that, include: A processor and a memory, the memory being used to store a computer program, and the processor being used to call and run the computer program stored in the memory to execute the compilation method based on a multi-chip integrated platform as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, Used to store computer programs that cause a computer to execute a compilation method based on a multi-chip integrated platform as described in any one of claims 1-6.
10. A computer program product, characterized in that, It includes a computer program / instruction that, when executed by a processor, implements the compilation method based on a multi-chip integrated platform as described in any one of claims 1-6.
