Link table generation method and device, equipment, vehicle and storage medium

By automating the processing of target source code files and chip memory information to generate a link table, the problem of low efficiency and high error rate in link table generation in existing technologies is solved. This achieves efficient and reliable link table generation and maintenance, improving the efficiency and maintainability of automotive embedded software development.

CN123138247APending Publication Date: 2026-11-20AUTOCHIPS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611355625.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-02
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

In automotive embedded software development, existing technologies rely on manual analysis of code segment attributes and memory boundaries, resulting in low efficiency and high error rate in link table generation, and difficulty in maintaining configuration reliability when switching chip models or adapting multiple toolchains.

Method used

By extracting the segment list from the target source code file and the memory information of the target chip, an intermediate model is established, and the target link table is generated by format conversion based on the link table target list, thus realizing an automated link table generation process.

Benefits of technology

It improves the efficiency of linked list generation, reduces the configuration error rate, enhances the efficiency, reliability, and maintainability of embedded software development, ensures the synchronized updates of linked lists with code and hardware, reduces maintenance costs, and improves the consistency of team collaboration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123138247A_ABST
    Figure CN123138247A_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a kind of link table generation method, device, equipment, vehicle and storage medium, involve software development technical field.The method comprises: extracting the segment list of target source code file and the memory information of target chip, and determining at least one link table target list;At least one segment information in segment list and the configuration information of at least one memory in memory information are matched, and intermediate model is obtained;According to link table target list, the format conversion of intermediate model is carried out, and the context information corresponding to link table target list is obtained;According to the context information corresponding to link table target list, the target link table corresponding to link table target list is generated.The method can improve the efficiency of link table generation, and then significantly improve the efficiency, reliability and maintainability of vehicle embedded software development.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of software development technology, and in particular to a method, apparatus, device, vehicle, and storage medium for generating linked lists. Background Technology

[0002] In automotive embedded software development, a linker script is typically written based on the information of each segment of the program and the memory layout of the target chip to complete the linking of target files and address allocation.

[0003] In related technologies, this type of link table generation method mainly relies on manual analysis of code segment attributes, memory boundaries, and compiler syntax differences. When adjusting the code structure, switching chip models, or adapting multiple toolchains, it is necessary to repeatedly modify the address allocation and configuration content, which can easily lead to address conflicts, format errors, or improper region configuration, resulting in a decrease in build efficiency and configuration reliability.

[0004] Therefore, how to improve the efficiency of linked list generation and reduce the configuration error rate in embedded development has become a technical problem that needs to be solved. Summary of the Invention

[0005] This application provides a method, apparatus, device, vehicle, and storage medium for generating linked lists, which can improve the efficiency of linked list generation, thereby significantly improving the efficiency, reliability, and maintainability of vehicle-mounted embedded software development.

[0006] Firstly, this application provides a method for generating a linked table, including:

[0007] Extract the segment list from the target source code file and the memory information of the target chip, and determine at least one linked list target list;

[0008] At least one segment information in the segment list is matched with the configuration information of at least one memory in the memory information to obtain an intermediate model; wherein, the intermediate model includes the configuration information of the memory matched for each segment information;

[0009] Based on the target list of the link table, the intermediate model is format-converted to obtain the context information corresponding to the target list of the link table; wherein, the context information includes the text content that the link table corresponding to the target list of the link table can recognize;

[0010] Based on the context information corresponding to the target list of the linked table, a target linked table is generated corresponding to the target list of the linked table.

[0011] In one possible implementation, matching at least one segment information in the segment list with the configuration information of at least one memory in the memory information to obtain an intermediate model includes:

[0012] At least one segment information in the segment list is classified to obtain a classification result; wherein, the classification result includes the name, category, address information of the memory to which each segment information belongs, initialization method and retention attribute of each segment information;

[0013] The intermediate model is constructed based on the classification results and the configuration information of at least one memory in the memory information.

[0014] In one possible implementation, classifying at least one segment information in the segment list to obtain a classification result includes:

[0015] According to the priority of each classification rule, rule matching is performed on each segment information to obtain a matching result; wherein, the matching result includes the matching order of each classification rule corresponding to each segment information;

[0016] Based on the matching result, the at least one segment information is classified to obtain the classification result.

[0017] In one possible implementation, constructing the intermediate model based on the classification results and configuration information of at least one memory in the memory information includes:

[0018] Based on the classification results and the configuration information of at least one memory in the memory information, each segment information is matched and recorded to obtain the recording result of each segment information;

[0019] Boundary checks and overlap checks are performed on the address range in the recorded results of the segment information to obtain the verification results of the segment information;

[0020] If the verification result of the segment information indicates that the segment information has passed the verification, the intermediate model is generated based on the recording result of the at least one segment information.

[0021] In one possible implementation, the list of segments extracted from the target source code file includes:

[0022] Read the target source code file; wherein the target source code file includes project source code, compilation configuration, and generated target files;

[0023] Based on the parsing tool, at least one segment information is extracted from the target source code file; wherein, the segment information includes name, attributes, size, source file, load address reference, and runtime address reference;

[0024] The at least one segment information is further identified to obtain the segment list.

[0025] In one possible implementation, generating the target link table corresponding to the target link table list based on the context information corresponding to the target link table list includes:

[0026] Based on the context information corresponding to the target list of the linked table, the template corresponding to the target list of the linked table is converted to obtain the generated file corresponding to the target list of the linked table;

[0027] The generated file is inspected to obtain the inspection result of the generated file;

[0028] If the inspection result of the generated file indicates that the generated file has passed the inspection, a target link table and a generated list corresponding to the target list of the link table are generated based on the generated file and the inspection result of the generated file; wherein, the generated list includes target type, template version, verification result and failure reason.

[0029] In one possible implementation, the memory information includes configuration information for at least one memory; the configuration information includes, but is not limited to: name, starting address, length, attributes, and reserved area;

[0030] And / or, the target list of the linked table includes, but is not limited to: target format, template name, output extension and verification method.

[0031] In one possible implementation, the method further includes:

[0032] The target linked list corresponding to the target linked list is output to the directory corresponding to the target linked list to obtain the linked list file corresponding to the target linked list; wherein, the linked list file includes the input model, template version, output file path, file hash and verification result;

[0033] Based on the link table file corresponding to the target list in the link table, a verification report corresponding to the link table file is generated; wherein, the verification report includes classification results, address check results, template generation results, and error information;

[0034] Write the link table path in the link table file into the target development environment to generate the target script;

[0035] Generate and display a script report of the target script; wherein the script report includes memory usage, segment address records, stack safety margin, and special reserved areas;

[0036] Generate a generation record for the target script; wherein the generation record includes a segment list of the target source code file, memory information of the target chip, a list of at least one linked list target, the intermediate model, each of the target linked lists, and the verification report.

[0037] Secondly, this application provides a linked list generation apparatus, comprising:

[0038] The determination module is used to extract the segment list of the target source code file and the memory information of the target chip, and to determine at least one link table target list;

[0039] A matching module is used to match at least one segment information in the segment list with the configuration information of at least one memory in the memory information to obtain an intermediate model; wherein, the intermediate model includes the configuration information of the memory matched for each segment information;

[0040] The conversion module is used to perform format conversion on the intermediate model according to the target list of the link table to obtain the context information corresponding to the target list of the link table; wherein, the context information includes the text content that the link table corresponding to the target list of the link table can recognize;

[0041] The generation module is used to generate the target link table corresponding to the target link table list based on the context information corresponding to the target link table list.

[0042] In one possible implementation, the matching module is specifically used to: classify at least one segment information in the segment list to obtain a classification result; wherein the classification result includes the name, category, address information of the memory to which each segment information belongs, initialization method, and retention attribute of the segment information; and construct the intermediate model based on the classification result and the configuration information of at least one memory in the memory information.

[0043] In one possible implementation, the matching module is further configured to: perform rule matching on each segment information according to the priority of each classification rule to obtain a matching result; wherein the matching result includes the matching order of each classification rule corresponding to each segment information; and perform classification processing on the at least one segment information according to the matching result to obtain the classification result.

[0044] In one possible implementation, the matching module is further configured to: match and record each segment information according to the classification result and the configuration information of at least one memory in the memory information to obtain a recording result for each segment information; perform boundary verification and overlap verification on the address range in the recording result of the segment information to obtain a verification result for the segment information; if it is determined that the verification result of the segment information indicates that the segment information verification is passed, generate the intermediate model according to the recording result of the at least one segment information.

[0045] In one possible implementation, the determining module is specifically configured to: read the target source code file; wherein the target source code file includes project source code, compilation configuration, and generated target files; extract at least one segment information from the target source code file based on a parsing tool; wherein the segment information includes name, attributes, size, source file, load address reference, and runtime address reference; and supplement the at least one segment information to obtain the segment list.

[0046] In one possible implementation, the generation module is specifically configured to: perform format conversion on the template corresponding to the target list of the link table according to the context information corresponding to the target list of the link table, to obtain a generated file corresponding to the target list of the link table; check the generated file to obtain a check result of the generated file; if it is determined that the check result of the generated file indicates that the generated file has passed the check, generate a target link table and a generated list corresponding to the target list of the link table according to the generated file and the check result of the generated file; wherein, the generated list includes target type, template version, verification result and failure reason.

[0047] In one possible implementation, the memory information includes configuration information for at least one memory; the configuration information includes, but is not limited to: name, starting address, length, attributes, and reserved area; and / or, the linked table target list includes, but is not limited to: target format, template name, output extension, and verification method.

[0048] In one possible implementation, the apparatus is further configured to: output the target link table corresponding to the target link table list to the directory corresponding to the target link table list, to obtain a link table file corresponding to the target link table list; wherein the link table file includes an input model, a template version, an output file path, a file hash, and a verification result; generate a verification report corresponding to the link table file based on the link table file corresponding to the target link table list; wherein the verification report includes a classification result, an address check result, a template generation result, and error information; write the link table path in the link table file into the target development environment to generate a target script; generate and display a script report of the target script; wherein the script report includes memory usage, segment address records, stack safety margin, and special reserved areas; generate a generation record of the target script; wherein the generation record includes a segment list of the target source code file, memory information of the target chip, at least one target link table list, the intermediate model, each target link table, and the verification report.

[0049] Thirdly, this application provides an electronic device, including: a memory and a processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, causing the processor to perform the first aspect and / or various possible embodiments of the first aspect as described above.

[0050] Fourthly, this application provides a vehicle, the vehicle including a vehicle body and electronic devices disposed in the vehicle body; the electronic devices are used to implement the first aspect and / or various possible embodiments of the first aspect.

[0051] Fifthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible embodiments of the first aspect.

[0052] In a sixth aspect, this application provides a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.

[0053] The link table generation method, apparatus, device, vehicle, and storage medium provided in this application, by extracting the segment list of the target source code file and the memory information of the target chip, and determining at least one link table target list, can provide a unified and complete data foundation for link table generation. By matching at least one segment information with the configuration information of at least one memory, an intermediate model containing the memory configuration information corresponding to each segment is obtained, which can establish a clear association between segment allocation and memory configuration. Furthermore, by performing format conversion on the intermediate model according to the link table target list, the context information that the link table can recognize is obtained, and the corresponding target link table is generated accordingly. This can improve the link table generation efficiency and reduce the configuration error rate such as address conflicts, format errors, or improper region configuration, thereby improving the build reliability and multi-scenario adaptability in embedded development. Attached Figure Description

[0054] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0055] Figure 1 This application provides an illustration of an application scenario.

[0056] Figure 2 A flowchart illustrating a linked table generation method provided in an embodiment of this application;

[0057] Figure 3 A flowchart illustrating another link table generation method provided in an embodiment of this application;

[0058] Figure 4 A timing diagram illustrating a linked table generation process provided in an embodiment of this application;

[0059] Figure 5 A timing diagram of another link table generation process provided for an embodiment of this application;

[0060] Figure 6 This is a schematic diagram of the structure of a link table generation device provided in an embodiment of this application;

[0061] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0062] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0063] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0064] It should be noted that this application can be used in the field of software development technology, or in any field other than software development technology, such as the field of embedded software debugging and intelligent development tools. The application field of this application is not limited.

[0065] This application is applicable to MCUs or processors based on Advanced RISC Machines (ARM) architectures (such as Cortex-M / A), AUTOSAR software platforms, Free Real-Time Operating Systems (FreeRTOS) systems, bare-metal MCU systems, and automotive-grade MCU firmware development environments. It is also applicable to processors based on Reduced Instruction Set Computer (RISC) performance optimization with Enhanced RISC – Performance Computing (PowerPC) or other architectures. It is particularly suitable for scenarios involving automatic analysis, automatic repair, and automatic verification of problems such as hard faults, watchdog resets, bus faults, task stack overflows, deadlocks, peripheral anomalies, and bus communication anomalies.

[0066] For example, Figure 1 This application provides an illustration of an application scenario, such as... Figure 1 As shown, in the scenario of building in-vehicle embedded software, a linker table for the target in-vehicle program is written and provided to the linker to link the compiled target files into the final executable target in-vehicle program.

[0067] In the above scenario, the linker table is usually manually written by developers based on the various sections defined in the source code (such as code segment .text, data segment .data, uninitialized data segment .bss, etc.) and the size and address space distribution of the target chip's memory (Read-Only Memory (ROM) / Random Access Memory (RAM)). After writing, it is provided to the linker to link the compiled object files into the final executable program.

[0068] However, the above method relies on developers to manually generate the linked table, which has problems such as low efficiency in generating the linked table, high error rate, and difficulty in maintenance.

[0069] Based on the above-mentioned technical problems, the link table generation method provided in this application establishes a unified data carrying method around the link table generation process, puts the segment list in the source code, the memory information of the target chip, and the target link table requirements into the same processing link, and then matches the segment information with the memory configuration information to form an intermediate model. Then, it completes the format conversion according to different link table target lists to obtain the corresponding linker-recognizable text content and generate the target link table, thereby improving the link table generation efficiency and reducing the configuration error rate.

[0070] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0071] Figure 2 This is a flowchart illustrating a linked table generation method provided in an embodiment of this application, as shown below. Figure 2 As shown, the method includes:

[0072] 201. Extract the segment list of the target source code file and the memory information of the target chip, and determine at least one link table target list.

[0073] For example, in this embodiment, this step is executed by a link table generation program in the build environment. The execution subject in this embodiment can be an electronic device, hereinafter referred to as the device. The device can extract segment lists and memory information based on project files, compilation output information, chip configuration data, or project configuration data, and determine at least one link table target list in combination with the current toolchain identifier, output file type, or project target configuration item.

[0074] The segment list is used to represent the set of segments participating in the linking allocation, and may include one or more of the following: segment name, segment attributes, segment size, load-related information, and runtime-related information; memory information is used to represent the address space configuration in the target chip that can be referenced by the linker, and may include one or more of the following: memory name, address information, capacity, access attributes, and reserved area information; the link table target list is used to represent the target format, target linker, or target project output type that the link table to be generated needs to adapt to.

[0075] If the same list needs to be adapted to multiple target objects, the program can create corresponding linked list target lists for different target objects. Based on the above analysis, this step gathers relevant source code segment information, chip memory constraints, and target linked list output requirements into a unified processing entry point, providing input for subsequent matching and conversion. It should be understood that the above example is for demonstration purposes only and is not a limitation.

[0076] 202. Match at least one segment information in the segment list with the configuration information of at least one memory in the memory information to obtain an intermediate model; wherein, the intermediate model includes the configuration information of the memory matched by each segment information.

[0077] For example, the segment list includes at least one segment information, which may include relevant information reflecting segment characteristics. The memory information includes configuration information for at least one memory, which may include relevant information reflecting memory allocability. The device can match at least one segment information in the segment list with the configuration information of at least one memory in the memory information to establish a correspondence between the extracted segment information and chip address resources. Specifically, during matching, the device can generate a program based on a link table, establish a correspondence between segments and memories based on the segment information and memory configuration information, and write the matching result into an intermediate model. The intermediate model is stored in a structured data format, and each record includes at least a segment identifier and the identifier or memory configuration information of the target memory corresponding to that segment. If a segment has multiple associated information, the intermediate model can record the relevant configuration information corresponding to that segment and associate them through a unified identifier. If multiple segments are matched to the same memory, the intermediate model records the matching relationship accordingly. Based on the above analysis, it can be seen that the intermediate model formed in this step contains the matching relationship between segments and memories, enabling subsequent processing to perform conversions based on this matching relationship. It should be understood that the above example is only illustrative and not limiting.

[0078] 203. Based on the target list of the link table, perform format conversion on the intermediate model to obtain the context information corresponding to the target list of the link table; wherein, the context information includes the text content that the link table corresponding to the target list of the link table can recognize.

[0079] For example, the device determines the corresponding conversion method based on each linked list target list and transcribes the fields in the intermediate model into the corresponding format. Specifically, during the conversion, the program reads the memory records and segment mapping records in the intermediate model and generates the context information corresponding to the linked list target list according to the format requirements. This context information can be understood as a collection of text fragments or a complete text buffer already organized according to the target linked list syntax, including text information related to memory descriptions, segment placement descriptions, address expressions, or other linked list syntax content.

[0080] During the specific conversion, the device reads the memory records and segment mapping records from the intermediate model and generates the corresponding text content according to the format requirements of the target list. If the same intermediate model needs to generate text corresponding to multiple target lists, the program performs the conversion separately to output multiple contextual information. Based on the above analysis, this step achieves the mapping from the intermediate model to the text content of a specific target link table. The key is to convert segment information, memory information, and matching relationships into contextual content that the target toolchain can recognize. It should be understood that the above example is for demonstration purposes only and is not limiting.

[0081] 204. Generate the target linked table corresponding to the target linked table list based on the context information corresponding to the target linked table list.

[0082] For example, after obtaining the context information corresponding to each link list target list, the device generates a corresponding target link list based on the corresponding target list; when there are multiple link list target lists, multiple target link lists can be generated separately. The target link list is a text file that can be read by the target linker, and its output format can be determined by the link list target list.

[0083] The target link table contains a textualized correspondence between segments and memory configuration information, which is directly organized from context information. Based on the above analysis, by generating output from the context information, the processing results obtained in the preceding steps can be transformed into a link table file usable by the target toolchain, forming a processing chain from segment extraction and memory matching to link table output. It should be understood that the above example is merely illustrative and not limiting.

[0084] In one example, a dynamic closed-loop system for embedded debugging skills based on runtime feedback, designed for automotive-grade MCU development environments, firstly scans the source code using tools to automatically extract all sections that need to be linked. Secondly, it obtains key information such as the size and starting address of the target chip's ROM and RAM through scripts or configuration files. Then, according to preset section classification rules (such as according to section name conventions), the extracted sections are automatically allocated to the chip's ROM or RAM storage areas, and specific addresses are calculated and allocated. Finally, based on this information, a complete link table is automatically generated, which can further drive the linker to generate an executable program.

[0085] This embodiment provides a linked list generation method. By incorporating the segment list, target chip memory information, and linked list target requirements into a unified processing chain, an intermediate model corresponding to the segment-memory matching relationship is formed. Then, format conversion and file generation are completed based on different target lists, enabling automatic generation of the target linked list. Specifically, by automating the extraction of section information, the acquisition of chip information, address allocation, and linked list generation, the tedious and repetitive information collection and calculation work that originally required manual work is automatically completed by a computer program. This significantly shortens the development cycle and greatly reduces the time and effort developers spend manually writing and maintaining linked lists, improving development efficiency. Based on the higher accuracy and consistency of computer programs in information processing and calculation, the program can strictly follow preset rules to automatically generate linked lists, reducing spelling errors, address conflicts, and size calculation errors that may occur when manually writing linked lists, thus improving the correctness of the linked lists and reducing the impact of linked list errors. This reduces the error rate and addresses issues such as program malfunctions and crashes caused by errors. When the source code or chip model changes, simply rerunning the automated process generates an updated link table. This automation eliminates manual tracking and modification, making change responses faster and more reliable, reducing link table maintenance costs, ensuring synchronized updates between the link table and the code and hardware, and enhancing maintainability. Generating link tables based on unified rules and templates avoids inconsistencies in link table styles due to individual habits, facilitating team collaboration and code review. It ensures consistency in format and configuration of link tables used by different projects and developers, thereby improving development standardization and consistency.

