CN114296754A - Chip platform upgrade method and related device - Google Patents

Chip platform upgrade method and related device Download PDF

Info

Publication number
CN114296754A
CN114296754A CN202111447658.3A CN202111447658A CN114296754A CN 114296754 A CN114296754 A CN 114296754A CN 202111447658 A CN202111447658 A CN 202111447658A CN 114296754 A CN114296754 A CN 114296754A
Authority
CN
China
Prior art keywords
chip platform
mentioned
thread
function
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111447658.3A
Other languages
Chinese (zh)
Other versions
CN114296754B (en
Inventor
左芷箐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fibocom Wireless Inc
Original Assignee
Fibocom Wireless Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fibocom Wireless Inc filed Critical Fibocom Wireless Inc
Priority to CN202111447658.3A priority Critical patent/CN114296754B/en
Publication of CN114296754A publication Critical patent/CN114296754A/en
Priority to PCT/CN2022/098113 priority patent/WO2023098015A1/en
Application granted granted Critical
Publication of CN114296754B publication Critical patent/CN114296754B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Computer Security & Cryptography (AREA)
  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Abstract

本申请实施例提供了一种芯片平台升级方法及相关装置,应用于电子设备,上述电子设备安装有芯片平台升级程序,上述芯片平台升级程序用于连接至少一个芯片平台,上述芯片平台升级程序包括第一进程,该方法通过上述第一进程创建第一线程和第二线程;通过上述第一线程根据芯片平台与接口函数的对应关系确定与第一芯片平台对应的第一接口函数,调用上述第一接口函数,上述第一接口函数用于上述第一芯片平台的固件升级,上述第一芯片平台为上述至少一个芯片平台中的任意一个;通过上述第二线程在上述固件升级成功的情况下,测试上述第一芯片平台,得到测试信息;可以提高芯片平台升级和测试的效率。

Figure 202111447658

The embodiments of the present application provide a chip platform upgrade method and related apparatus, which are applied to electronic equipment. The electronic equipment is installed with a chip platform upgrade program, and the chip platform upgrade program is used to connect at least one chip platform. The chip platform upgrade program includes: The first process, the method creates a first thread and a second thread through the above-mentioned first process; the above-mentioned first thread determines a first interface function corresponding to the first chip platform according to the corresponding relationship between the chip platform and the interface function, and calls the above-mentioned first interface function. An interface function, where the first interface function is used for firmware upgrade of the first chip platform, and the first chip platform is any one of the at least one chip platform; and when the firmware upgrade is successful through the second thread, Test the above-mentioned first chip platform to obtain test information, which can improve the efficiency of chip platform upgrading and testing.

Figure 202111447658

Description

芯片平台升级方法及相关装置Chip platform upgrade method and related device

技术领域technical field

本申请涉及电学技术领域,尤其涉及一种芯片平台升级方法及相关装置。The present application relates to the field of electrical technology, and in particular, to a method for upgrading a chip platform and a related device.

背景技术Background technique

随着时代的发展,各类芯片平台在生活中的用途日益广泛。对于各类芯片平台,往往需要进行软件上的升级,以满足实际应用需求。With the development of the times, various chip platforms are increasingly used in daily life. For various chip platforms, software upgrades are often required to meet practical application requirements.

目前,芯片平台软件上的升级包括固件的升级以及客制化功能的定制。对于固件的升级可采用芯片平台厂家提供的升级程序实现,对于客制化功能的定制则需要针对不同类型的芯片平台开发对应的客制化函数。At present, the upgrade of the chip platform software includes firmware upgrade and customization of customized functions. The firmware upgrade can be implemented by the upgrade program provided by the chip platform manufacturer, and the customization of the customized function needs to develop corresponding customized functions for different types of chip platforms.

但是,因为对于不同类型的芯片平台需要定制开发多个升级程序进行升级和测试,开发人员的工作冗余复杂,导致芯片平台升级和测试的效率低。However, because multiple upgrade programs need to be customized and developed for different types of chip platforms for upgrade and testing, the work of developers is redundant and complicated, resulting in low efficiency of chip platform upgrade and testing.

发明内容SUMMARY OF THE INVENTION

本申请实施例公开了一种芯片平台升级方法及相关装置,可以提高芯片平台升级和测试的效率。The embodiments of the present application disclose a chip platform upgrade method and a related device, which can improve the efficiency of chip platform upgrade and testing.

第一方面,本申请实施例公开了一种芯片平台升级方法,应用于电子设备,上述电子设备安装有芯片平台升级程序,上述芯片平台升级程序用于连接至少一个芯片平台,上述芯片平台升级程序包括第一进程,上述方法包括:In the first aspect, an embodiment of the present application discloses a method for upgrading a chip platform, which is applied to an electronic device. The electronic device is installed with a chip platform upgrade program, and the chip platform upgrade program is used to connect at least one chip platform. The chip platform upgrade program Including the first process, the above method includes:

通过上述第一进程创建第一线程和第二线程;Create a first thread and a second thread through the above-mentioned first process;

通过上述第一线程根据芯片平台与接口函数的对应关系确定与第一芯片平台对应的第一接口函数,调用上述第一接口函数,上述第一接口函数用于上述第一芯片平台的固件升级,上述第一芯片平台为上述至少一个芯片平台中的任意一个;The first thread determines the first interface function corresponding to the first chip platform according to the corresponding relationship between the chip platform and the interface function, and calls the first interface function, and the first interface function is used for the firmware upgrade of the first chip platform. The above-mentioned first chip platform is any one of the above-mentioned at least one chip platform;

通过上述第二线程在上述固件升级成功的情况下,测试上述第一芯片平台,得到测试信息。In the case that the firmware upgrade is successful through the second thread, the first chip platform is tested to obtain test information.

在第一方面的一种可能的实施方式中,上述芯片平台升级程序还包括第二进程,上述方法还包括:In a possible implementation of the first aspect, the above-mentioned chip platform upgrade program further includes a second process, and the above-mentioned method further includes:

通过上述第二进程将上述测试信息在上述芯片平台升级程序的界面上显示。The above-mentioned test information is displayed on the interface of the above-mentioned chip platform upgrade program through the above-mentioned second process.

在第一方面的一种可能的实施方式中,上述第一接口函数包括第一全擦函数、第一部分格式化函数和第一升级函数中的至少一个。In a possible implementation manner of the first aspect, the above-mentioned first interface function includes at least one of a first full erase function, a first partial formatting function, and a first upgrade function.

在第一方面的一种可能的实施方式中,上述测试上述第一芯片平台,得到测试信息包括:In a possible implementation manner of the first aspect, the above-mentioned testing of the above-mentioned first chip platform, the obtained test information includes:

通过上述第二线程执行客制化函数,上述客制化函数的代码段内置于上述固件;The customized function is executed by the second thread, and the code segment of the customized function is built into the firmware;

通过上述第二线程测试上述客制化函数的执行结果,得到上述测试信息。The above-mentioned test information is obtained by testing the execution result of the above-mentioned customized function through the above-mentioned second thread.

在第一方面的一种可能的实施方式中,上述客制化函数包括写号函数,上述方法还包括:In a possible implementation of the first aspect, the above-mentioned customized function includes a sign writing function, and the above-mentioned method further includes:

通过上述第一进程获取上述第一芯片平台的第一号段信息;Obtain the first segment information of the first chip platform through the first process;

上述通过上述第二线程执行客制化函数包括:The above-mentioned executing the customized function through the above-mentioned second thread includes:

通过上述第二线程执行上述写号函数,上述写号函数用于将上述第一号段信息写入上述第一芯片平台的号段存储空间;The above-mentioned number-writing function is executed by the above-mentioned second thread, and the above-mentioned number-writing function is used to write the above-mentioned first number-segment information into the number-segment storage space of the above-mentioned first chip platform;

上述通过上述第二线程测试上述客制化函数的执行结果,得到上述测试信息包括:The above-mentioned execution result of the above-mentioned customized function is tested by the above-mentioned second thread, and the above-mentioned test information obtained includes:

通过上述第二线程获取上述号段存储空间中的第二号段信息,比较上述第一号段信息与上述第二号段信息,获得写号测试信息,上述测试信息包括上述写号测试信息。Obtain the second number segment information in the number segment storage space through the second thread, compare the first number segment information with the second number segment information, and obtain number writing test information, where the test information includes the number writing test information.

在第一方面的一种可能的实施方式中,上述通过上述第一进程获取上述第一芯片平台的第一号段信息包括:In a possible implementation manner of the first aspect, obtaining the first segment information of the first chip platform through the first process includes:

通过上述第一进程获取上述第一芯片平台的二维码解析信息,上述二维码解析信息包括上述第一芯片平台的上述第一号段信息;Acquire the two-dimensional code analysis information of the first chip platform through the first process, where the two-dimensional code analysis information includes the first segment information of the first chip platform;

或者,通过上述第一进程连接数据管理系统,接收上述数据管理系统发送的上述第一芯片平台的上述第一号段信息。Alternatively, the data management system is connected through the first process, and the first segment information of the first chip platform sent by the data management system is received.

在第一方面的一种可能的实施方式中,上述方法还包括:In a possible implementation of the first aspect, the above method further includes:

通过上述第二进程创建槽函数;Create a slot function through the above-mentioned second process;

通过上述第二线程向上述槽函数发送上述测试信息。Send the test information to the slot function through the second thread.

第二方面,本申请实施例公开了一种芯片平台升级装置,应用于电子设备,上述电子设备安装有芯片平台升级程序,上述芯片平台升级程序用于连接至少一个芯片平台,上述芯片平台升级程序包括第一进程,上述装置包括:In a second aspect, an embodiment of the present application discloses a chip platform upgrade device, which is applied to electronic equipment, wherein the electronic equipment is installed with a chip platform upgrade program, the chip platform upgrade program is used to connect at least one chip platform, and the chip platform upgrade program is installed. Including the first process, the above device includes:

创建单元,用于通过上述第一进程创建第一线程和第二线程;A creation unit is used to create a first thread and a second thread through the above-mentioned first process;

确定单元,用于通过上述第一线程根据芯片平台与接口函数的对应关系确定与第一芯片平台对应的第一接口函数;a determining unit, configured to determine the first interface function corresponding to the first chip platform according to the corresponding relationship between the chip platform and the interface function through the first thread;

调用单元,用于通过上述第一线程调用上述第一接口函数,上述第一接口函数用于上述第一芯片平台的固件升级,上述第一芯片平台为上述至少一个芯片平台中的任意一个;a calling unit, configured to call the above-mentioned first interface function through the above-mentioned first thread, the above-mentioned first interface function is used for firmware upgrade of the above-mentioned first chip platform, and the above-mentioned first chip platform is any one of the above-mentioned at least one chip platform;

测试单元,用于通过上述第二线程在上述固件升级成功的情况下,测试上述第一芯片平台,得到测试信息。The testing unit is configured to test the first chip platform through the second thread under the condition that the firmware upgrade is successful to obtain test information.

在第二方面的一种可能的实施方式中,上述装置还包括:In a possible implementation manner of the second aspect, the above-mentioned device further includes:

显示单元,用于通过上述第二进程将上述测试信息在上述芯片平台升级程序的界面上显示。The display unit is configured to display the test information on the interface of the chip platform upgrade program through the second process.

在第二方面的一种可能的实施方式中,上述测试单元具体用于通过上述第二线程执行客制化函数,上述客制化函数的代码段内置于上述固件;In a possible implementation manner of the second aspect, the above-mentioned test unit is specifically configured to execute a customized function through the above-mentioned second thread, and the code segment of the above-mentioned customized function is built in the above-mentioned firmware;

上述测试单元,具体用于通过上述第二线程测试上述客制化函数的执行结果,得到上述测试信息。The above-mentioned testing unit is specifically configured to test the execution result of the above-mentioned customized function through the above-mentioned second thread, and obtain the above-mentioned test information.

在第二方面的一种可能的实施方式中,上述装置还包括:In a possible implementation manner of the second aspect, the above-mentioned device further includes:

获取单元,用于通过上述第一进程获取上述第一芯片平台的第一号段信息;an obtaining unit, configured to obtain the first segment information of the first chip platform through the first process;

上述测试单元,具体用于通过上述第二线程执行上述写号函数,上述写号函数用于将上述第一号段信息写入上述第一芯片平台的号段存储空间;The above-mentioned test unit is specifically configured to execute the above-mentioned number-writing function through the above-mentioned second thread, and the above-mentioned number-writing function is used to write the above-mentioned first number segment information into the number segment storage space of the above-mentioned first chip platform;

上述测试单元,具体用于通过上述第二线程获取上述号段存储空间中的第二号段信息,比较上述第一号段信息与上述第二号段信息,获得写号测试信息,上述测试信息包括上述写号测试信息。The above-mentioned test unit is specifically configured to obtain the second number segment information in the above-mentioned number segment storage space through the above-mentioned second thread, compare the above-mentioned first number segment information and the above-mentioned second number segment information, and obtain the number-writing test information, the above-mentioned test information Including the above write number test information.

在第二方面的一种可能的实施方式中,上述获取单元,具体用于通过上述第一进程获取上述第一芯片平台的二维码解析信息,上述二维码解析信息包括上述第一芯片平台的上述第一号段信息;In a possible implementation manner of the second aspect, the obtaining unit is specifically configured to obtain the two-dimensional code parsing information of the first chip platform through the first process, and the two-dimensional code parsing information includes the first chip platform The first paragraph of the above information;

或者,通过上述第一进程连接数据管理系统,接收上述数据管理系统发送的上述第一芯片平台的上述第一号段信息。Alternatively, the data management system is connected through the first process, and the first segment information of the first chip platform sent by the data management system is received.

在第二方面的一种可能的实施方式中,上述创建单元,具体用于通过上述第二进程创建槽函数;In a possible implementation manner of the second aspect, the above-mentioned creation unit is specifically configured to create a slot function through the above-mentioned second process;

上述装置还包括:The above device also includes:

发送单元,用于通过上述第二线程向上述槽函数发送上述测试信息。A sending unit, configured to send the test information to the slot function through the second thread.

第三方面,本申请实施例提供一种电子设备,上述电子设备包括:存储器,用于存储程序;处理器,用于执行上述存储器存储的上述程序,当上述程序被执行时,上述处理器用于执行如上述第一方面中任意一种可选的实施方式的方法。In a third aspect, an embodiment of the present application provides an electronic device, where the electronic device includes: a memory for storing a program; a processor for executing the program stored in the memory, and when the program is executed, the processor is used for A method as in any one of the optional embodiments of the first aspect above is performed.

第四方面,本申请实施例提供一种计算机可读存储介质,上述计算机存储介质存储有计算机程序,上述计算机程序包括程序指令,上述程序指令当被处理器执行时使上述处理器执行如上述第一方面中任意一种可选的实施方式的方法。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where the computer storage medium stores a computer program, and the computer program includes program instructions. The method of any one of the alternative embodiments of an aspect.

第五方面,本申请实施例提供了一种计算机程序产品,上述计算机程序产品包括:指令或计算机程序;上述指令或上述计算机程序被执行时,使如第一方面中任意一种可选的实施方式中的方法实现。In a fifth aspect, an embodiment of the present application provides a computer program product, where the computer program product includes: an instruction or a computer program; when the instruction or the computer program is executed, any one of the options in the first aspect is implemented. method in the method implementation.

本申请实施例中的芯片平台升级方法,应用于电子设备,上述电子设备安装有芯片平台升级程序,上述芯片平台升级程序用于连接至少一个芯片平台,上述芯片平台升级程序包括第一进程,上述方法包括:通过上述第一进程创建第一线程和第二线程;通过上述第一线程根据芯片平台与接口函数的对应关系确定与第一芯片平台对应的第一接口函数,调用上述第一接口函数,上述第一接口函数用于上述第一芯片平台的固件升级,上述第一芯片平台为上述至少一个芯片平台中的任意一个;通过上述第二线程在上述固件升级成功的情况下,测试上述第一芯片平台,得到测试信息。上述芯片平台升级程序可连接至少一个芯片平台,在连接多于一个芯片平台的情况下,为每个芯片平台创建对应的进程与线程用于芯片平台的升级和测试,无需为每个芯片平台定制开发升级程序,能够实现一个芯片平台升级程序用于多个芯片平台升级,可以提高芯片平台升级和测试的效率。The chip platform upgrade method in the embodiment of the present application is applied to an electronic device. The electronic device is installed with a chip platform upgrade program, and the chip platform upgrade program is used to connect at least one chip platform. The chip platform upgrade program includes a first process. The method includes: creating a first thread and a second thread through the first process; determining a first interface function corresponding to the first chip platform through the first thread according to the corresponding relationship between the chip platform and the interface function, and calling the first interface function , the above-mentioned first interface function is used for the firmware upgrade of the above-mentioned first chip platform, and the above-mentioned first chip platform is any one of the above-mentioned at least one chip platform; through the above-mentioned second thread, in the case of successful upgrade of the above-mentioned firmware, test the above-mentioned first chip platform A chip platform to obtain test information. The above-mentioned chip platform upgrade program can be connected to at least one chip platform. In the case of connecting more than one chip platform, corresponding processes and threads are created for each chip platform for the upgrade and testing of the chip platform, and there is no need to customize each chip platform. By developing an upgrade program, one chip platform upgrade program can be used to upgrade multiple chip platforms, which can improve the efficiency of chip platform upgrade and testing.

附图说明Description of drawings

为了更清楚地说明本申请实施例或背景技术中的技术方案,下面将对本申请实施例或背景技术中所需要使用的附图作简单的介绍。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background technology, the following briefly introduces the accompanying drawings that are required in the embodiments or the background technology of the present application.

图1为本申请实施例提供的一种芯片平台升级方法的流程图;1 is a flowchart of a method for upgrading a chip platform provided by an embodiment of the present application;

图2为本申请实施例提供的另一种芯片平台升级方法的流程图;2 is a flowchart of another method for upgrading a chip platform provided by an embodiment of the present application;

图3为本申请实施例提供的一种芯片平台升级装置的结构示意图;3 is a schematic structural diagram of an apparatus for upgrading a chip platform according to an embodiment of the present application;

图4为本申请实施例提供的一种电子设备的结构示意图。FIG. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.

具体实施方式Detailed ways

为了使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请作进一步地描述。In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described below with reference to the accompanying drawings.

本申请的说明书、权利要求书及附图中的术语“第一”和“第二”等仅用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们的任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备等,没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元等,或可选地还包括对于这些过程、方法、产品或设备等固有的其它步骤或单元。The terms "first" and "second" in the description, claims and drawings of the present application are only used to distinguish different objects, rather than to describe a specific order. 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 device, etc. that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes unlisted steps or units, etc., or optional It also includes other steps or units inherent to these processes, methods, products or devices, etc.

在本文中提及的“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员可以显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor a separate or alternative embodiment that is mutually exclusive of other embodiments. Those skilled in the art will understand, both explicitly and implicitly, that the embodiments described herein may be combined with other embodiments.

在本申请中,“至少一个(项)”是指一个或者多个,“多个”是指两个或两个以上,“至少两个(项)”是指两个或三个及三个以上,“和/或”,用于描述关联对象的关联关系,表示可以存在三种关系,例如,“A和/或B”可以表示:只存在A,只存在B以及同时存在A和B三种情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指这些项中的任意组合。例如,a,b或c中的至少一项(个),可以表示:a,b,c,“a和b”,“a和c”,“b和c”,或“a和b和c”。In this application, "at least one (item)" means one or more, "plurality" means two or more, "at least two (item)" means two or three and three In the above, "and/or" is used to describe the relationship of related objects, indicating that there can be three kinds of relationships, for example, "A and/or B" can mean: only A exists, only B exists, and both A and B exist three A case where A and B can be singular or plural. The character "/" generally indicates that the associated objects are an "or" relationship. "At least one of the following" or similar expressions, refers to any combination of these items. For example, at least one (a) of a, b or c, can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c" ".

本发明实施例提供了芯片平台升级方法、装置、设备以及存储介质,为更清楚地描述本发明的方案,下面先介绍一些本申请实施例提供的芯片平台升级方法、装置、设备以及存储介质所涉及的知识。The embodiments of the present invention provide a chip platform upgrade method, device, device, and storage medium. In order to describe the solution of the present invention more clearly, the following first introduces some chip platform upgrade methods, devices, devices, and storage media provided by the embodiments of the present application. knowledge involved.

芯片平台:芯片平台是由芯片厂商提供的内部包括芯片的模块,原芯片厂商还会提供对应芯片平台的烧录工具,该烧录工具可以为芯片平台执行封装后的模块的下载或者升级功能。各个芯片厂商还会为芯片平台留下进行二次开发的接口,用来为芯片平台实现客制化的一些功能。Chip platform: The chip platform is a module provided by the chip manufacturer that includes the chip inside. The original chip manufacturer will also provide a programming tool corresponding to the chip platform. The programming tool can perform the download or upgrade function of the packaged module for the chip platform. Each chip manufacturer will also leave a secondary development interface for the chip platform to realize some customized functions for the chip platform.

固件:固件是指设备内部保存的设备的驱动程序,通过固件,操作系统才能按照标准的设备驱动实现特定机器的运行动作。固件担任着一个系统最基础以及最底层的工作。在硬件设备中,固件决定着硬件设备的功能及性能。随着信息时代的来临,厂商的设计很难全面的满足客户需求,需要对固件进行升级,以提高性能或者解决软硬件上的兼容问题。Firmware: Firmware refers to the driver of the device stored inside the device. Through the firmware, the operating system can realize the operation of a specific machine according to the standard device driver. Firmware is the most basic and bottom-level work of a system. In the hardware device, the firmware determines the function and performance of the hardware device. With the advent of the information age, it is difficult for manufacturers to fully meet customer needs in their designs, and firmware needs to be upgraded to improve performance or solve compatibility problems between software and hardware.

信号与槽:信号与槽是一种高级接口,应用于对象之间的通信。信号是在特定情况下被发送的事件,槽是用于对信号进行响应的函数,与一般的函数相同,可以定义在类的任何地方,具有任何参数,可以直接被调用。槽函数与一般的函数不同的是:槽函数可以与一个信号关联,当信号被发射时,关联的槽函数会被自动执行。信号与槽能够携带任意数量和任意类型的参数,可以将很多信号与单个的槽进行连接,也可以将单个的信号与很多的槽进行连接。Signals and Slots: Signals and Slots are a high-level interface used for communication between objects. Signals are events that are sent under specific circumstances, and slots are functions used to respond to signals. Like general functions, they can be defined anywhere in a class, have any parameters, and can be called directly. The difference between slot functions and general functions is that a slot function can be associated with a signal, and when the signal is emitted, the associated slot function will be automatically executed. Signals and slots can carry any number and type of parameters, and you can connect many signals to a single slot, or you can connect a single signal to many slots.

进程与线程:进程是计算机中的程序关于某些数据集合上的一次运行活动,是计算机系统进行资源分配和调度的基本单位,是操作系统结构的基础。在当代面向线程设计的计算机结构中,进程是线程的容器。程序是指令、数据及其组织形式的描述,进程是程序的实体。线程是操作系统能够进行运算调度的最小单位,它被包含在进程之中,是进程中的实际运作单位。一条线程指的是进程中一个单一顺序的控制流,一个进程中可以并发多个线程,每条线程并行执行不同的任务。Process and thread: A process is a running activity of a program in a computer on a certain data set. It is the basic unit of resource allocation and scheduling in a computer system and the basis of the operating system structure. In contemporary computer architectures with thread-oriented design, processes are containers for threads. A program is a description of instructions, data, and their organization, and a process is the entity of a program. Thread is the smallest unit that the operating system can perform operation scheduling. It is included in the process and is the actual operation unit in the process. A thread refers to a single sequential control flow in a process. A process can have multiple threads concurrently, and each thread executes different tasks in parallel.

随着时代的发展,各类芯片平台在生活中的用途日益广泛。对于各类芯片平台,往往需要进行软件上的升级以满足,以满足实际应用需求。With the development of the times, various chip platforms are increasingly used in daily life. For various chip platforms, software upgrades are often required to meet practical application requirements.

目前,芯片平台软件上的升级包括固件的升级以及客制化功能的定制。对于固件的升级可采用芯片平台提供厂家提供的升级程序实现,对于客制化功能的定制则需要针对不同类型的芯片平台开发对应的客制化函数。At present, the upgrade of the chip platform software includes firmware upgrade and customization of customized functions. The firmware upgrade can be implemented by using the upgrade program provided by the chip platform manufacturer. For the customization of customized functions, it is necessary to develop corresponding customized functions for different types of chip platforms.

但是,因为对于不同类型的芯片平台需要定制开发多个升级程序进行升级和测试,开发人员的工作冗余复杂,导致芯片平台升级和测试的效率低。However, because multiple upgrade programs need to be customized and developed for different types of chip platforms for upgrade and testing, the work of developers is redundant and complicated, resulting in low efficiency of chip platform upgrade and testing.

针对上述方法存在的缺陷,本申请实施例提供了一种芯片平台升级方法,应用于电子设备,上述电子设备安装有芯片平台升级程序,上述芯片平台升级程序用于连接至少一个芯片平台,上述芯片平台升级程序包括第一进程,如图1所示,该方法包括以下步骤:In view of the defects of the above methods, the embodiments of the present application provide a method for upgrading a chip platform, which is applied to an electronic device. The platform upgrade program includes a first process, as shown in Figure 1, the method includes the following steps:

101、通过第一进程创建第一线程和第二线程。101. Create a first thread and a second thread through the first process.

由于上述第一线程和上述第二线程由上述第一进程创建,因此共享上述第一进程的所有资源,该所有资源包括上述第一进程获得的字段信息、函数等,上述第一进程能够访问的内存,上述第一线程和上述第二线程也可以访问。上述第一线程用于上述第一芯片平台的固件升级,上述第二线程用于在上述第一芯片平台的固件升级成功的情况下,对该第一芯片平台进行测试,得到测试进度和测试结果。Since the above-mentioned first thread and the above-mentioned second thread are created by the above-mentioned first process, they share all the resources of the above-mentioned first process, and all the resources include the field information, functions, etc. obtained by the above-mentioned first process, and the above-mentioned first process can access The memory, the first thread mentioned above and the second thread mentioned above can also be accessed. The above-mentioned first thread is used for the firmware upgrade of the above-mentioned first chip platform, and the above-mentioned second thread is used to test the first chip platform when the firmware upgrade of the above-mentioned first chip platform is successful, and obtain the test progress and test result. .

102、通过上述第一线程根据芯片平台与接口函数的对应关系确定与第一芯片平台对应的第一接口函数,调用上述第一接口函数。102. Determine a first interface function corresponding to the first chip platform according to the corresponding relationship between the chip platform and the interface function through the first thread, and call the first interface function.

上述第一芯片平台为上述至少一个芯片平台中的任意一个,在上述至少一个芯片平台中的每一个芯片平台都有着对应的接口函数;通过上述第一线程获取上述第一芯片平台对应的上述接口函数,并调用该第一接口函数可以对上述第一芯片平台上的固件进行升级。上述第一接口函数包括对上述第一芯片平台进行格式化以及升级的函数,格式化函数用于清除上述第一芯片平台已有的数据,升级函数用于将需要烧录的软件文件写入上述第一芯片平台。The above-mentioned first chip platform is any one of the above-mentioned at least one chip platform, and each chip platform in the above-mentioned at least one chip platform has a corresponding interface function; the above-mentioned interface corresponding to the above-mentioned first chip platform is obtained through the above-mentioned first thread function, and calling the first interface function can upgrade the firmware on the above-mentioned first chip platform. The above-mentioned first interface function includes a function for formatting and upgrading the above-mentioned first chip platform, the formatting function is used to clear the existing data of the above-mentioned first chip platform, and the upgrade function is used to write the software file that needs to be burned into the above-mentioned The first chip platform.

在本申请的一些实施例中,上述第一接口函数包括第一全擦函数、第一部分格式化函数和第一升级函数中的至少一个。In some embodiments of the present application, the above-mentioned first interface function includes at least one of a first full erase function, a first partial formatting function, and a first upgrade function.

上述第一全擦函数与上述第一部分格式化函数用于不同的升级情况,在需要擦除上述第一芯片平台上的数据,对该第一芯片平台上的固件重新下载的情况下,上述第一线程执行该第一全擦函数;在对该第一芯片平台上的固件进行更新的情况下,上述第一线程执行该第一部分格式化函数,清除更新固件对应的存储区域上已有的数据。The above-mentioned first full erase function and the above-mentioned first part of the formatting function are used in different upgrade situations. When the data on the above-mentioned first chip platform needs to be erased, and the firmware on the first chip platform is re-downloaded, the above-mentioned first chip platform. A thread executes the first full erase function; in the case of updating the firmware on the first chip platform, the first thread executes the first part of the formatting function to clear the existing data in the storage area corresponding to the updated firmware .

103、通过上述第二线程在固件升级成功的情况下,测试上述第一芯片平台,得到测试信息。103. Test the first chip platform through the second thread under the condition that the firmware upgrade is successful to obtain test information.

在上述固件升级的过程中,上述第一线程在该固件中写入代码段以及需要烧录的文件,该代码段用于执行某些客制化的函数。在上述固件升级成功的情况下,表示上述代码段已经写入上述第一芯片平台的固件中。上述第二线程在测试过程中,执行上述代码段对应的客制化函数,测试上述代码段对应的客制化函数的执行结果,得到上述测试信息,通过该测试信息,用户可以确定上述第一芯片平台是否升级成功,以及上述第一芯片平台在升级过程中的进度情况。During the above-mentioned firmware upgrade process, the above-mentioned first thread writes a code segment and a file to be burned in the firmware, and the code segment is used to execute some customized functions. If the firmware upgrade is successful, it means that the code segment has been written into the firmware of the first chip platform. During the testing process, the second thread executes the customized function corresponding to the above code segment, tests the execution result of the customized function corresponding to the above code segment, and obtains the above test information. Through the test information, the user can determine the above-mentioned first Whether the chip platform is successfully upgraded, and the progress of the above-mentioned first chip platform in the upgrade process.

在本申请的一些实施中,步骤103包括:In some implementations of the present application, step 103 includes:

通过上述第二线程执行客制化函数,上述客制化函数的代码段内置于上述固件;The customized function is executed by the second thread, and the code segment of the customized function is built into the firmware;

通过上述第二线程测试上述客制化函数的执行结果,得到上述测试信息。The above-mentioned test information is obtained by testing the execution result of the above-mentioned customized function through the above-mentioned second thread.

在上述第一线程调用上述第一接口函数之后,上述客制化函数的代码段被写入上述第一芯片平台的固件中的对应存储区域。上述客制化函数用于实现客制化的功能,示例性的,上述客制化函数可以是写号函数、写秘钥函数、加密函数或者写地址函数等,上述写号函数用于在上述第一芯片平台的存储空间中写入产品序列号或者国际移动身份识别码等号段信息,上述写地址函数可用于写入上述第一芯片平台的蓝牙地址或者无线网络地址等其他地址信息,上述写秘钥函数用于将秘钥写入上述第一芯片平台,可用于该第一芯片平台的数据加密,上述加密函数用于将上述第一芯片平台的部分数据采用预设的加密算法进行加密处理。通过执行客制化函数以及对执行后的结果进行测试,可以在满足芯片平台的固件升级的基础上,添加一些额外的功能,满足实际运用中的新的需求,提高上述芯片平台的可拓展性。After the first thread calls the first interface function, the code segment of the customized function is written into a corresponding storage area in the firmware of the first chip platform. The above-mentioned customized function is used to realize the customized function. Exemplarily, the above-mentioned customized function may be a function of writing a number, a function of writing a secret key, an encryption function, or a function of writing an address, etc. The above-mentioned function of writing a number is used in the above The storage space of the first chip platform is written with product serial number or international mobile identity code equal sign segment information, and the above write address function can be used to write other address information such as the Bluetooth address or wireless network address of the first chip platform. The write secret key function is used to write the secret key into the above-mentioned first chip platform, which can be used for data encryption of the first chip platform, and the above-mentioned encryption function is used to encrypt part of the data of the above-mentioned first chip platform using a preset encryption algorithm. deal with. By executing the customized function and testing the result after execution, some additional functions can be added on the basis of satisfying the firmware upgrade of the chip platform, so as to meet the new requirements in practical application and improve the scalability of the above-mentioned chip platform. .

在本申请的一些实施中,上述客制化函数包括写号函数,上述方法还包括:In some implementations of the present application, the above-mentioned customized function includes a sign writing function, and the above-mentioned method further includes:

通过上述第一进程获取上述第一芯片平台的第一号段信息;Obtain the first segment information of the first chip platform through the first process;

上述通过上述第二线程执行客制化函数包括:The above-mentioned executing the customized function through the above-mentioned second thread includes:

通过上述第二线程执行上述写号函数,上述写号函数用于将上述第一号段信息写入上述第一芯片平台的号段存储空间;The above-mentioned number-writing function is executed by the above-mentioned second thread, and the above-mentioned number-writing function is used to write the above-mentioned first number-segment information into the number-segment storage space of the above-mentioned first chip platform;

上述通过上述第二线程测试上述客制化函数的执行结果,得到上述测试信息包括:The above-mentioned execution result of the above-mentioned customized function is tested by the above-mentioned second thread, and the above-mentioned test information obtained includes:

通过上述第二线程获取上述号段存储空间中的第二号段信息,比较上述第一号段信息与上述第二号段信息,获得写号测试信息,上述测试信息包括上述写号测试信息。Obtain the second number segment information in the number segment storage space through the second thread, compare the first number segment information with the second number segment information, and obtain number writing test information, where the test information includes the number writing test information.

示例性的,上述客制化函数可以是写号函数。上述第二线程执行该写号函数将上述第一号段信息写入上述第一芯片平台对应的号段存储空间,该第二线程通过获取该号段存储空间中的第二号段信息,与上述第一号段信息进行对比,获得上述写号测试信息,上述测试信息包括上述第二线程测试得到的该写号测试信息。本申请实施例通过执行客制化函数以及对执行后的结果进行测试,可以在满足芯片平台的固件升级的基础上,添加一些额外的功能,满足实际运用中的新的需求,提高上述芯片平台的可拓展性。Exemplarily, the above-mentioned customized function may be a sign writing function. The above-mentioned second thread executes the number-writing function to write the above-mentioned first number-segment information into the number-segment storage space corresponding to the above-mentioned first chip platform. The above-mentioned first number segment information is compared to obtain the above-mentioned number-writing test information, and the above-mentioned test information includes the number-writing test information obtained by the above-mentioned second thread test. By executing the customized function and testing the result after execution in the embodiments of the present application, some additional functions can be added on the basis of satisfying the firmware upgrade of the chip platform, so as to meet the new requirements in practical application and improve the above-mentioned chip platform. of scalability.

在本申请的一些实施例中,上述通过上述第一进程获取上述第一芯片平台的第一号段信息包括:In some embodiments of the present application, obtaining the first segment information of the first chip platform through the first process includes:

通过上述第一进程获取上述第一芯片平台的二维码解析信息,上述二维码解析信息包括上述第一芯片平台的上述第一号段信息;Acquire the two-dimensional code analysis information of the first chip platform through the first process, where the two-dimensional code analysis information includes the first segment information of the first chip platform;

或者,通过上述第一进程连接数据管理系统,接收上述数据管理系统发送的上述第一芯片平台的上述第一号段信息。Alternatively, the data management system is connected through the first process, and the first segment information of the first chip platform sent by the data management system is received.

上述第一进程获取上述第一号段信息的方式,本申请实施例对此不作限定。示例性的,可以通过上述第一进程扫描上述第一芯片平台的二维码,从该二维码中提取上述第一号段信息;还可以连接上述数据管理系统,由该数据管理系统向上述第一进程发送上述第一芯片平台对应的第一号段信息。本申请实施例可以通过上述两种方法获得上述第一号段信息,可以适配多种的芯片平台升级和测试场景,提高芯片平台升级和测试的效率。The manner in which the foregoing first process obtains the foregoing first segment information is not limited in this embodiment of the present application. Exemplarily, the two-dimensional code of the first chip platform can be scanned through the above-mentioned first process, and the above-mentioned first segment information can be extracted from the two-dimensional code; the above-mentioned data management system can also be connected, and the above-mentioned data management system can be sent to the above-mentioned data management system. The first process sends the first segment information corresponding to the above-mentioned first chip platform. In the embodiment of the present application, the above-mentioned first segment information can be obtained through the above-mentioned two methods, which can adapt to various chip platform upgrade and test scenarios, and improve the efficiency of chip platform upgrade and test.

在本申请的一些实施中,上述方法还包括:In some implementations of the present application, the above method further includes:

通过上述第二进程创建槽函数;Create a slot function through the above-mentioned second process;

通过上述第二线程向上述槽函数发送上述测试信息。Send the test information to the slot function through the second thread.

上述槽函数是是用于对信号进行响应的函数,上述第二线程将测试信息以信号的形式向上述槽函数发送,在上述测试信息被发送的情况下,与上述测试信息关联的槽函数会被自动执行。上述第二进程接收到上述测试信息之后,可将该测试信息展示在上述芯片平台升级程序的界面上。本申请实施例通过信号与槽函数的机制发送和接收测试信息,没有采用该第二线程直接与上述第二进程进行通信的方式,在有多个芯片平台对应的第二线程与上述第二进程进行通信的情况下,上述芯片平台升级程序可能会因为线程过多而造成数据处理的不及时,采用信号与槽函数的机制可以解决这一问题,提高芯片升级程序运行的稳定性和及时性,避免卡顿。The above-mentioned slot function is a function used to respond to a signal, and the above-mentioned second thread sends the test information to the above-mentioned slot function in the form of a signal. When the above-mentioned test information is sent, the slot function associated with the above-mentioned test information will be is executed automatically. After the second process receives the test information, the test information can be displayed on the interface of the chip platform upgrade program. This embodiment of the present application transmits and receives test information through the mechanism of signals and slot functions, and does not use the method in which the second thread directly communicates with the above-mentioned second process. In the case of communication, the above-mentioned chip platform upgrade program may cause untimely data processing due to too many threads. The use of the signal and slot function mechanism can solve this problem and improve the stability and timeliness of the chip upgrade program. Avoid stuttering.

在本申请的一些实施中,上述方法还包括:In some implementations of the present application, the above method further includes:

通过上述第二进程将上述测试信息在上述芯片平台升级程序的界面上显示。The above-mentioned test information is displayed on the interface of the above-mentioned chip platform upgrade program through the above-mentioned second process.

上述测试信息包括上述第一芯片平台在升级测试的各个步骤中的测试结果和测试进度,将上述测试信息在上述芯片平台升级程序的界面上显示可以清晰展示芯片平台升级过程中的过程信息,用户可以根据上述测试信息对升级过程进行控制,比如暂停升级过程,或者在上述测试信息表示升级出现错误的情况下,能够及时终止芯片平台的升级过程,可以提高芯片平台升级的效率。The above-mentioned test information includes the test results and test progress of the above-mentioned first chip platform in each step of the upgrade test. Displaying the above-mentioned test information on the interface of the above-mentioned chip platform upgrade program can clearly display the process information in the chip platform upgrade process. The upgrade process can be controlled according to the above test information, such as suspending the upgrade process, or when the above test information indicates that the upgrade has an error, the upgrade process of the chip platform can be terminated in time, which can improve the efficiency of the chip platform upgrade.

本申请实施例中,上述芯片平台升级程序可连接至少一个芯片平台,在连接多于一个芯片平台的情况下,为每个芯片平台创建对应的进程与线程用于芯片平台的升级和测试,无需为每个芯片平台定制开发升级程序,能够实现一个芯片平台升级程序用于多个芯片平台升级,可以提高芯片平台升级和测试的效率。In the embodiment of the present application, the above-mentioned chip platform upgrade program can be connected to at least one chip platform, and in the case of connecting more than one chip platform, a corresponding process and thread are created for each chip platform for the upgrade and testing of the chip platform, without the need for Customized development of upgrade programs for each chip platform can realize one chip platform upgrade program for multiple chip platform upgrades, which can improve the efficiency of chip platform upgrade and testing.

下面结合具体应用场景对芯片平台升级方法展开介绍,请参阅图2,该方法应用于电子设备,上述电子设备安装有芯片平台升级程序,上述芯片平台升级程序用于连接至少一个芯片平台,上述芯片平台升级程序包括第一进程,该方法包括以下步骤:The following describes the method for upgrading the chip platform in combination with specific application scenarios. Please refer to FIG. 2. The method is applied to electronic equipment. The electronic equipment is installed with a chip platform upgrading program. The chip platform upgrading program is used to connect at least one chip platform. The platform upgrade procedure includes a first process, and the method includes the steps of:

201、通过第一进程创建第一线程和第二线程。201. Create a first thread and a second thread through a first process.

步骤201与前述步骤101执行过程相同,在此不再赘述。The execution process of step 201 is the same as that of the foregoing step 101, and details are not repeated here.

202、通过第二进程创建槽函数。202. Create a slot function through the second process.

上述第二进程创建一个槽函数,该槽函数用于接收信号,在该第二线程测试完成,得到测试信息,将该测试信息以信号的形式发送至上述槽函数。The above-mentioned second process creates a slot function, the slot function is used to receive a signal, after the second thread is tested, the test information is obtained, and the test information is sent to the above-mentioned slot function in the form of a signal.

203、通过上述第一线程根据芯片平台与接口函数的对应关系确定与第一芯片平台对应的第一接口函数,调用上述第一接口函数。203. Determine, through the first thread, a first interface function corresponding to the first chip platform according to the corresponding relationship between the chip platform and the interface function, and call the first interface function.

步骤203与前述步骤102执行过程相同,在此不再赘述。The execution process of step 203 is the same as that of the foregoing step 102, and details are not repeated here.

204、通过上述第一进程获取上述第一芯片平台的第一号段信息。204. Obtain the first segment information of the first chip platform through the first process.

在实际应用中,需要向上述第一芯片平台的存储区域写入号段信息,上述第一号段信息可以是产品序列号、国际移动身份识别码等号段信息,本申请实施例对此不作限定。可选的,上述第一进程可通过扫描上述第一芯片平台对应的二维码,以获取上述第一号段信息等其他信息;上述第一进程也可以通过连接生产中的数据管理系统,接收该数据管理系统发送的上述第一号段信息等其他字段信息。In practical applications, the number segment information needs to be written into the storage area of the above-mentioned first chip platform, and the above-mentioned first number segment information may be the number segment information such as the product serial number, the international mobile identity code, etc. limited. Optionally, the above-mentioned first process can scan the QR code corresponding to the above-mentioned first chip platform to obtain the above-mentioned first number segment information and other information; the above-mentioned first process can also be connected to the data management system in production, receive The data management system sends other field information such as the above-mentioned first number segment information.

205、通过上述第二线程执行写号函数。205. Execute the number writing function through the second thread.

示例性的,客制化函数包括写号函数,该客制化函数的代码段内置于上述固件,在上述固件的升级过程中,上述客制化函数的代码段已经写入上述固件中。该写号函数用于将上述第一号段信息写入对应的号段存储区域中。Exemplarily, the customized function includes a number writing function, and the code segment of the customized function is built in the above-mentioned firmware. During the upgrade process of the above-mentioned firmware, the code segment of the above-mentioned customized function has been written into the above-mentioned firmware. The number write function is used to write the first number segment information into the corresponding number segment storage area.

206、通过上述第二线程获取第二号段信息,比较上述第一号段信息与上述第二号段信息,获得写号测试信息。206. Obtain the second segment information through the second thread, compare the first segment information with the second number segment information, and obtain number writing test information.

上述第二号段信息为上述第二线程从上述号段存储区域中读取的号段信息,比较上述第一号段信息和上述第二号段信息是否相等,可确认被写入的号段信息是否是上述第一进程获取的上述第一号段信息。The second number segment information is the number segment information read from the number segment storage area by the second thread, and the written number segment can be confirmed by comparing whether the first number segment information and the second number segment information are equal. Whether the information is the first segment information obtained by the first process.

207、通过上述第二线程向上述槽函数发送测试信息。207. Send test information to the slot function through the second thread.

上述第二线程向上述槽函数发送信号,该信号包括上述测试信息,在上述第二进程接收上该信号之后,会自动执行该槽函数,示例性的,该槽函数会将上述测试信息显示在芯片平台升级程序的界面上,该槽函数也可以将上述测试信息上传至上述数据管理系统,由该数据管理系统统一对测试中产生的数据进行管理。The above-mentioned second thread sends a signal to the above-mentioned slot function, and the signal includes the above-mentioned test information. After the above-mentioned second process receives the signal, the slot function will be automatically executed. Exemplarily, the above-mentioned test information will be displayed in the slot function. On the interface of the chip platform upgrade program, the slot function can also upload the above-mentioned test information to the above-mentioned data management system, and the data management system uniformly manages the data generated in the test.

208、通过上述第二进程将上述测试信息在上述芯片平台升级程序的界面上显示。208. Display the test information on the interface of the chip platform upgrade program through the second process.

上述第二进程将上述测试信息按照不同的芯片平台显示在上述芯片平台升级程序的界面上,可以直观观察芯片平台的升级和测试的进度以及结果。The above-mentioned second process displays the above-mentioned test information on the interface of the above-mentioned chip platform upgrade program according to different chip platforms, so that the progress and results of upgrading and testing of the chip platform can be visually observed.

本申请实施例通过上述第一进程创建第一线程和第二线程为芯片平台进行升级和测试,获取上述第一号段信息采用了两种不同的方法得到,使得芯片平台的升级与测试适用于不同的情况;对于客制化函数的测试信息,采用了信号与槽的机制与前端界面进行交互,避免多个线程与前端界面进程进行交互,可以提高上述芯片平台升级程序运行的稳定性和升级测试的效率。In this embodiment of the present application, a first thread and a second thread are created through the above-mentioned first process to upgrade and test the chip platform, and two different methods are used to obtain the above-mentioned first segment information, so that the upgrade and test of the chip platform are suitable for Different situations; for the test information of the customized function, the signal and slot mechanism is used to interact with the front-end interface, avoiding the interaction between multiple threads and the front-end interface process, which can improve the stability and upgrade of the above-mentioned chip platform upgrade program. Test efficiency.

下面结合芯片平台升级装置的结构来描述芯片平台升级的过程,图3为本申请实施例提供的一种芯片平台升级装置的结构示意图。根据图3所示,该芯片平台升级装置,应用于电子设备,上述电子设备安装有芯片平台升级程序,上述芯片平台升级程序用于连接至少一个芯片平台,上述芯片平台升级程序包括第一进程,该装置包括:The process of upgrading the chip platform is described below with reference to the structure of the device for upgrading the chip platform. FIG. 3 is a schematic structural diagram of a device for upgrading the chip platform according to an embodiment of the present application. As shown in FIG. 3 , the device for upgrading the chip platform is applied to electronic equipment. The above-mentioned electronic equipment is installed with a chip platform upgrading program, and the above-mentioned chip platform upgrading program is used to connect at least one chip platform. The above-mentioned chip platform upgrading program includes a first process. The device includes:

创建单元302,用于通过上述第一进程创建第一线程和第二线程;A creation unit 302 is used to create a first thread and a second thread through the above-mentioned first process;

确定单元303,用于通过上述第一线程根据芯片平台与接口函数的对应关系确定与第一芯片平台对应的第一接口函数;A determining unit 303, configured to determine a first interface function corresponding to the first chip platform according to the corresponding relationship between the chip platform and the interface function through the above-mentioned first thread;

调用单元304,用于通过上述第一线程调用上述第一接口函数,上述第一接口函数用于上述第一芯片平台的固件升级,上述第一芯片平台为上述至少一个芯片平台中的任意一个;The calling unit 304 is configured to call the above-mentioned first interface function through the above-mentioned first thread, the above-mentioned first interface function is used for firmware upgrade of the above-mentioned first chip platform, and the above-mentioned first chip platform is any one of the above-mentioned at least one chip platform;

测试单元305,用于通过上述第二线程在上述固件升级成功的情况下,测试上述第一芯片平台,得到测试信息。The testing unit 305 is configured to test the first chip platform through the second thread under the condition that the firmware upgrade is successful to obtain test information.

在一种可能的实施方式中,上述装置还包括:In a possible implementation, the above device further includes:

显示单元307,用于通过上述第二进程将上述测试信息在上述芯片平台升级程序的界面上显示。The display unit 307 is configured to display the above-mentioned test information on the interface of the above-mentioned chip platform upgrade program through the above-mentioned second process.

在一种可能的实施方式中,上述测试单元305具体用于通过上述第二线程执行客制化函数,上述客制化函数的代码段内置于上述固件;In a possible implementation manner, the above-mentioned testing unit 305 is specifically configured to execute a customized function through the above-mentioned second thread, and the code segment of the above-mentioned customized function is built in the above-mentioned firmware;

上述测试单元305,具体用于通过上述第二线程测试上述客制化函数的执行结果,得到上述测试信息。The above-mentioned testing unit 305 is specifically configured to test the execution result of the above-mentioned customized function through the above-mentioned second thread to obtain the above-mentioned test information.

在一种可能的实施方式中,上述装置还包括:In a possible implementation, the above device further includes:

获取单元301,用于通过上述第一进程获取上述第一芯片平台的第一号段信息;an obtaining unit 301, configured to obtain the first segment information of the above-mentioned first chip platform through the above-mentioned first process;

上述测试单元305,具体用于通过上述第二线程执行上述写号函数,上述写号函数用于将上述第一号段信息写入上述第一芯片平台的号段存储空间;The above-mentioned test unit 305 is specifically configured to execute the above-mentioned number-writing function through the above-mentioned second thread, and the above-mentioned number-writing function is used to write the above-mentioned first number segment information into the number segment storage space of the above-mentioned first chip platform;

上述测试单元305,具体用于通过上述第二线程获取上述号段存储空间中的第二号段信息,比较上述第一号段信息与上述第二号段信息,获得写号测试信息,上述测试信息包括上述写号测试信息。The above-mentioned test unit 305 is specifically configured to obtain the second number segment information in the above-mentioned number segment storage space through the above-mentioned second thread, compare the above-mentioned first number segment information and the above-mentioned second number segment information, and obtain the number-writing test information, and the above-mentioned test The information includes the above-mentioned number writing test information.

在一种可能的实施方式中,上述获取单元301,具体用于通过上述第一进程获取上述第一芯片平台的二维码解析信息,上述二维码解析信息包括上述第一芯片平台的上述第一号段信息;In a possible implementation manner, the obtaining unit 301 is specifically configured to obtain the two-dimensional code analysis information of the first chip platform through the first process, and the two-dimensional code analysis information includes the first chip platform of the first chip platform. Section 1 information;

或者,通过上述第一进程连接数据管理系统,接收上述数据管理系统发送的上述第一芯片平台的上述第一号段信息。Alternatively, the data management system is connected through the first process, and the first segment information of the first chip platform sent by the data management system is received.

在一种可能的实施方式中,上述创建单元302,具体用于通过上述第二进程创建槽函数;In a possible implementation manner, the above-mentioned creation unit 302 is specifically configured to create a slot function through the above-mentioned second process;

上述装置还包括:The above device also includes:

发送单元306,用于通过上述第二线程向上述槽函数发送上述测试信息。The sending unit 306 is configured to send the above-mentioned test information to the above-mentioned slot function through the above-mentioned second thread.

应理解以上分区装置中的各个单元的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。例如,以上各个单元可以为单独设立的处理元件,也可以集成在终端的某一个芯片中实现,此外,也可以以程序代码的形式存储于控制器的存储元件中,由处理器的某一个处理元件调用并执行以上各个单元的功能。此外各个单元可以集成在一起,也可以独立实现。这里的处理元件可以是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤或以上各个单元可以通过处理器元件中的硬件的集成逻辑电路或者软件形式的指令完成。该处理元件可以是通用处理器,例如中央处理器(英文:central processing unit,简称:CPU),还可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个特定集成电路(英文:application-specific integrated circuit,简称:ASIC),或,一个或多个微处理器(英文:digitalsignal processor,简称:DSP),或,一个或者多个现场可编程门阵列(英文:field-programmable gate array,简称:FPGA)等。It should be understood that the division of each unit in the above partitioning device is only a division of logical functions, and in actual implementation, it may be fully or partially integrated into a physical entity, or may be physically separated. For example, each of the above units can be a separately established processing element, or can be integrated into a certain chip of the terminal to realize, in addition, it can also be stored in the storage element of the controller in the form of program code, and processed by a certain one of the processor. The component calls and executes the functions of each of the above units. In addition, each unit can be integrated together, or can be implemented independently. The processing element here may be an integrated circuit chip with signal processing capability. In the implementation process, each step of the above-mentioned method or each above-mentioned unit may be completed by an integrated logic circuit of hardware in the processor element or an instruction in the form of software. The processing element may be a general-purpose processor, such as a central processing unit (English: central processing unit, CPU for short), or may be one or more integrated circuits configured to implement the above method, such as one or more specific integrated circuits Circuit (English: application-specific integrated circuit, referred to as: ASIC), or, one or more microprocessors (English: digitalsignal processor, referred to as: DSP), or, one or more field programmable gate arrays (English: field -programmable gate array, referred to as: FPGA) and so on.

图4为本申请实施例提供的一种电子设备的结构示意图。如图4所示,该电子设备400包括处理器401、存储器402以及通信接口403;该处理器401、存储器402以及通信接口403通过总线相互连接。FIG. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in FIG. 4 , the electronic device 400 includes a processor 401 , a memory 402 and a communication interface 403 ; the processor 401 , the memory 402 and the communication interface 403 are connected to each other through a bus.

存储器402包括但不限于是随机存储记忆体(random access memory,RAM)、只读存储器(read-only memory,ROM)、可擦除可编程只读存储器(erasable programmablereadonly memory,EPROM)、或便携式只读存储器(compact disc read-only memory,CDROM),该存储器402用于相关指令及数据。通信接口403用于接收和发送数据,其可以实现获取单元301、发送单元306以及显示单元307的功能。The memory 402 includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable readonly memory (EPROM), or portable only memory. Read memory (compact disc read-only memory, CDROM), the memory 402 is used for related instructions and data. The communication interface 403 is used to receive and transmit data, and it can realize the functions of the acquisition unit 301 , the transmission unit 306 and the display unit 307 .

处理器401可以是一个或多个中央处理器(central processing unit,CPU),在处理器401是一个CPU的情况下,该CPU可以是单核CPU,也可以是多核CPU。具体的,处理器401可实现创建单元302、确定单元303、调用单元304以及测试单元305的功能。The processor 401 may be one or more central processing units (central processing units, CPUs). When the processor 401 is a CPU, the CPU may be a single-core CPU or a multi-core CPU. Specifically, the processor 401 can implement the functions of the creating unit 302 , the determining unit 303 , the calling unit 304 and the testing unit 305 .

该电子设备400中的处理器401用于读取该存储器402中存储的程序代码,执行前述实施例中的芯片平台升级方法。The processor 401 in the electronic device 400 is configured to read the program code stored in the memory 402 and execute the chip platform upgrading method in the foregoing embodiment.

在本申请的实施例中提供一种计算机可读存储介质,上述计算机可读存储介质存储有计算机程序,上述计算机程序被处理器执行时实现:通过第一进程创建第一线程和第二线程;通过上述第一线程根据芯片平台与接口函数的对应关系确定与第一芯片平台对应的第一接口函数,调用上述第一接口函数;通过上述第二线程在固件升级成功的情况下,测试上述第一芯片平台,得到测试信息。A computer-readable storage medium is provided in the embodiments of the present application, and the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it is realized that a first thread and a second thread are created by a first process; Determine the first interface function corresponding to the first chip platform according to the corresponding relationship between the chip platform and the interface function through the above-mentioned first thread, and call the above-mentioned first interface function; through the above-mentioned second thread, when the firmware upgrade is successful, test the above-mentioned first interface function A chip platform to obtain test information.

本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.

本发明是根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described in terms of flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each process and/or block in the flowchart illustrations and/or block diagrams, and combinations of processes and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to the processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing device to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing device produce Means for implementing the functions specified in a flow or flow of a flowchart and/or a block or blocks of a block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions The apparatus implements the functions specified in the flow or flow of the flowcharts and/or the block or blocks of the block diagrams.

Claims (10)

1. A chip platform upgrading method is applied to electronic equipment, a chip platform upgrading program is installed on the electronic equipment and used for being connected with at least one chip platform, the chip platform upgrading program comprises a first process, and the method comprises the following steps:
creating a first thread and a second thread by the first process;
determining a first interface function corresponding to a first chip platform according to a corresponding relation between the chip platform and the interface function through the first thread, and calling the first interface function, wherein the first interface function is used for upgrading the firmware of the first chip platform, and the first chip platform is any one of the at least one chip platform;
and testing the first chip platform through the second thread under the condition that the firmware is upgraded successfully to obtain test information.
2. The method of claim 1, wherein the chip platform upgrade program further comprises a second process, the method further comprising:
and displaying the test information on an interface of the chip platform upgrading program through the second process.
3. The method of any of claims 1 or 2, wherein the first interface function comprises at least one of a first erase-all function, a first partial formatting function, and a first upgrade function.
4. The method according to any of claims 1 to 3, wherein said testing said first chip platform to obtain test information comprises:
executing a customization function by the second thread, a code segment of the customization function being built into the firmware;
and testing the execution result of the customized function through the second thread to obtain the test information.
5. The method of claim 4, wherein the customization function comprises a number writing function, the method further comprising:
acquiring first number segment information of the first chip platform through the first process;
the executing, by the second thread, a customized function comprises:
executing the number writing function through the second thread, wherein the number writing function is used for writing the first number segment information into a number segment storage space of the first chip platform;
the step of testing the execution result of the customized function through the second thread to obtain the test information includes:
and acquiring second number segment information in the number segment storage space through the second thread, and comparing the first number segment information with the second number segment information to acquire number writing test information, wherein the test information comprises the number writing test information.
6. The method according to claim 5, wherein said obtaining the first segment information of the first chip platform through the first process comprises:
acquiring two-dimensional code analysis information of the first chip platform through the first process, wherein the two-dimensional code analysis information comprises the first number segment information of the first chip platform;
or, the first process is connected with a data management system, and the first number segment information of the first chip platform sent by the data management system is received.
7. The method of any one of claims 1 to 6, further comprising:
creating a slot function by the second process;
and sending the test information to the slot function through the second thread.
8. The utility model provides a chip platform upgrading device which characterized in that is applied to electronic equipment, electronic equipment installs chip platform upgrading procedure, chip platform upgrading procedure is used for connecting at least one chip platform, chip platform upgrading procedure includes first process, the device includes:
a creating unit configured to create a first thread and a second thread by the first process;
a determining unit, configured to determine, by the first thread, a first interface function corresponding to the first chip platform according to a correspondence between the chip platform and the interface function;
a calling unit, configured to call the first interface function through the first thread, where the first interface function is used for upgrading firmware of the first chip platform, and the first chip platform is any one of the at least one chip platform;
and the test unit is used for testing the first chip platform through the second thread under the condition that the firmware is upgraded successfully to obtain test information.
9. An electronic device, comprising:
a memory for storing a program;
a processor for executing the program stored in the memory, the processor being configured to perform the method of any of claims 1 to 7 when the program is executed.
10. A computer-readable storage medium, characterized in that the computer storage medium stores a computer program comprising program instructions which, when executed by a processor, cause the processor to carry out the method according to any one of claims 1 to 7.
CN202111447658.3A 2021-11-30 2021-11-30 Chip platform upgrade method and related device Active CN114296754B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111447658.3A CN114296754B (en) 2021-11-30 2021-11-30 Chip platform upgrade method and related device
PCT/CN2022/098113 WO2023098015A1 (en) 2021-11-30 2022-06-10 Chip platform upgrade method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111447658.3A CN114296754B (en) 2021-11-30 2021-11-30 Chip platform upgrade method and related device

Publications (2)

Publication Number Publication Date
CN114296754A true CN114296754A (en) 2022-04-08
CN114296754B CN114296754B (en) 2025-03-11

Family

ID=80966053

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111447658.3A Active CN114296754B (en) 2021-11-30 2021-11-30 Chip platform upgrade method and related device

Country Status (2)

Country Link
CN (1) CN114296754B (en)
WO (1) WO2023098015A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023098015A1 (en) * 2021-11-30 2023-06-08 深圳市广和通无线股份有限公司 Chip platform upgrade method and related device

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118897810B (en) * 2024-10-09 2025-02-28 北京智芯微电子科技有限公司 Operating system testing method, device and system integrating multiple chips

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103823703A (en) * 2014-03-18 2014-05-28 福州瑞芯微电子有限公司 Method and device in compatibility with different equipment with same firmware
CN107194242A (en) * 2017-03-30 2017-09-22 百富计算机技术(深圳)有限公司 Firmware upgrade method and device
CN109857437A (en) * 2019-01-22 2019-06-07 安克创新科技股份有限公司 A kind of upgrade method and system of bluetooth equipment
CN110389779A (en) * 2019-07-15 2019-10-29 合肥移瑞通信技术有限公司 The upgrade method and upgrade-system of communication module
KR20200060863A (en) * 2018-11-23 2020-06-02 주식회사제이엘텍코퍼레이션 Firmware management system and method in embedded system
CN111327454A (en) * 2020-01-20 2020-06-23 深圳市广和通无线股份有限公司 File upgrading method and device, computer equipment and storage medium
CN111651183A (en) * 2020-08-05 2020-09-11 深圳杰睿联科技有限公司 Communication module upgrading method, device, system and storage medium based on soft card
CN112100015A (en) * 2020-11-19 2020-12-18 北京智芯微电子科技有限公司 Chip testing device and chip testing method
US20200401392A1 (en) * 2019-06-21 2020-12-24 Beijing Baidu Netcom Science And Technology Co., Ltd. Method, apparatus, device and storage medium for upgrading application
CN112363736A (en) * 2020-11-11 2021-02-12 京东方科技集团股份有限公司 Method, device and storage medium for burning product serial number
CN113596077A (en) * 2021-06-10 2021-11-02 深圳市广和通无线股份有限公司 Program downloading method, device, computer equipment and storage medium
CN113709270A (en) * 2021-08-20 2021-11-26 广州易而达科技股份有限公司 Bluetooth module production system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9477848B2 (en) * 2013-03-15 2016-10-25 Insyde Software Corp. System and method for managing and diagnosing a computing device equipped with unified extensible firmware interface (UEFI)-compliant firmware
CN114003257A (en) * 2021-10-29 2022-02-01 联想(北京)信息技术有限公司 An upgrade method and device
CN114296754B (en) * 2021-11-30 2025-03-11 深圳市广和通无线股份有限公司 Chip platform upgrade method and related device

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103823703A (en) * 2014-03-18 2014-05-28 福州瑞芯微电子有限公司 Method and device in compatibility with different equipment with same firmware
CN107194242A (en) * 2017-03-30 2017-09-22 百富计算机技术(深圳)有限公司 Firmware upgrade method and device
US20190278583A1 (en) * 2017-03-30 2019-09-12 Pax Computer Technology (Shenzhen) Co., Ltd Method for updating firmware, terminal and computer readable non-volatile storage medium
KR20200060863A (en) * 2018-11-23 2020-06-02 주식회사제이엘텍코퍼레이션 Firmware management system and method in embedded system
CN109857437A (en) * 2019-01-22 2019-06-07 安克创新科技股份有限公司 A kind of upgrade method and system of bluetooth equipment
US20200401392A1 (en) * 2019-06-21 2020-12-24 Beijing Baidu Netcom Science And Technology Co., Ltd. Method, apparatus, device and storage medium for upgrading application
CN110389779A (en) * 2019-07-15 2019-10-29 合肥移瑞通信技术有限公司 The upgrade method and upgrade-system of communication module
CN111327454A (en) * 2020-01-20 2020-06-23 深圳市广和通无线股份有限公司 File upgrading method and device, computer equipment and storage medium
CN111651183A (en) * 2020-08-05 2020-09-11 深圳杰睿联科技有限公司 Communication module upgrading method, device, system and storage medium based on soft card
CN112363736A (en) * 2020-11-11 2021-02-12 京东方科技集团股份有限公司 Method, device and storage medium for burning product serial number
CN112100015A (en) * 2020-11-19 2020-12-18 北京智芯微电子科技有限公司 Chip testing device and chip testing method
CN113596077A (en) * 2021-06-10 2021-11-02 深圳市广和通无线股份有限公司 Program downloading method, device, computer equipment and storage medium
CN113709270A (en) * 2021-08-20 2021-11-26 广州易而达科技股份有限公司 Bluetooth module production system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
羽墨志: "【LTE CAT1】ML302 OpenCPU | 应用开发入门", Retrieved from the Internet <URL:https://blog.csdn.net/u011852211/article/details/115432217> *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023098015A1 (en) * 2021-11-30 2023-06-08 深圳市广和通无线股份有限公司 Chip platform upgrade method and related device

Also Published As

Publication number Publication date
CN114296754B (en) 2025-03-11
WO2023098015A1 (en) 2023-06-08

Similar Documents

Publication Publication Date Title
US9558016B2 (en) Platform system, method for changing support hardware configuration of universal extensible firmware interface basic input output system and computer program product
WO2020001112A1 (en) Application method for platform supporting multiple types of devices, and mobile terminal
CN111984263B (en) Method, device, equipment and medium for running second system application on first system
CN113505066B (en) Method for verifying tested module and verification system
CN114296754A (en) Chip platform upgrade method and related device
US20230214243A1 (en) One-machine multi-control method, apparatus, system and electronic device
CN107220085B (en) Method for automatically upgrading RAID card firmware
CN117891766B (en) Driving method, device, equipment and storage medium compatible with serial communication module
WO2016061016A1 (en) Api versioning independent of product releases
WO2019237239A1 (en) Data test method and apparatus, device/terminal/server and computer readable storage medium
CN110659210A (en) Information acquisition method and device, electronic equipment and storage medium
CN112306844A (en) Interface testing method, device, equipment and storage medium of software development system
CN114385493A (en) Performance test method and device, electronic equipment and storage medium
CN110806891B (en) Method and device for generating software version of embedded device
US20210405987A1 (en) Dynamic driver selection based on firmware for a hardware component
CN112559336A (en) Method, device and system for adaptively debugging heterogeneous computing chip and mainboard chip
CN115587026A (en) Chip testing method and device, storage medium and chip
CN115456628A (en) Intelligent contract viewing method and device based on block chain, storage medium and equipment
CN114327648A (en) Drive debugging method and device, electronic equipment and storage medium
CN113986744A (en) Method and device for testing warehouse and table components and storage medium
CN115080095B (en) Firmware download method, device, storage medium and computer equipment
CN110597707A (en) A memory out-of-bounds fault detection method and terminal device
CN117873650B (en) Real-time running environment generation system, method, computer device and storage medium
CN118708445B (en) Real-time monitoring and debugging method, device and electronic equipment for RISC-V chip
CN116820970A (en) A program testing method, device, medium and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant