CN110673872A - Improved IAP (Internet access provider) upgrading code method and system and equipment to be upgraded - Google Patents

Improved IAP (Internet access provider) upgrading code method and system and equipment to be upgraded Download PDF

Info

Publication number
CN110673872A
CN110673872A CN201910840419.0A CN201910840419A CN110673872A CN 110673872 A CN110673872 A CN 110673872A CN 201910840419 A CN201910840419 A CN 201910840419A CN 110673872 A CN110673872 A CN 110673872A
Authority
CN
China
Prior art keywords
iap
code
upgraded
chip
equipment
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
CN201910840419.0A
Other languages
Chinese (zh)
Other versions
CN110673872B (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.)
Zhuhai Core Semiconductor Co Ltd
Original Assignee
Zhuhai Core Semiconductor Co Ltd
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 Zhuhai Core Semiconductor Co Ltd filed Critical Zhuhai Core Semiconductor Co Ltd
Priority to CN201910840419.0A priority Critical patent/CN110673872B/en
Publication of CN110673872A publication Critical patent/CN110673872A/en
Application granted granted Critical
Publication of CN110673872B publication Critical patent/CN110673872B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/654Updates using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to the technical field of software, and provides an improved IAP upgrading code method, a system and a device to be upgraded, wherein the device to be upgraded comprises an IAP interface and a chip, the chip comprises a ROM and a FLASH, an IAP _ BSP code is prestored in the ROM, an IAP _ USER code is prestored in the FLASH, IAP interfaces for mutual communication are arranged on an IAP host and the device to be upgraded, an IAP developer only needs to develop the IAP _ USER code, the APP code on the device to be upgraded is upgraded through the IAP interface, the complicated chip programming process of a bottom layer is not required to be considered, and the IAP difficulty and the development and debugging cost of a product are greatly reduced.

Description

Improved IAP (Internet access provider) upgrading code method and system and equipment to be upgraded
Technical Field
The present invention relates to the technical field of software, and in particular, to an improved IAP code upgrading method, system and device to be upgraded.
Background
In electronic products, a common code upgrading method is IAP, which is In application programming In english, and the IAP upgrading principle is as follows: the code storage medium stores APP Application codes and upgrading processing codes, the English name of the APP is Application, namely Application software, when the APP Application codes identify an upgrading command during running, the APP Application codes skip from an Application code area to an upgrading processing code area to be executed, new codes are written into the Application code area according to the received upgrading command, and after the upgrading is successful, the upgraded codes are reset or powered on next time to be executed.
Since IAPs and application schemes are closely related, communication media and communication protocols of different schemes vary, developers often make different IAP communication media and protocols according to specific application schemes, for example, SD card upgrading can be performed in a scheme supporting SD card, and similarly, upgrading can be performed by wire such as UART, SWD, SPI, and USB, and wireless manners such as Bluetooth and WIFI; IAPs are basically completed by developers themselves, IAP code is usually put together with application code and only one copy is stored, IAP upgrade erases old code APP1, writes new code APP2, no APP runs if power down restarts before writing new code APP2 is completed, that is, IAP upgrade has a risk of failure. This has the following problems: firstly, developers are required to know complicated chip programming flows to perform IAP, and for most software developers, the development of the bottom layer is difficult to understand and debug, and the development difficulty is high; secondly, the IAP code is stored in the user code, the limitations that the IAP process cannot be powered off and the like often exist, the APP code is not operated after the IAP process is powered off, and the risk of IAP upgrading failure exists.
Disclosure of Invention
The invention provides an improved IAP upgrading code method, system and equipment to be upgraded, which can realize IAP upgrading without knowing complicated chip programming flow and reduce development difficulty. The invention is realized by the following technical scheme:
the first aspect of the present invention is realized as such, and is an improved IAP upgrade code method, which is used for an IAP host to upgrade an APP application code on a device to be upgraded through an IAP interface; the method comprises the following steps:
(1) pre-storing an IAP _ BSP code in a ROM of a chip of equipment to be upgraded; (2) pre-storing an IAP _ USER code in a FLASH of a chip of equipment to be upgraded;
(3) powering on the equipment to be upgraded, executing an APP code and initializing an IAP interface;
(4) the device to be upgraded confirms whether the IAP interface receives an IAP request of an IAP host, if so, the step (5) is entered, otherwise, the device continues to try to receive the IAP request;
(5) the equipment to be upgraded executes IAP _ UESR codes and carries out command analysis on the received IAP request;
(6) the IAP _ USER code analyzes whether an IAP command sent by the host computer is valid, if so, the step (7) is carried out, otherwise, the step (4) is returned;
(7) the IAP _ USER code calls an IAP _ BSP code to complete the command function specified by the IAP host;
(8) the IAP _ USER code confirms whether the IAP _ BSP code is successfully executed, if so, the step (9) is carried out, otherwise, the step (4) is returned;
(9) and the IAP _ USER code confirms whether the IAP upgrading is completed, if so, the process of the IAP upgrading code is ended, and if not, the step (4) is returned.
Preferably, while the old code APP1 is kept in the IAP upgrade process, the upgrade code is additionally saved as the code APP2, and the test and run up-to-date code APP2 is reset.
The second aspect of the present invention is implemented as such, and an apparatus to be upgraded includes an IAP interface and a chip, where the chip includes a ROM and a FLASH, where the ROM pre-stores an IAP _ BSP code and the FLASH pre-stores an IAP _ USER code.
The third aspect of the present invention is realized as such, and an improved IAP upgrade code system includes an IAP host and a device to be upgraded, where the IAP host and the device to be upgraded are provided with IAP interfaces for communicating with each other, and the device to be upgraded is provided with a chip, where the chip includes a ROM and a FLASH; the system performs the above-described improved IAP upgrade code method.
Preferably, the application scheme of the IAP interface is UART, SPI, USB, SDIO, IIC, WIFI or bluetooth.
The invention has the beneficial effects that:
compared with the prior art, the method realizes the IAP of the product in a mode of storing the IAP _ BSP code in the ROM of the chip, an IAP developer only needs to develop the IAP _ USER code and upgrade the APP code on the equipment to be upgraded through an IAP interface, the complicated chip programming process at the bottom layer is not needed to be considered, and the IAP difficulty and the development and debugging cost of the product are greatly reduced; the original old code APP1 is reserved in the IAP upgrading process of the APP codes, the upgrading codes are additionally stored as codes APP2, the latest codes APP2 are reset and detected and run, and the problem that the APP runs when the power failure restarting is caused by the interruption of the upgrading process is avoided.
Drawings
FIG. 1 is a schematic diagram of a connection of an embodiment of the present invention;
FIG. 2 is a schematic diagram of portions of a chip in the device to be upgraded of FIG. 1;
FIG. 3 is a schematic representation of the steps of a method of practicing the present invention;
wherein the reference numerals are: 10. an IAP host; 20. equipment to be upgraded; 30. an IAP interface; 40. and (3) a chip.
The following describes embodiments of the present invention in further detail with reference to the accompanying drawings.
Detailed Description
The preferred embodiment of the present invention is shown in fig. 1 to 3, which are intended to supplement the description of the text of the specification with figures for the understanding of the various features of the invention and the technical solutions as a whole, but are not to be construed as limiting the invention. In the description of the present invention, technical terms that are not specifically explained may be regarded as broad meanings in the prior art.
As shown in fig. 1-3, an improved IAP upgrade code system includes an IAP host 10 and a device 20 to be upgraded, where the IAP host 10 and the device 20 to be upgraded are provided with IAP interfaces 30 for communicating with each other, and a VCC power line and a GND ground line are further required to be electrically connected between the IAP host 10 and the device 20 to be upgraded, and preferably, the IAP interface 30 may be set to a serial bus connection mode of UART, SPI, USB, SDIO, or IIC, or a wireless connection mode of WIFI or bluetooth according to a user's requirement. The device 20 to be upgraded is provided with a chip 40, the chip 40 includes a ROM and a FLASH, wherein the ROM is a Read Only Memory, the ROM is pre-stored with an IAP _ BSP code for APP programming, the BSP in the IAP _ BSP code is an abbreviation of an english Board Support Package, the IAP _ BSP code is translated into a Board-level Support Package, is a layer between a motherboard hardware and an operating system, and belongs to a part of the operating system, the IAP _ BSP code is software specially customized for a protocol of a developer of the chip 40, the IAP _ BSP code is responsible for operations of erasing and reading the chip 40 and convenient security management, in application scheme development, in order to ensure maintainability of a product, the IAP code upgrading is necessary, the IAP needs to be programmed into the chip 40, for most developers, the complicated programming operation of the bottom layer is difficult to understand and debug, the development difficulty is large, and before the developer of the chip 40 develops the code can be solidified in the ROM of the chip 40, preventing tampering. The IAP _ BSP code is responsible for erasing, writing, reading, checking and locking the FLASH of the chip 40, and is safe to manage and convenient to operate. After the developer receives the chip 40 containing the IAP _ BSP code, the developer writes the IAP _ USER code in the FLASH of the chip 40, the IAP _ USER code is responsible for receiving and resolving commands, because the IAP _ USER code is shallow, close to the thinking habit of people, simple and easy to understand, and convenient for the developer to understand and debug, the IAP _ USER code and the IAP _ BSP code are both provided with software-level interfaces, namely interface functions, and the IAP _ USER code can call the IAP _ BSP code through the IAP _ BSP interface, and the IAP _ USER code and the IAP _ BSP code cooperate to form an improved IAP upgrade code method. IAP developers do not need to consider the complicated chip 40 programming process at the bottom layer, and realize the code upgrade of products, namely IAP, by a mode of embedding IAP _ BSP codes in ROM of the chip 40, thereby greatly reducing the IAP difficulty and the development and debugging cost of the products.
The embodiment also provides an improved IAP upgrade code method, which is used for the IAP host 10 to upgrade the APP application code on the device 20 to be upgraded through the IAP interface 30; the method comprises the following steps:
(1) pre-storing an IAP _ BSP code in a ROM of a chip of equipment to be upgraded; (2) pre-storing an IAP _ USER code in a FLASH of a chip of equipment to be upgraded;
(3) powering on the equipment to be upgraded, executing an APP code and initializing an IAP interface;
(4) the device to be upgraded confirms whether the IAP interface receives an IAP request of an IAP host, if so, the step (5) is entered, otherwise, the device continues to try to receive the IAP request;
(5) the equipment to be upgraded executes IAP _ UESR codes and carries out command analysis on the received IAP request;
(6) the IAP _ USER code analyzes whether an IAP command sent by the host computer is valid, if so, the step (7) is carried out, otherwise, the step (4) is returned;
(7) the IAP _ USER code calls an IAP _ BSP code to complete the command function specified by the IAP host;
(8) the IAP _ USER code confirms whether the IAP _ BSP code is successfully executed, if so, the step (9) is carried out, otherwise, the step (4) is returned;
(9) and the IAP _ USER code confirms whether the IAP upgrading is completed, if so, the process of the IAP upgrading code is ended, and if not, the step (4) is returned.
Specifically, while the old code APP1 is left in the IAP upgrade process, the upgrade code is additionally saved as the code APP2, and the latest code APP2 is reset and detected and run. The abnormal condition that the APP does not operate when the power failure restart is caused by the interruption of electricity in the upgrading process is avoided.
The above-mentioned embodiments are merely preferred embodiments of the present invention, and not intended to limit the scope of the invention, and it should be noted that all equivalent changes in the shape, structure and principle of the present invention should be covered by the protection scope of the present invention.

Claims (5)

1. An improved IAP upgrade code method is used for an IAP host to upgrade APP codes on equipment to be upgraded through an IAP interface; characterized in that the method comprises the following steps:
(1) pre-storing an IAP _ BSP code in a ROM of a chip of equipment to be upgraded;
(2) pre-storing an IAP _ USER code in a FLASH of a chip of equipment to be upgraded;
(3) powering on the equipment to be upgraded, executing an APP code and initializing an IAP interface;
(4) the device to be upgraded confirms whether the IAP interface receives an IAP request of an IAP host, if so, the step (5) is entered, otherwise, the device continues to try to receive the IAP request;
(5) the equipment to be upgraded executes IAP _ UESR codes and carries out command analysis on the received IAP request;
(6) the IAP _ USER code analyzes whether an IAP command sent by the host computer is valid, if so, the step (7) is carried out, otherwise, the step (4) is returned;
(7) the IAP _ USER code calls an IAP _ BSP code to complete the command function specified by the IAP host;
(8) the IAP _ USER code confirms whether the IAP _ BSP code is successfully executed, if so, the step (9) is carried out, otherwise, the step (4) is returned;
(9) and the IAP _ USER code confirms whether the IAP upgrading is completed, if so, the process of the IAP upgrading code is ended, and if not, the step (4) is returned.
2. The improved method for updating IAP code as claimed in claim 1, wherein the original old code APP1 is preserved during IAP upgrade, the upgrade code is additionally preserved as code APP2, and the latest code APP2 is reset and detected.
3. A device to be upgraded comprises an IAP interface and a chip, wherein the chip comprises a ROM and a FLASH, and is characterized in that an IAP _ BSP code is prestored in the ROM, and an IAP _ USER code is prestored in the FLASH.
4. An improved IAP upgrade code system comprises an IAP host and a device to be upgraded, wherein IAP interfaces for mutual communication are arranged on the IAP host and the device to be upgraded, a chip is arranged on the device to be upgraded, and the chip comprises a ROM and a FLASH; characterized in that the system performs the method of claim 1.
5. The improved system for updating IAP codes as claimed in claim 4, wherein the application scheme of IAP interface is UART, SPI, USB, SDIO, IIC, WIFI or Bluetooth.
CN201910840419.0A 2019-09-06 2019-09-06 Improved IAP upgrading code method, system and equipment to be upgraded Active CN110673872B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910840419.0A CN110673872B (en) 2019-09-06 2019-09-06 Improved IAP upgrading code method, system and equipment to be upgraded

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910840419.0A CN110673872B (en) 2019-09-06 2019-09-06 Improved IAP upgrading code method, system and equipment to be upgraded

