CN103019977A - Method for automatically identifying edition by application apparatus of embedded system and starting method - Google Patents

Method for automatically identifying edition by application apparatus of embedded system and starting method Download PDF

Info

Publication number
CN103019977A
CN103019977A CN2012105250930A CN201210525093A CN103019977A CN 103019977 A CN103019977 A CN 103019977A CN 2012105250930 A CN2012105250930 A CN 2012105250930A CN 201210525093 A CN201210525093 A CN 201210525093A CN 103019977 A CN103019977 A CN 103019977A
Authority
CN
China
Prior art keywords
version
gpio
software
embedded system
application device
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.)
Pending
Application number
CN2012105250930A
Other languages
Chinese (zh)
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.)
Shanghai Gongjin Communication Technology Co Ltd
Original Assignee
Shanghai Gongjin Communication Technology 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 Shanghai Gongjin Communication Technology Co Ltd filed Critical Shanghai Gongjin Communication Technology Co Ltd
Priority to CN2012105250930A priority Critical patent/CN103019977A/en
Publication of CN103019977A publication Critical patent/CN103019977A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention relates to a method for automatically identifying edition by an application apparatus of an embedded system and a starting method, which belong to the technical field of the embedded system. A processor chip of the embedded system comprises a plurality of edition control GPIO (General Purpose Input/Output) pins. Each edition control GPIO pin is provided with a default value according to software and hardware editions of the application apparatus. According to the method for automatically identifying the edition, the embedded system calculates to obtain an edition control combination value by reading the default value of the edition control GPIO pin to further determine the software and hardware editions of the application apparatus of the embedded system, so as to simplify current pure software edition distinguishing methods and improve the convenience and the maintainability of edition information. The starting method using the method provided by the invention can provide edition information before system operation to realize distinguished starting initialization. The method for automatically identifying edition by the application apparatus of the embedded system and the starting method provided by the invention are simple in implementation model, so that the cost is low and the application range is wider.

Description