[0086] Figure 3 A flowchart illustrating another link table generation method provided in this application embodiment is shown below. Figure 3 As shown, the method includes:

[0087] 301. Extract the segment list of the target source code file and the memory information of the target chip, and determine at least one link table target list.

[0088] For example, this step can be referred to as step 201, which will not be repeated here.

[0089] In one possible implementation, extracting the segment list of the target source code file in step 301 includes the following steps:

[0090] The first step is to read the target source code file, which includes the project source code, compilation configuration, and the generated target files.

[0091] The second step involves using a parsing tool to extract at least one segment information from the target source code file. This segment information includes the name, attributes, size, source file, load address reference, and runtime address reference.

[0092] The third step is to supplement and identify at least one segment information to obtain a segment list.

[0093] Specifically, after reading the target source code file, the parsing tool performs association parsing on the project source code, compilation configuration, and target file, and extracts at least one segment information from the target file. The segment information includes at least a name, attributes, size, source file, load address reference, and runtime address reference. The name identifies the logical category of the segment; attributes characterize whether the segment is readable, writable, executable, or an initialized data segment; the size characterizes the storage space occupied by the segment; the source file indicates which source file or compilation unit generated the segment; the load address reference characterizes the loaded location of the segment in the storage medium after linking; and the runtime address reference characterizes the execution location of the segment during program execution. After obtaining at least one segment information, supplementary identification is performed on each segment, expanding the segment information from the original extraction results into a complete segment list. Supplementary identification may include merging and mapping segment names, uniformly identifying segments with the same name or category, cross-associating the build parameters in the source file and compilation configuration, parsing and completing the load address reference and runtime address reference, and organizing the parsing results into a unified data structure. The resulting segment list simultaneously reflects the segment's logical attributes, space usage, and its correspondence with the object file and compilation configuration. The device first acquires the target source code file, which contains the project source code, compilation configuration, and object files. Then, a parsing tool reads the segment information from the object file and, in conjunction with the compilation configuration, determines the source and address reference relationships of each segment. Subsequently, through supplementary identification, the scattered segment information is organized into a segment list that can be used for subsequent memory matching and link table generation. This processing method provides a unified representation of segment information and lays the foundation for subsequent intermediate model construction and target link table generation.

[0094] For example, consider a device deployment link table generation tool, hereinafter referred to as the tool. The tool reads the target project's source code, compilation configuration, and generated object files. If the target project supports compiler-assisted extraction, options such as `-ffunction-sections` and `-fdata-sections` can be enabled during compilation to create independent sections for functions and data objects. The tool calls objdump, readelf, or similar parsing tools to extract section names, attributes, sizes, load address references, and runtime address references from the object files. It also performs supplementary identification on explicitly declared sections in the source code, such as custom sections specified by `attribute((section("name")))`, to obtain and output the original section list as input for subsequent classification and link table generation. For example, a custom data model class `SectionInfo` can be obtained, recording the section name, attributes, size, source file, load address reference, and runtime address reference in the section list, which describes the basic information of each section to be placed.

[0095] With this implementation method, the extraction and supplementary identification of segment information can be completed within the same parsing link. The segment name, attributes, size, source file, load address reference and runtime address reference are organized in a consistent manner, reducing omissions and ambiguities when manually organizing target file information, and enabling subsequent memory matching and link table generation to be processed directly based on the structured segment list.

[0096] In one possible implementation, the memory information includes configuration information for at least one memory; the configuration information includes, but is not limited to: name, starting address, length, attributes, and reserved area. And / or, the linked list of targets includes, but is not limited to: target format, template name, output extension, and verification method.

[0097] Specifically, the tool reads target chip information from a chip database, configuration files, or user input, recording the ROM start address, ROM capacity, RAM start address, RAM capacity, and special areas such as the bootloader reserved area, uninitialized data (NoInit) area, shared memory area, and Direct Memory Access (DMA) buffer. It then outputs a unified memory configuration for subsequent boundary and overlap checks. For example, a custom data model class `MemoryInfo` can be obtained, recording the ROM / RAM name, start address, length, attributes, and reserved area from the configuration information; its purpose is to provide boundaries for section address verification.

[0098] Alternatively, the tool can incorporate multiple link table target types, allowing users to select the desired output target format through configuration, such as .ld, .sct, .icf, and .lsl. Each target format corresponds to a template, an output extension, and a set of symbol naming rules. This method does not rely on identifying the actual compiler used in the current project; instead, it generates all target formats at once based on a single intermediate model. For example, a custom data model class, TargetSpec, can be obtained, recording the target format, template name, output extension, and validation method. Its purpose is to tell the tool which link table files need to be generated.

[0099] In this embodiment, memory information and the target list of the link table serve as structured inputs in the same link table generation chain. The former provides boundaries and attribute basis for segment mapping, while the latter provides output constraints and verification basis for format conversion. Based on the above information, the system can record the correspondence between each segment of information and the memory configuration information in the intermediate model, and output text content recognizable by the target linker according to the target format and template name, thereby forming a target link table consistent with the chip memory layout and toolchain requirements. This allows memory boundaries, reserved areas, and output formats to be uniformly constrained in the same data model, reducing the need for repeated checks on region names, address ranges, and text syntax during manual maintenance, and making the generated results more traceable and consistent.

[0100] 302. Classify at least one segment information in the segment list to obtain a classification result; wherein, the classification result includes the segment information name, category, address information of the memory to which it belongs, initialization method and reserved attributes of each segment information.

[0101] For example, the classification process can be completed by a rule engine combined with a parsing module. First, the corresponding segment information is extracted from the segment list based on the segment identifier generated by the target compiler. Then, the category of the segment information is determined based on the segment name pattern, segment attribute flags, and source file comment information, and this category is mapped to types such as code segment, constant segment, data segment, uninitialized data segment, or reserved segment. For each segment information, its initial value definition, whether it is cleared after reset, and whether it is marked by the toolchain as not participating in regular loading can also be parsed, thereby forming a classification result containing name, category, memory address information, initialization method, and reserved attributes.

[0102] In one possible implementation, step 302 includes the following steps:

[0103] The first step is to perform rule matching on each piece of information according to the priority of each classification rule to obtain the matching result; the matching result includes the matching order of each classification rule corresponding to each piece of information.

[0104] The second step is to classify at least one segment of information based on the matching results to obtain the classification results.

[0105] Specifically, the segment list refers to the set of segment information extracted by the source code parsing module. Each segment corresponds to a code segment, data segment, uninitialized data segment, or custom segment in an object file, and includes the segment name, segment attributes, segment size, loading attributes, and initialization characteristics. Classification rules are pre-configured by the rule engine module. Rule content can be formed based on segment name keywords, segment attribute combinations, initialization flags, and retention flags. A priority number is assigned to each rule; the smaller the priority value, the earlier the rule applies. When the rule engine module compares the same segment of information using rules sequentially, it records the hit status of each rule and generates a matching order based on priority. When multiple rules are satisfied simultaneously, the primary classification rule for that segment is determined according to the preset priority; rules that are not matched are retained as the basis for subsequent judgments. In its implementation, the classification module compares segment names with a preset pattern library to identify code segments (".text"), read-only data segments (".rodata"), initialized data segments (".data"), and uninitialized data segments (".bss"). When a segment name alone cannot determine its category, the module further combines the read-only, writable, and executable flags in the segment attributes, as well as the explicit initialization, zero initialization, and no initialization flags in the initialization method, for joint determination. If a segment satisfies multiple classification rules, the classification result is determined first based on the rule with the highest priority, while the order of the remaining matching rules is written into the matching result to retain the source of determination and backtracking basis during subsequent intermediate model construction. For segment information with the same name but different sources, the system can also distinguish them by combining the segment source file, compilation options, and symbol prefixes, thereby generating consistent classification output. When the program in the device is working, it first receives the segment list and loads the classification rule table, performs rule matching on each segment information and forms a matching result, and then generates the corresponding classification result based on the matching result. The classification result includes at least the segment information name, category, address information of the memory it belongs to, initialization method, and reserved attributes. The classification result is then fed into the intermediate model building process and associated with memory information to support subsequent linked table text generation.

[0106] For example, Figure 4 A timing diagram of a linked table generation process provided for an embodiment of this application, such as... Figure 4As shown, the tool reads the original section list and loads built-in classification rules and user-defined classification rules. If there is a conflict, the user-defined rules take precedence. The tool matches sections according to rule priority, in the following order: special sections, exact names, prefixes, suffixes, inclusion relationships, regular expressions, and attribute inference. It also prioritizes the identification of interrupt vector tables and startup sections, such as sections with .isr_vector, .vectors, and RESET information. These sections are marked as essential to retain to prevent deletion during subsequent linking. The tool categorizes the .text, .text.*, .init, and .fini segments as code segments, with ROM as the runtime environment; the .rodata and .rodata.* segments as read-only data segments, also with ROM as the runtime environment; the .data, .data.*, and .sdata segments as initialized data segments, whose initial values ​​are stored in ROM, placed in RAM at runtime, and copied from ROM to RAM during startup; the .bss, .bss.*, .sbss, and COMMON segments as zero-initialized segments, placed in RAM at runtime and cleared at startup; the .heap segment as the heap region, used by the runtime library or memory management module; the .stack, .stack.*, and CSTACK segments as the stack region, used for function calls, interrupt context, and task context storage; and the .noinit and .retention segments as uninitialized regions, neither copied nor cleared at startup. If a section does not match any rules, a fallback approach is taken based on its attributes: executable sections are categorized as code sections, read-only sections as read-only data sections, writable sections requiring initialization are categorized as .data, and sections with zero initialization are categorized as .bss. If it still cannot be categorized, it is marked as an unknown section and diagnostic information is output, prompting the user to supplement the rules. Finally, a custom data model class, `ClassifiedSection`, is obtained to record the section name, classification result, storage area, initialization method, and whether it must be retained. Its function is to convert the original section into a standard section that can be processed later. It also includes a data model class, `SectionRule`, which records matching conditions and classification results, enabling tools to automatically determine the section type according to the rules.

[0107] By organizing the matching order according to priority rules, consistent classification judgments can be maintained when multiple hits occur, enabling stable identification of segment information categories, initialization methods, and retention attributes. This provides a traceable input basis for subsequent memory mapping and linked list conversion, thereby reducing segment classification ambiguity and manual review.

[0108] 303. Based on the classification results and the configuration information of at least one memory in the memory information, construct an intermediate model.

[0109] For example, after obtaining the classification results, the matching module performs constraint verification on the target storage location corresponding to each segment of information based on the address boundaries, access attributes, and reserved areas in the memory information. When the memory address information in the classification results matches the start and end addresses of the memory, and the initialization method and reserved attributes of the segment are compatible with the writable attributes and reserved area configuration of the memory, it is determined that the segment of information can be written to the corresponding memory, and the correspondence between the two is recorded as an intermediate model. The intermediate model can be represented using structured data objects, which store the one-to-one or one-to-many mapping relationship between segment information and memory configuration information, facilitating subsequent format conversion according to different linked list target lists.

[0110] Through the above implementation, segment information, after classification, carries a clear name, category, address, initialization method, and reservation attribute. Memory configuration participates in matching using a unified data structure, enabling the intermediate model to accurately reflect the constraint relationship between segments and memory, thus providing a stable intermediate carrier for subsequent linked list generation. This method reduces the workload of manually comparing segment attributes with memory boundaries and maintains consistency in segment allocation, reserved area processing, and initialization configuration, thereby improving the accuracy and traceability of linked list construction.

[0111] In one possible implementation, step 303 includes the following steps:

[0112] The first step is to match and record each piece of information based on the classification results and the configuration information of at least one memory in the memory information, so as to obtain the recording result of each piece of information.

[0113] The second step is to perform boundary checks and overlap checks on the address ranges in the segment information recording results to obtain the verification results of the segment information.

[0114] The third step is to determine if the verification result of the segment information indicates that the segment information verification is successful, and to generate an intermediate model based on the recording result of at least one segment information.

[0115] Specifically, after obtaining the classification results and memory information, the device first establishes an association table between segment information and memory configuration information. For each segment, it matches and records the information based on its address attributes, category attributes, and memory constraints, writing the matched memory identifier, address range, segment length, and initialization attributes into the recording results. Subsequently, the device performs boundary checks on the address ranges in each recording result to determine whether the segment start and end addresses fall within the valid range of the corresponding memory. Simultaneously, it performs overlap checks to determine whether there are overlapping relationships between different segment information and between segment information and the memory reserved area. When the check results indicate that all segment information satisfies the memory boundary constraints and there are no conflicts, the device generates an intermediate model based on the recording results of at least one segment. The intermediate model can use structured data objects to store the mapping relationships and address constraint information of each segment. In practical applications, the intermediate model can also adopt other data organization forms, which are not limited in this application.

[0116] When this intermediate model is working, it unifies the segment attributes in the classification results with the address constraints in the memory configuration information into the same data carrier, and completes the legality confirmation through boundary check and overlap check before generation, so that the subsequent format conversion can directly output the text content required by the target linked table based on the confirmed segment-memory mapping relationship.

[0117] For example, such as Figure 4As shown, the tool reads the classification results and memory information output from the previous steps, and reads the section size, load address, runtime address, and region references already determined in the previous steps. This step does not recalculate the section size or re-derive the address; it only records and verifies the existing address information. The tool records the ROM runtime region, entry symbol, and vector table location for the code segment; the ROM runtime region for the read-only data segment; the ROM load region, RAM runtime region, and start and end symbols required for boot copying for the .data segment; the RAM runtime region and start and end symbols required for boot zeroing for the .bss segment; the heap start point, heap end point, and heap boundary symbols referenced by the runtime library for the .heap segment; the stack top, stack bottom, initial stack pointer, growth direction, and alignment requirements for the .stack segment; and reserved attributes for special regions such as .noinit, DMA buffer, and Bootloader shared area, and confirms that they will not be accidentally zeroed during the boot phase. The tool checks whether the address range of each section is within its respective ROM / RAM boundary. The tool checks whether the .data segment simultaneously contains both a ROM load region and a RAM runtime region. The tool checks if .bss, .heap, and .stack incorrectly declare ROM load regions. It checks if .data, .bss, .heap, .stack, .noinit, and DMA buffers overlap within the same RAM region. It checks if .text, .rodata, .data load images, vector tables, and calibration data overlap within the same ROM region. It checks if the stack top and bottom meet the Central Processing Unit (CPU) Application Binary Interface (ABI) alignment requirements. It checks if sufficient safety margins are maintained between the heap and stack. After passing the checks, the tool generates a unified linked list intermediate model, which serves as the sole input for all subsequent templates. If an error is found, the error reason is output and generation stops; if only a warning is found, it is logged in a report and allowed to continue. The tool can retain simplified data items such as LinkModel, AddressRange, and InitAction. The LinkModel data item stores memory information, categorized sections, symbols, initialization actions, and diagnostic results, serving as a unified input for generating all compiler link tables. The AddressRange data item records the load or runtime range of a section, performing boundary and overlap checks. The InitAction data item records actions to be performed during startup, such as copying .data or clearing .bss, ensuring that the symbols output by the link table are available for use by the startup code.

[0118] With this implementation method, the consistency verification between segment information and memory configuration information can be completed before the intermediate model is generated. This can reduce generation failures caused by address conflicts and memory misconfiguration, and enable the intermediate data to have a traceable mapping relationship, which facilitates the stable execution of the subsequent linked list generation process.

[0119] 304. Based on the target list of the link table, perform format conversion on the intermediate model to obtain the context information corresponding to the target list of the link table; wherein, the context information includes the text content that the link table corresponding to the target list of the link table can recognize.

[0120] For example, the content of this step is the same as step 203, and will not be repeated here.

[0121] 305. Based on the context information corresponding to the target list of the linked table, perform format conversion on the template corresponding to the target list of the linked table to obtain the generated file corresponding to the target list of the linked table.

[0122] For example, the device retrieves the set of format conversion modules, selects the corresponding template according to the target list of the link table, and fills the segment name, address range, load attribute, runtime attribute and reserved attribute in the intermediate model into the corresponding fields in the template to generate a text file that meets the requirements of the target compiler, so as to obtain the generated file corresponding to the target list of the link table.

[0123] 306. Check the generated file and obtain the check results.

[0124] For example, the inspection module can parse the generated file to determine whether there are any unreplaced tags, address expression conflicts, missing syntax items, or inconsistent version fields, and output the inspection result as either passed or failed.

[0125] 307. If the check result of the generated file indicates that the generated file has passed the check, generate the target link table and the generated list corresponding to the target list of the link table based on the generated file and the check result of the generated file; wherein, the generated list includes the target type, template version, verification result and failure reason.

[0126] For example, if the device determines that the generated file has passed the check, it solidifies the target link table based on the generated file and the corresponding check result, and generates a generation list associated with the target link table. The generation list records the target type, template version, verification result and failure reason. When the check passes, the failure reason can be recorded as a null value or a preset no-abnormality indicator. When the check fails, the corresponding verification abnormality information is recorded.

[0127] For example, Figure 5 A timing diagram of another link table generation process provided in this application embodiment, combined with Figure 4 , Figure 5 The tool reads the generated unified intermediate model and the defined list of linked list targets. It loads multiple templates sequentially. The tool converts the unified intermediate model into the context information required for each template, including memory regions, section groups, symbol names, initialization actions, and reserved segment information. During template generation, only format conversion is performed; no address reallocation, size recalculation, or section order change is performed. For example, for target templates corresponding to operating systems, a .ld file is generated, using data items such as MEMORY and SECTIONS to describe the ROM / RAM and section layout; for virtual machine target templates, a .sct file is generated, using load and execution domains to describe ROM loading, RAM execution, Read-Write Data (RW) regions, Zero Initialize Data (ZI) regions, and stack regions; and uses define memory, define region, initialize by copy, do not initialize, and place. The tool generates .icf files for target templates corresponding to embedded applications using statements such as `in`; and .lsl files for target templates corresponding to compiler toolchains, which use the toolchain's memory and section_layout syntax to describe the layout. For .text files, it outputs the code segment, vector table segment, entry symbol, and reservation rules; for .data files, it outputs the relationship between ROM load addresses and RAM execution addresses, and outputs the boot copy symbol; for .bss files, it outputs the zero-initialized region and the start and end symbols for clearing; for .heap files, it outputs the heap start and end symbols and runtime library compatibility symbols; for .stack files, it outputs the stack top, stack bottom, initial stack pointer, and optional protected area symbols; and for .noinit and reserved areas, it outputs uninitialized or fixed region declarations. After template rendering, the tool checks for unreplaced placeholders. It checks if the generated file contains entry symbols, .data copy symbols, .bss clearing symbols, heap boundary symbols, and stack boundary symbols. If the corresponding toolchain is available locally, it performs syntax checks or trial linking; if not, it performs template integrity checks and address reference consistency checks. The tool summarizes the generation status, output path, and verification results for each target format. The tool outputs all linker table files and the generated manifest. The tool can retain simplified data items such as RenderContext and Manifest. The RenderContext data item stores the fields required for rendering a specific target template, converting the unified model into text content that the target linker can recognize. The Manifest data item records the generated file, target type, template version, verification results, and failure reasons, allowing traceability of the source and status of each output file.

[0128] In this implementation, the target link table is determined by the templated text and the validation status, and the generated list is used to store traceable information of the generation process. By converting the template before performing the check, and only outputting the target link table after the check passes, the generated result can be kept consistent with the target list of link tables, template version, and validation status, thereby ensuring the standardization and consistency of the link table output and providing a directly identifiable configuration file for subsequent building processes.