Publications (2)

Publication Number Publication Date
CN110673872A true CN110673872A (en) 2020-01-10
CN110673872B CN110673872B (en) 2023-05-26

Family

ID=69076580

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910840419.0A Active CN110673872B (en) 2019-09-06 2019-09-06 Improved IAP upgrading code method, system and equipment to be upgraded

Country Status (1)

Country Link
CN (1) CN110673872B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009109145A1 (en) * 2008-03-07 2009-09-11 华为技术有限公司 A method for improving the reliability of communication devices and an apparatus thereof
CN103019788A (en) * 2012-12-14 2013-04-03 上海邮政科学研究院 Remote online upgrading method based on CAN (Controller Area Network) bus
CN106569847A (en) * 2016-10-14 2017-04-19 数源科技股份有限公司 Method for realizing IAP remote upgrade through vehicle-mounted system based on mobile network
CN109683941A (en) * 2018-12-27 2019-04-26 四川九洲空管科技有限责任公司 A kind of answering machine method for upgrading software based on single-chip on-line loaded

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009109145A1 (en) * 2008-03-07 2009-09-11 华为技术有限公司 A method for improving the reliability of communication devices and an apparatus thereof
CN103019788A (en) * 2012-12-14 2013-04-03 上海邮政科学研究院 Remote online upgrading method based on CAN (Controller Area Network) bus
CN106569847A (en) * 2016-10-14 2017-04-19 数源科技股份有限公司 Method for realizing IAP remote upgrade through vehicle-mounted system based on mobile network
CN109683941A (en) * 2018-12-27 2019-04-26 四川九洲空管科技有限责任公司 A kind of answering machine method for upgrading software based on single-chip on-line loaded

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
张曼等: "基于VxWorks的在线编程技术", 《航空计算技术》 *
王党利等: "基于STM32F10X引导程序实现USB在应用中编程", 《国外电子测量技术》 *
董炜等: "嵌入式Internet与家庭网关技术", 《计算机应用研究》 *

Also Published As

Publication number Publication date
CN110673872B (en) 2023-05-26

Similar Documents

Publication Publication Date Title
CN101431441B (en) Method for on-line updating FPGA system embedded with CPU
CN104123153A (en) Apparatus and method for firmware upgrade using USB
CN111813428A (en) Method and device for upgrading terminal firmware, electronic equipment and storage medium
CN104008060B (en) Method for detecting compatibility of plug-in and host, and detection server
CN101650662A (en) Memory device of embedded system and staring method and upgrading of firmware
EP1256057A2 (en) Modular bios update mechanism
CN105579953A (en) Flexible bootstrap code architecture
CN108509215B (en) System software replacing method and device, terminal equipment and storage medium
US8214825B2 (en) Electronic device and method for installing software
CN103455750A (en) High-security verification method and high-security verification system for embedded devices
CN116954674A (en) eMMC firmware upgrading method, firmware upgrading equipment and storage device
CN117130672A (en) Server start flow control method, system, terminal and storage medium
CN107332589A (en) A kind of device for upgrading firmware based on bluetooth
CN110673872A (en) Improved IAP (Internet access provider) upgrading code method and system and equipment to be upgraded
CN111857785A (en) MCU starting method and device and terminal equipment
CN114996717A (en) Upgrade program design method for preventing error erasure
CN112860283B (en) SP upgrade package self-identification upgrade method and device and computer equipment
CN116107673A (en) Screen adaptation method, vehicle-mounted terminal and computer storage medium
CN113778485A (en) System operation method and device of electronic chip, electronic chip and storage medium
CN110134456B (en) Method, apparatus, device and storage medium for managing operating system
CN116700833B (en) Method and device for downloading after application, system on chip, terminal and storage medium
CN108052337A (en) A kind of firmware upgrade method and device of eMMC production tools
KR100624723B1 (en) Mobile communication terminal managing hardware version and its operating method
KR101113342B1 (en) Boot-loader version managing method for mobile communication terminal
CN117714281A (en) Upgrading method and device of switch firmware and related products

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