Embedding system application device is realized version automatically method and the starting method of identification
Technical field
The present invention relates to the embedded system technology field, particularly embedded system version recognition technology field specifically refers to a kind of embedding system application device realization version automatically method and the starting method of identification.
Background technology
In the informationized society of high speed development, there are every day new technology and new product to be invented release, various embedded devices are deployed to every field.In the process of research and development new product, having many times is to research and develop at the same time the similar product of many moneys, and usefulness is same set of code, for this reason, need to distinguish on numerous identical bases the difference of version.There is the multiple method that realizes the system version differentiation by software in the prior art, but increased the complicacy of code by the realization of pure software, reduced the readable and maintainable of code, in addition, the system before running software also can't carry out different system initialization operations according to the difference of version.Therefore, in the embedded system technology field, need a kind of method of simple possible badly to overcome defects of the prior art.
Summary of the invention
The objective of the invention is to have overcome above-mentioned shortcoming of the prior art, provide a kind of by setting in advance GPIO pin default value, make embedded system obtain corresponding version information by reading GPIO pin default value, thereby simplified existing pure software version differentiating method, convenience and maintainability that version information reads have been improved, simultaneously, can move prerequisite for version information in system, realize the system initialization of differentiated, and implementation is easy, realize with low cost, range of application also comparatively widely embedding system application device realize version automatically method and the starting method of identification.
In order to realize above-mentioned purpose, the embedded device that moves described embedded system has processor chips, described processor chips have a plurality of GPIO pins, it is characterized in that, several pins in described a plurality of GPIO pin are Version Control GPIO pin, described each Version Control GPIO pin all is set with default value according to the software and hardware version of embedding system application device, realizes in the embedding system application device of the present invention that the method that the software and hardware version is identified automatically may further comprise the steps:
(1) described embedded system reads the default value of described each Version Control GPIO pin;
(2) described embedded system is calculated acquisition Version Control combined value according to the default value of described each Version Control GPIO pin;
(3) described embedded system is determined the software and hardware version of described embedding system application device according to described Version Control combined value.
Realize in the method for the automatic identification of software and hardware version in this embedding system application device, described each Version Control GPIO pin is described embedding system application device, except the method that realizes this automatic identification software and hardware version, obsolete vacant GPIO pin in the operational process.
Realize in this embedding system application device that the quantity of described Version Control GPIO pin is 4 in the method for the automatic identification of software and hardware version.
Realize in the method for the automatic identification of software and hardware version in this embedding system application device, described embedded system is calculated acquisition Version Control combined value according to the default value of described each Version Control GPIO pin, be specially: the grand or version function of described operation for embedded system version, determine Version Control combined value val according to following formula:
val=gpio 1|(gpio 2<<8)|(gpio 3<<16)|(gpio 4<<24)
Wherein, gpio 1, gpio 2, gpio 3, gpio 4Be respectively the default value of described 4 Version Control GPIO pins.
The present invention also provides a kind of and realizes that based on described method embedding system application device starts the method for control, and the method for this startup control may further comprise the steps:
(A) described embedded system method according to claim 1 obtains the software and hardware version of embedding system application device;
(B) described embedded system is carried out initialization operation according to the software and hardware version of described embedding system application device;
(C) described embedded device starts.
Adopted the embedding system application device of this invention to realize version automatically method and the starting method of identification, because in a plurality of GPIO pins of the embedded device processor chips of embedded system, it is Version Control GPIO pin that several pins are arranged, each Version Control GPIO pin all is set with default value according to the software and hardware version of embedding system application device, then in the version automatic identifying method, embedded system can be calculated by the default value that reads each Version Control GPIO pin and obtain the Version Control combined value, and then determine the software and hardware version of described embedding system application device according to described Version Control combined value, thereby simplified existing pure software version differentiating method, convenience and maintainability that version information reads have been improved, simultaneously, utilize starting method of the present invention, can move prerequisite for version information in system, realize that the system of differentiated starts initialization.And embedding system application device of the present invention is realized version, and the implementation of the method for identification and starting method is easy automatically, realizes with low costly, and range of application is also comparatively extensive.
Description of drawings
Fig. 1 realizes the automatically flow chart of steps of the method for identification of software and hardware version in the embedding system application device of the present invention.
Fig. 2 is the method schematic flow sheet in actual applications that embedding system application device of the present invention starts control.
Embodiment
In order more clearly to understand technology contents of the present invention, describe in detail especially exemplified by following examples.
See also shown in Figure 1ly, be to realize in the embedding system application device of the present invention the automatically flow chart of steps of the method for identification of software and hardware version.
In one embodiment, the embedded device that moves described embedded system has processor chips, described processor chips have a plurality of GPIO pins, it is characterized in that, several pins in described a plurality of GPIO pin are Version Control GPIO pin, and described each Version Control GPIO pin all is set with default value according to the software and hardware version of embedding system application device.Realize in the described embedding system application device that the method that the software and hardware version is identified automatically may further comprise the steps:
(1) described embedded system reads the default value of described each Version Control GPIO pin;
(2) described embedded system is calculated acquisition Version Control combined value according to the default value of described each Version Control GPIO pin;
(3) described embedded system is determined the software and hardware version of described embedding system application device according to described Version Control combined value.
In a kind of more preferably embodiment, described each Version Control GPIO pin is described embedding system application device, except the method that realizes this automatic identification software and hardware version, and obsolete vacant GPIO pin in the operational process.
In further preferred embodiment, the quantity of described Version Control GPIO pin is 4, and the described embedded system of step (2) is calculated acquisition Version Control combined value according to the default value of described each Version Control GPIO pin, is specially:
Grand or the version function of described operation for embedded system version, determine Version Control combined value val according to following formula:
val=gpio 1|(gpio 2<<8)|(gpio 3<<16)|(gpio 4<<24)
Wherein, gpio 1, gpio 2, gpio 3, gpio 4Be respectively the default value of described 4 Version Control GPIO pins.
The present invention also provides a kind of method of automatically identifying based on described software and hardware version to realize that embedding system application device starts the method for control.In one embodiment, the method for described startup control may further comprise the steps:
(A) described embedded system method according to claim 1 obtains the software and hardware version of embedding system application device;
(B) described embedded system is carried out initialization operation according to the software and hardware version of described embedding system application device;
(C) described embedded device starts.
In actual applications, method of the present invention realizes by hardware planning and design in early stage.Fixing remaining several GPIO are set to different default values according to different system versions.In system starting process, software calculates system version according to the default value of these several GPIO; According to different versions, do corresponding different hardware initialization and function initialization etc. operation again.Software only need to increase a function, realizes calculating the GPIO combined value.Directly call in the place that needs the compartment system version.Can avoid like this realize distinguishing by software the complicacy of version, also Effective Raise code readable and maintainable.
It specifically can take steps flow chart as shown in Figure 2 to realize.
1. project early stage, the vacant GPIO that hardware planning is good available is referred to as Version Control GPIO.
2. according to different soft and hard part version, the default value that the good Version Control GPIO of planning is set is different.
3. calculate the combined value of GPIO according to different default values, can be used to distinguish different software and hardware versions according to the various combination value.
4. realize a grand or function in the software, be used for the combined value of calculated version control GPIO.Computing method as:
val=gpio1|(gpio2<<8)|(gpio3<<16)|(gpio4<<24)
Draw combined value val.
System start or operational process in the grand or function that can provide according to mode 4, drawing is concrete certain software and hardware version, different versions carries out some different initialization or other special operationals.
When the chip of debugging a series or similar many moneys product, convenient for the management maintenance code, usually use same set of code; And in code, increase the method for control difference version by software, and increased like this complicacy of code, readable and maintainable; And before the initialization of software difference version function, just need to distinguish version sometimes, at this moment the function of software difference version had just lost efficacy in the prior art.Method of the present invention is in the design phase in hardware early stage, and how just planning is good uses GPIO, each project that several GPIO PIN pin fixedly are provided, and the default value that these several GPIO are set is high or low; Different system versions, the combined value of GPIO is different, and for example: 4 GPIO are provided, and the default value that we can arrange 4 GPIO is respectively 1001,1010,0011 etc.; In software, realize that a function is responsible for the combined value of the GPIO that calculates the control version specially, at system starting process or in service, which version combined value and the judgement system that can obtain by calling this function GPIO are, according to the difference of version, do corresponding different work.Thereby remove the method for complicated software maintenance system version, reduce the complicacy of code, strengthen code readability and reliability, make things convenient for the developer.
Adopted the embedding system application device of this invention to realize version automatically method and the starting method of identification, because in a plurality of GPIO pins of the embedded device processor chips of embedded system, it is Version Control GPIO pin that several pins are arranged, each Version Control GPIO pin all is set with default value according to the software and hardware version of embedding system application device, then in the version automatic identifying method, embedded system can be calculated by the default value that reads each Version Control GPIO pin and obtain the Version Control combined value, and then determine the software and hardware version of described embedding system application device according to described Version Control combined value, thereby simplified existing pure software version differentiating method, convenience and maintainability that version information reads have been improved, simultaneously, utilize starting method of the present invention, can move prerequisite for version information in system, realize that the system of differentiated starts initialization.And embedding system application device of the present invention is realized version, and the implementation of the method for identification and starting method is easy automatically, realizes with low costly, and range of application is also comparatively extensive.
In this instructions, the present invention is described with reference to its specific embodiment.But, still can make various modifications and conversion obviously and not deviate from the spirit and scope of the present invention.Therefore, instructions and accompanying drawing are regarded in an illustrative, rather than a restrictive.

Claims (5)

1. realize the automatically method of identification of software and hardware version in an embedding system application device, the embedded device that moves described embedded system has processor chips, described processor chips have a plurality of GPIO pins, it is characterized in that, several pins in described a plurality of GPIO pin are Version Control GPIO pin, described each Version Control GPIO pin all is set with default value according to the software and hardware version of embedding system application device, and described method may further comprise the steps:
(1) described embedded system reads the default value of described each Version Control GPIO pin;
(2) described embedded system is calculated acquisition Version Control combined value according to the default value of described each Version Control GPIO pin;
(3) described embedded system is determined the software and hardware version of described embedding system application device according to described Version Control combined value.
2. realize the automatically method of identification of software and hardware version in the embedding system application device according to claim 1, it is characterized in that, described each Version Control GPIO pin is described embedding system application device, except the method that realizes this automatic identification software and hardware version, obsolete vacant GPIO pin in the operational process.
3. realize the automatically method of identification of software and hardware version in the embedding system application device according to claim 2, it is characterized in that the quantity of described Version Control GPIO pin is 4.
4. realize the automatically method of identification of software and hardware version in the embedding system application device according to claim 3, it is characterized in that, described embedded system is calculated acquisition Version Control combined value according to the default value of described each Version Control GPIO pin, is specially:
Grand or the version function of described operation for embedded system version, determine Version Control combined value val according to following formula:
val=gpio 1|(gpio 2<<8)|(gpio 3<<16)|(gpio 4<<24)
Wherein, gpio 1, gpio 2, gpio 3, gpio 4Be respectively the default value of described 4 Version Control GPIO pins.
5. realize that based on method claimed in claim 1 embedding system application device starts the method for control for one kind, it is characterized in that the method for described startup control may further comprise the steps:
(A) described embedded system method according to claim 1 obtains the software and hardware version of embedding system application device;
(B) described embedded system is carried out initialization operation according to the software and hardware version of described embedding system application device;
(C) described embedded device starts.
CN2012105250930A 2012-12-07 2012-12-07 Method for automatically identifying edition by application apparatus of embedded system and starting method Pending CN103019977A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012105250930A CN103019977A (en) 2012-12-07 2012-12-07 Method for automatically identifying edition by application apparatus of embedded system and starting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012105250930A CN103019977A (en) 2012-12-07 2012-12-07 Method for automatically identifying edition by application apparatus of embedded system and starting method

Publications (1)

Publication Number Publication Date
CN103019977A true CN103019977A (en) 2013-04-03

Family

ID=47968601

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012105250930A Pending CN103019977A (en) 2012-12-07 2012-12-07 Method for automatically identifying edition by application apparatus of embedded system and starting method

Country Status (1)

Country Link
CN (1) CN103019977A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105744083A (en) * 2016-04-29 2016-07-06 努比亚技术有限公司 Mobile terminal fingerprint self-adaption method and device
CN107632843A (en) * 2017-09-26 2018-01-26 郑州云海信息技术有限公司 A kind of version display system and method based on CPLD_FPGA
CN109681305A (en) * 2018-12-27 2019-04-26 凯龙高科技股份有限公司 A kind of method of SCR system automatic identification controller type
CN109697087A (en) * 2017-10-20 2019-04-30 莲花丝路科技有限公司 A kind of recognition methods for realizing application apparatus software and hardware version for POS system
CN111641419A (en) * 2020-04-29 2020-09-08 厦门紫光展锐科技有限公司 Version identification method, control method and system of radio frequency power amplifier of terminal
CN111782276A (en) * 2019-04-04 2020-10-16 福州瑞芯微电子股份有限公司 Method and terminal for automatically identifying hardware version

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070244934A1 (en) * 2006-03-30 2007-10-18 Inventec Corporation Labeling system and method
CN102033770A (en) * 2010-12-17 2011-04-27 中兴通讯股份有限公司 Touch screen firmware upgrading method and device for mobile terminal
CN102654857A (en) * 2011-03-04 2012-09-05 希姆通信息技术(上海)有限公司 Communication method capable of simulating SPI protocol by adopting GPIO interface

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070244934A1 (en) * 2006-03-30 2007-10-18 Inventec Corporation Labeling system and method
CN102033770A (en) * 2010-12-17 2011-04-27 中兴通讯股份有限公司 Touch screen firmware upgrading method and device for mobile terminal
CN102654857A (en) * 2011-03-04 2012-09-05 希姆通信息技术(上海)有限公司 Communication method capable of simulating SPI protocol by adopting GPIO interface

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105744083A (en) * 2016-04-29 2016-07-06 努比亚技术有限公司 Mobile terminal fingerprint self-adaption method and device
CN107632843A (en) * 2017-09-26 2018-01-26 郑州云海信息技术有限公司 A kind of version display system and method based on CPLD_FPGA
CN109697087A (en) * 2017-10-20 2019-04-30 莲花丝路科技有限公司 A kind of recognition methods for realizing application apparatus software and hardware version for POS system
CN109681305A (en) * 2018-12-27 2019-04-26 凯龙高科技股份有限公司 A kind of method of SCR system automatic identification controller type
CN111782276A (en) * 2019-04-04 2020-10-16 福州瑞芯微电子股份有限公司 Method and terminal for automatically identifying hardware version
CN111641419A (en) * 2020-04-29 2020-09-08 厦门紫光展锐科技有限公司 Version identification method, control method and system of radio frequency power amplifier of terminal
CN111641419B (en) * 2020-04-29 2022-02-11 厦门紫光展锐科技有限公司 Version identification method, control method and system of radio frequency power amplifier of terminal

Similar Documents

Publication Publication Date Title
CN103019977A (en) Method for automatically identifying edition by application apparatus of embedded system and starting method
TWI256587B (en) Firmware upgrading method and system executing same
CN105378689B (en) Method and apparatus for unified Extensible Firmware Interface (UEFI) driver and agreement
EP1486909A3 (en) Smart card including a jtag test controller
CN104246702A (en) Workflow compilation
WO2006026857A8 (en) Testing systems and methods for a resource constrained device
CN105335264A (en) Computer PCIE (Peripheral Component Interconnect Express) adapter card function testing method based on UEFI (Unified Extensible Firmware Interface)
CN104813307A (en) Data processing device, data processing method, and program
CN103838610B (en) A kind of method for product software automatic identification motherboard configuration information
CN103064812A (en) Method and device for quick connection of mobile device and computer
CN104156198A (en) Method and device for automatically generating software integration version updating description
CN104881311A (en) Method and apparatus for judging version compatibility
CN103246594A (en) Automatic user state network card detecting method based on Linux kernel
CN102629231B (en) A kind of method of Detection task storehouse
CN105487971A (en) Method and system for recording and reproducing operation steps in software testing
CN109918338B (en) Safety chip operating system testing device
WO2016095091A1 (en) Instrumentation of graphics instructions
RU2009105127A (en) CHANGES IN THE CONDITION OF THE ENVIRONMENT FOR CHANGE OF FUNCTIONAL CAPABILITIES
CN104461880A (en) Method for automatically detecting heap corruption in embedded system
CN103914304B (en) Method for converting different structure type parameters on basis of SAP (service access point) platforms
CN104142833A (en) Equipment dynamic management method for package test production line
CN103150251A (en) Method for intelligently acquiring automated test object
CN101382901A (en) Auto download method being independent of customer system
Paris A framework for non-intrusive load monitoring and diagnostics
CN107423068A (en) The method that a variety of file system are realized in UEFI BIOS

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20130403