[0129] In one possible implementation, after step 307, the method further includes:

[0130] Step 1: Output the target linked list corresponding to the target linked list to the directory corresponding to the target linked list to obtain the linked list file corresponding to the target linked list; the linked list file includes the input model, template version, output file path, file hash and verification result.

[0131] Step 2: Generate a verification report corresponding to the link table file based on the link table target list; the verification report includes classification results, address check results, template generation results, and error information.

[0132] Step 3: Write the link table path from the link table file into the target development environment to generate the target script.

[0133] Step 4: Generate and display the script report of the target script; the script report includes memory usage, segment address records, stack safety margins, and special reserved areas.

[0134] Step 5: Generate the target script generation record; the generation record includes the segment list of the target source code file, the memory information of the target chip, at least one link table target list, intermediate model, each target link table and verification report.

[0135] Specifically, after writing the target link table to the corresponding directory of the link table target list, the device can name and write the output file to disk, and simultaneously generate a file hash to identify file integrity. Subsequently, based on the template version, input model, and verification results in the link table file, the device calls the verification module to generate a verification report, and writes the classification results and address check results item by item into the report text or structured data. The device then writes the link table path into the project configuration file or build script of the target development environment, enabling the linker to read the corresponding link table and generate the target script during compilation. After the target script is generated, the device can parse its segment allocation results, memory usage, and special reserved area occupancy, and calculate the stack safety margin by combining stack reservation information, forming a script report and displaying it to the developers. The device can also input the segment list, memory information, target lists of each link table, intermediate model, target link table, and verification report in the link into the generation record for unified storage, facilitating subsequent traceability. By chaining the output, verification, writing to the development environment, and generation and storage of the target linked list, a consistent association is maintained between the linked list file, the target script, and the generated records. This enables verification and traceability of the output results and synchronous presentation of segment addresses, memory usage, and reserved area information.

[0136] For example, in the development of automotive embedded software, there exists an automated tool or process that can scan the user's source code to extract section-related information (such as name, size, and attributes). This tool / process can obtain hardware configuration information such as the size and starting address of the ROM and RAM of a specific automotive chip. Based on preset rules (such as section name), this tool / process can automatically allocate the extracted sections to ROM or RAM regions and calculate the specific address space. Figure 5As shown, the tool outputs the generated .ld, .sct, .icf, and .lsl link table files to a specified directory. The tool generates a manifest.json file, recording the input model, template version, output file path, file hash, and validation results. The tool generates a validation report, listing section classification results, address check results, template generation results, and error / warning messages. Users can choose to write the target link table path to the cross-platform build system generator (CMake), the Makefile rule description file, the Integrated Development Environment (IDE) project configuration, or the Continuous Integration (CI) build script. The tool displays ROM / RAM usage, section address records, stack safety margins, and special reserved areas in the report or interface. The tool saves the input configuration, intermediate model, generated files, and validation report, forming a traceable generation record. Finally, the tool can automatically generate a complete link table file and use this link table file to generate an executable program, eliminating the need for users to manually write the link table.

[0137] In this implementation, a unified mapping relationship is formed between the disk storage information of the target linked table, the verification results, and the target script, which facilitates the location of address configuration anomalies and template generation anomalies. At the same time, the generation record completely preserves the segment list, intermediate model, and verification report, improving the consistency, traceability, and verifiability of the linked table generation process and the construction results.

[0138] In this embodiment, based on the above embodiments, on the one hand, the originally scattered and experience-dependent link table writing process is transformed into a standardized and automated process. By automatically handling key steps such as information extraction, rule matching, and address calculation, the limitations of manual operation (slow speed, error-prone, and inconsistent) are overcome, thereby achieving improved efficiency, reduced errors, and enhanced standardization. On the other hand, through modular design (for example, each step is executed by a corresponding software module), the system is easy to maintain and expand, and can adapt to different application scenarios and changing needs.

[0139] Figure 6 This is a schematic diagram of a linked list generation device provided in an embodiment of this application, as shown below. Figure 6 As shown, the device includes:

[0140] The determination module 401 is used to extract the segment list of the target source code file and the memory information of the target chip, and to determine at least one link table target list;

[0141] The matching module 402 is used to match at least one segment information in the segment list with the configuration information of at least one memory in the memory information to obtain an intermediate model; wherein, the intermediate model includes the configuration information of the memory matched by each segment information;

[0142] The conversion module 403 is used to perform format conversion on the intermediate model according to the target list of the link table to obtain the context information corresponding to the target list of the link table; wherein, the context information includes the text content that the link table corresponding to the target list of the link table can recognize;

[0143] The generation module 404 is used to generate the target linked table corresponding to the target linked table list based on the context information corresponding to the target linked table list.

[0144] In one possible implementation, the matching module 402 is specifically used to: classify at least one segment information in the segment list to obtain a classification result; wherein the classification result includes the name, category, address information of the memory to which each segment information belongs, initialization method and retention attribute; and construct an intermediate model based on the classification result and the configuration information of at least one memory in the memory information.

[0145] In one possible implementation, the matching module 402 is further specifically used to: perform rule matching on each piece of information according to the priority of each classification rule to obtain a matching result; wherein the matching result includes the matching order of each classification rule corresponding to each piece of information; and perform classification processing on at least one piece of information according to the matching result to obtain a classification result.

[0146] In one possible implementation, the matching module 402 is further specifically configured to: match and record each segment of information according to the classification results and the configuration information of at least one memory in the memory information to obtain the recording result of each segment of information; perform boundary verification and overlap verification on the address range in the recording result of the segment information to obtain the verification result of the segment information; if it is determined that the verification result of the segment information indicates that the segment information verification is passed, generate an intermediate model according to the recording result of at least one segment information.

[0147] In one possible implementation, the determining module 401 is specifically used for: reading the target source code file; wherein the target source code file includes project source code, compilation configuration and generated target files; extracting at least one segment information from the target source code file based on a parsing tool; wherein the segment information includes name, attributes, size, source file, load address reference and runtime address reference; and supplementing the identification of at least one segment information to obtain a segment list.

[0148] In one possible implementation, the generation module 404 is specifically used for: converting the format of the template corresponding to the target list of the link table according to the context information corresponding to the target list of the link table, to obtain the generated file corresponding to the target list of the link table; checking the generated file to obtain the check result of the generated file; if it is determined that the check result of the generated file indicates that the generated file has passed the check, generating the target link table and the generated list corresponding to the target list of the link table according to the generated file and the check result of the generated file; wherein, the generated list includes the target type, template version, verification result and failure reason.

[0149] In one possible implementation, the memory information includes configuration information for at least one memory; the configuration information includes, but is not limited to: name, starting address, length, attributes, and reserved area; and / or, the linked table target list includes, but is not limited to: target format, template name, output extension, and verification method.

[0150] In one possible implementation, the apparatus is further configured to: output the target link list corresponding to the target link list to the directory corresponding to the target link list, to obtain a link list file corresponding to the target link list; wherein the link list file includes an input model, template version, output file path, file hash, and verification result; generate a verification report corresponding to the link list file based on the link list file corresponding to the target link list; wherein the verification report includes classification result, address check result, template generation result, and error information; write the link list path in the link list file into the target development environment to generate a target script; generate and display a script report of the target script; wherein the script report includes memory usage, segment address record, stack safety margin, and special reserved area; generate a generation record of the target script; wherein the generation record includes a segment list of the target source code file, memory information of the target chip, at least one target link list, intermediate model, each target link list, and verification report.

[0151] The apparatus in this embodiment can execute the technical solutions in the above method. Its specific implementation process and technical principles are the same, and will not be repeated here.

[0152] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, such as... Figure 7 As shown, the electronic device includes: a memory 501 and a processor 502; the memory 501 is a memory used to store instructions executable by the processor 502.

[0153] The processor 502 is configured to perform the method provided in the above embodiments.

[0154] The electronic device also includes a receiver 503 and a transmitter 504. The receiver 503 is used to receive instructions and data sent by other devices, and the transmitter 504 is used to send instructions and data to external devices.

[0155] The specific implementation process of the processor can be found in the above method embodiments, and its implementation principle and technical effect are similar, so it will not be repeated here.

[0156] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0157] This application provides a vehicle, which includes a vehicle body and an electronic device disposed in the vehicle body; the electronic device stores computer execution instructions, which, when executed on a computer, cause the computer to execute the technical solution of the above embodiment.

[0158] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed on a computer, cause the computer to perform the technical solutions described above.

[0159] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory, electrically erasable programmable read-only memory, erasable programmable read-only memory, programmable read-only memory, read-only memory, magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0160] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. The readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an application-specific integrated circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in a device.

[0161] This application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium, and when the at least one processor executes the computer program, it can implement the technical solutions in the above embodiments.

[0162] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0163] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as magnetic disks or optical disks.

[0164] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A method for generating a linked list, characterized in that, include: Extract the segment list from the target source code file and the memory information of the target chip, and determine at least one linked list target list; At least one segment information in the segment list is matched with the configuration information of at least one memory in the memory information to obtain an intermediate model; wherein, the intermediate model includes the configuration information of the memory matched for each segment information; Based on the target list of the link table, the intermediate model is format-converted to obtain the context information corresponding to the target list of the link table; wherein, the context information includes the text content that the link table corresponding to the target list of the link table can recognize; Based on the context information corresponding to the target list of the linked table, a target linked table is generated corresponding to the target list of the linked table.

2. The method according to claim 1, characterized in that, The step of matching at least one segment information in the segment list with the configuration information of at least one memory in the memory information to obtain an intermediate model includes: At least one segment information in the segment list is classified to obtain a classification result; wherein, the classification result includes the name, category, address information of the memory to which each segment information belongs, initialization method, and retention attribute of the segment information; The intermediate model is constructed based on the classification results and the configuration information of at least one memory in the memory information.

3. The method according to claim 2, characterized in that, The classification process for at least one segment information in the segment list to obtain a classification result includes: According to the priority of each classification rule, rule matching is performed on each segment information to obtain a matching result; wherein, the matching result includes the matching order of each classification rule corresponding to each segment information; Based on the matching result, the at least one segment information is classified to obtain the classification result.

4. The method according to claim 2, characterized in that, The step of constructing the intermediate model based on the classification results and the configuration information of at least one memory in the memory information includes: Based on the classification results and the configuration information of at least one memory in the memory information, each segment information is matched and recorded to obtain the recording result of each segment information; Boundary checks and overlap checks are performed on the address range in the recorded results of the segment information to obtain the verification results of the segment information; If the verification result of the segment information indicates that the segment information has passed the verification, the intermediate model is generated based on the recording result of the at least one segment information.

5. The method according to claim 1, characterized in that, The list of segments from the extracted target source code file includes: Read the target source code file; wherein the target source code file includes project source code, compilation configuration, and generated target files; Based on the parsing tool, at least one segment information is extracted from the target source code file; wherein, the segment information includes name, attributes, size, source file, load address reference, and runtime address reference; The at least one segment information is further identified to obtain the segment list.

6. The method according to claim 1, characterized in that, The step of generating the target link table corresponding to the target list of the link table based on the context information corresponding to the target list of the link table includes: Based on the context information corresponding to the target list of the linked table, the template corresponding to the target list of the linked table is converted to obtain the generated file corresponding to the target list of the linked table; The generated file is inspected to obtain the inspection result of the generated file; If the inspection result of the generated file indicates that the generated file has passed the inspection, a target link table and a generated list corresponding to the target list of the link table are generated based on the generated file and the inspection result of the generated file; wherein, the generated list includes target type, template version, verification result and failure reason.

7. The method according to any one of claims 1-6, characterized in that, The method further includes: The target linked list corresponding to the target linked list is output to the directory corresponding to the target linked list to obtain the linked list file corresponding to the target linked list; wherein, the linked list file includes the input model, template version, output file path, file hash and verification result; Based on the link table file corresponding to the target list in the link table, a verification report corresponding to the link table file is generated; wherein, the verification report includes classification results, address check results, template generation results, and error information; Write the link table path in the link table file into the target development environment to generate the target script; Generate and display a script report of the target script; wherein the script report includes memory usage, segment address records, stack safety margin, and special reserved areas; Generate a generation record for the target script; wherein the generation record includes a segment list of the target source code file, memory information of the target chip, a list of at least one linked list target, the intermediate model, each of the target linked lists, and the verification report.

8. A linked list generation apparatus, characterized in that, include: The determination module is used to extract the segment list of the target source code file and the memory information of the target chip, and to determine at least one link table target list; A matching module is used to match at least one segment information in the segment list with the configuration information of at least one memory in the memory information to obtain an intermediate model; wherein, the intermediate model includes the configuration information of the memory matched for each segment information; The conversion module is used to perform format conversion on the intermediate model according to the target list of the link table to obtain the context information corresponding to the target list of the link table; wherein, the context information includes the text content that the link table corresponding to the target list of the link table can recognize; The generation module is used to generate the target link table corresponding to the target link table list based on the context information corresponding to the target link table list.

9. An electronic device, characterized in that, include: Memory and processor; The memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-7.

10. A vehicle, characterized in that, The vehicle includes a vehicle body and an electronic device disposed in the vehicle body; the electronic device is used to implement the method as described in any one of claims 1-7.

11. A computer-readable storage medium / computer program product, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-7; and / or, the computer program product includes a computer program, which, when executed by a processor, implements the method as described in any one of claims 1-7.