CN108694015B - Program configuration method of microcontroller - Google Patents

Program configuration method of microcontroller Download PDF

Info

Publication number
CN108694015B
CN108694015B CN201710224688.5A CN201710224688A CN108694015B CN 108694015 B CN108694015 B CN 108694015B CN 201710224688 A CN201710224688 A CN 201710224688A CN 108694015 B CN108694015 B CN 108694015B
Authority
CN
China
Prior art keywords
program
module
common
common program
memory unit
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.)
Expired - Fee Related
Application number
CN201710224688.5A
Other languages
Chinese (zh)
Other versions
CN108694015A (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.)
Shencloud Technology Co Ltd
Shunda Computer Factory Co Ltd
Original Assignee
Shencloud Technology Co Ltd
Shunda Computer Factory 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 Shencloud Technology Co Ltd, Shunda Computer Factory Co Ltd filed Critical Shencloud Technology Co Ltd
Priority to CN201710224688.5A priority Critical patent/CN108694015B/en
Publication of CN108694015A publication Critical patent/CN108694015A/en
Application granted granted Critical
Publication of CN108694015B publication Critical patent/CN108694015B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0626Reducing size or complexity of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0635Configuration or reconfiguration of storage systems by changing the path, e.g. traffic rerouting, path reconfiguration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Stored Programmes (AREA)

Abstract

A method for configuring a program of a microcontroller, the microcontroller comprising a memory unit and being adapted to be disposed in an electronic device comprising a hardware module and being capable of controlling the hardware module, the method for configuring a plurality of applications associated with the hardware module and with respect to a consumption transaction in the memory unit, the method comprising the steps of: firstly, dividing each application program into a common program module and a non-common program module, wherein the common program modules are the same and are used for controlling the hardware module; then, one of the common program modules and the non-common program modules are respectively stored in different memory blocks of the memory unit. The invention can reduce the hardware cost of the memory unit.

Description

Program configuration method of microcontroller
Technical Field
The present invention relates to a program configuration method of an electronic device, and more particularly, to a program configuration method of a microcontroller disposed in an electronic device.
Background
Referring to fig. 1, a conventional microcontroller 1(Micro controller) includes a processing unit 11 and a memory unit 12, and is widely used in various electronic devices; the microcontroller 1 is provided, for example, in a Point Of Sale Terminal (Point Of Sale/POS Terminal) having a Central Processing Unit (CPU) and a card swiping module, and is used to control the card swiping module.
The memory unit 12 of the existing microcontroller 1 provided in the point-of-sale terminal generally stores an application program for financial transactions and for controlling the card-swiping module. Referring to fig. 2, in a conventional embodiment, the starting address 0x800 of the memory unit 12 stores a Boot Loader 21(Boot Loader), and stores a Visa card application 22 for processing Visa financial card billing and a Master card application 23 for processing Master financial card billing in other memory blocks. The processing unit 11 executes the application program by executing the boot program 21 to jump its memory address to the addresses 0x806, 0x808 in the memory unit 12 of the Visa card application program 22 or the Master card application program 23. The Visa card application 22 and the Master card application 23 each have a driver unit capable of controlling the card-swiping module, and the program parts of the driver units for controlling the card-swiping module are the same, so that the memory unit 12 stores two identical program parts for controlling the card-swiping module, which results in waste of memory space and relatively increases the hardware cost of the memory unit 12.
Referring to fig. 3, in another conventional embodiment, the Visa card application 22 and the Master card application 23 are integrated into an integrated program 2 and stored in the starting address 0x800 of the memory unit 12. However, although this method eliminates the setup of the start program 21, at present, the driver units of the Visa card application 22 and the Master card application 23 capable of controlling the card-swiping module are independent in the integrated program 2, i.e. the memory unit 12 still stores two identical program parts for controlling the card-swiping module. In addition, the authentication mechanisms of the Visa card application 22 and the Master card application 23 are different, and if the above program integration manner is adopted, any program code of the integration program 2 is changed in the process of the point-of-sale terminal development, the integration program 2 needs to be provided to the authentication mechanism corresponding to the Visa card application 22 and the authentication mechanism corresponding to the Master card application 23 for authentication, which easily causes delay of the whole development time course.
Disclosure of Invention
Therefore, it is an object of the present invention to provide a program configuration method for a microcontroller that can reduce the hardware cost of a memory unit.
The present invention provides a program configuration method of a microcontroller, the microcontroller comprises a memory unit and is suitable for being arranged on an electronic device comprising a hardware module and controlling the hardware module, the program configuration method of the microcontroller is used for configuring a plurality of application programs which are related to the hardware module and related to financial transactions on the memory unit, and the method comprises a step (a) and a step (b).
The step (a) is to divide each application program into a common program module and a non-common program module, wherein the common program modules are the same and used for controlling the hardware module.
The step (b) is to store one of the common program modules and the non-common program modules in different memory blocks of the memory unit.
Preferably, each application program comprises a driver unit capable of controlling the hardware module, wherein in the step (a), the common program module of each application program is divided from the driver unit of the application program.
Preferably, the step (a) comprises the sub-steps of:
(a1) dividing each driver unit into a program part for controlling the hardware module and a program part which is not used for controlling the hardware module; and
(a2) dividing each application program into a common program module and a non-common program module, wherein the common program module of each application program is the program part of the application program for controlling the hardware module, and the non-common program module of each application program comprises the program part of the application program which is not used for controlling the hardware module.
Preferably, the electronic device is a sales terminal, and the hardware module is a card swiping module, wherein in the step (a), the common program module can receive a user input by controlling the hardware module.
Preferably, in the step (a), the user input is a password string, and the portion of each application program not used for controlling the hardware module may encrypt the password string.
Preferably, further comprising a step (c): a boot program is stored in the memory unit.
Preferably, in the step (c), the boot program is stored at a start address of the memory cell.
Preferably, the start program records a start address of each non-common program module in the memory unit, each non-common program module records a start address of the common program module in the memory unit, and the common program module records a start address of each non-common program module in the memory unit.
Preferably, the microcontroller further comprises a processing unit, when the processing unit executes the boot program, the processing unit jumps to the starting address to execute a first non-common program module of the non-common program modules according to the starting address of the first non-common program module in the memory unit, and when the processing unit executes the first non-common program module, jumps to the starting address to execute the common program module according to the starting address of the common program module in the memory unit, and when the processing unit executes the common program module, jumps to the starting address to execute the first non-common program module according to the starting address of the first non-common program module in the memory unit.
Preferably, each application is associated with performing the financial transaction.
Compared with the prior art, the invention can reduce the hardware cost of the memory unit in the microcontroller.
[ description of the drawings ]
FIG. 1 is a block diagram illustrating the architecture of a conventional microcontroller;
FIG. 2 is a diagram illustrating an arrangement of application programs in a memory unit of a conventional microcontroller;
FIG. 3 is a diagram illustrating another configuration of an application program in a memory unit of a conventional microcontroller;
FIG. 4 is a block diagram illustrating a point of sale terminal including the microcontroller and a plurality of hardware modules/units;
FIG. 5 is a flow chart illustrating one embodiment of a method for program configuration of a microcontroller according to the present invention;
FIG. 6 is a diagram illustrating the partitioning of a Visa card application into a common program module and a non-common program module;
FIG. 7 is a diagram illustrating the division of a Master card application into a common program module and a non-common program module;
FIG. 8 is a diagram illustrating aspects of multiple applications disposed in the memory unit in this embodiment; and
FIG. 9 is a diagram illustrating an aspect of multiple applications disposed in the memory unit in another embodiment.
[ detailed description ] embodiments
Referring to fig. 4, the program configuration method of the microcontroller of the present invention is implemented on a microcontroller 31, and the microcontroller 31 includes a processing unit 312 and a memory unit 311 and is disposed in a point-of-sale terminal 3. The pos terminal 3 includes a central processing unit 35(CPU), a memory module 36, a card swiping module 32, a communication module 33, and a display module 34, in addition to the microcontroller 31. In addition, the card swiping module 32 includes an input interface (not shown), such as a keyboard or a touch screen.
The card swiping module 32 corresponds to a Visa card application and a Master card application related to financial transactions, both of which include a core program portion and a driver unit capable of controlling the card swiping module 32. The program configuration method of the microcontroller according to the invention is described below with respect to the point-of-sale terminal 3 and the two aforementioned application programs.
Referring to fig. 5-8, first, in step 41, as shown in fig. 6 and 7, each driver unit 52, 62 of each application 5, 6 is divided into a program part 521, 621 for controlling the card swiping module and a program part 522, 622 for controlling the card swiping module, where the program part 521, 621 for controlling the card swiping module is the same, and the program part 522, 622 for controlling the card swiping module is different. The program parts 521 and 621 for controlling the card swiping module are used for controlling the hardware action of the card swiping module 32, and the hardware action mode and type are fixed and are not different due to different software implementation, so the program parts 521 and 621 for controlling the card swiping module with the same program content can be divided from the driver units 52 and 62.
In this embodiment, after the user swipes the card through the card swiping module 32, the user needs to input a password string through the input interface of the card swiping module 32, and the program parts 521 and 621 for controlling the card swiping module are used for controlling the card swiping module 32 and obtaining the password string through the input interface. The two program portions 522, 622 that are not used to control the swipe module each contain program content for encrypting the password string because the encryption algorithms implemented by the two are different, and thus the two program portions 522, 622 that are not used to control the swipe module are different.
Next, in step 42, as shown in fig. 6 and 7, each application 5, 6 is divided into a common program module 53, 63 and a non-common program module 54, 64, wherein the common program module 53, 63 is the program part 521, 621 for controlling the card swiping module, the non-common program module 54 of the Visa card application 5 is composed of the core program part 51 of the Visa card application 5 and the program part 522 not for controlling the card swiping module, and the non-common program module 64 of the Master card application 6 is composed of the core program part 61 of the Master card application 6 and the program part 622 not for controlling the card swiping module.
Next, in step 43, as shown in fig. 8, a boot program 7, one of the two common program modules 53, 63, and the two non-common program modules 54, 64 are respectively stored in different memory blocks of the memory unit 311, wherein the boot program 7 is stored in the starting address 0x800 of the memory unit 311 and records the starting addresses 0x812, 0x814 of the memory blocks storing the two non-common program modules 54, 64, the two non-common program modules 54, 64 record the starting address 0x810 of the memory blocks storing the common program modules 53(63), and the common program module 53(63) also records the starting addresses 0x812, 0x814 of the memory blocks storing the two non-common program modules 54, 64, so that the processing unit 312 can execute the non-common program module 54 of the Visa card application 5 or the non-common program module 64 of the Master card application 6 through the boot program 7, when the common program module 53(63) needs to be executed, the common program module 53(63) is executed through the non-common program modules 54 and 64.
For example, the pos terminal 3 is installed in a shop and has a checkout software installed in its memory module 36, and is connected to a remote financial server via its communication module 33 network. The checkout software supports either "Visa card checkout" or "Master card checkout". Referring to fig. 8, when the consumer uses the Visa card to check out in the store, the store clerk operates the check out software to select "Visa card to check out", and then the consumer swipes the card through the swipe module 32 and inputs a password string through the input interface thereof, so that the cpu 35 of the pos terminal 3 triggers the processing unit 11 of the microcontroller 31 to execute the start program 7 and transmits an instruction or a signal indicating to start the Visa card application 5 to the processing unit 11. Then, the processing unit 11 jumps to the address 0x812 according to the starting address 0x812 of the non-common program module 54 of the Visa card application recorded by the boot program 7 in the memory unit 311 to execute the non-common program module 54 of the Visa card application. Then, the processing unit 11 jumps to the address 0x810 according to the common program module 53(63) recorded by the non-common program module 54 of the Visa card application at the starting address 0x810 of the memory unit 311 to execute the common program module 53(63) to control the card swiping module 32 and obtain the Visa card information of the customer and the inputted password string through the card swiping module 32. Then, the processing unit 11 jumps to the address 0x812 according to the non-common program module 54 of the Visa card application recorded by the common program module 53(63) at the starting address 0x812 of the memory unit 311 to execute the non-common program module 54 of the Visa card application, so as to encrypt the password string, and further transmit the encrypted password and the Visa card information to the financial server for authentication through the communication module 33. Then, the financial server transmits a corresponding verification result to the pos terminal 3 and displays it on the display module 34, for example, a message indicating that the card swiping was successful or failed.
In particular, by the above-mentioned program configuration method of the microcontroller according to the present invention, only one of the two common program modules 53 and 63 is stored in the memory unit 311, which saves the memory space required for storing one common program module 53 and 63 compared to the conventional program configuration method shown in fig. 2, and the Visa card application 5 or the Master card application 6 can be independently provided to the corresponding certification authority for certification during the development process of the pos terminal 3, thereby avoiding the delay of the development process. The above-described method of program allocation of the microcontroller according to the invention also saves memory space compared to the conventional method of program allocation shown in fig. 3, since in general the memory space required for storing the common program module 53, 63 is much larger than the memory space required for storing the start-up program 7.
In another embodiment, the boot program may not be provided in the memory unit 311. For example, referring to fig. 9, the non-common program module 54 of the Visa card application 5 can be stored in the starting address 0x800 of the memory unit 311, and the boot program is integrated into the non-common program module 54 so that the non-common program module 54 has the functions of the boot program, and thus, other applications stored in the memory unit 311 can be executed through the non-common program module 54.
Furthermore, it should be noted that although only the configuration of the plurality of applications corresponding to the card-swiping module 32 in the memory unit 311 of the microcontroller 31 is described herein, it is obvious that the above method can be applied to any hardware module corresponding to a plurality of applications, as long as the applications have the same program portion for controlling the hardware module.
In summary, the program allocation method of the microcontroller according to the present invention divides each application program related to the card swiping module of the pos terminal and the financial transaction into a common program module and a non-common program module for controlling the card swiping module, and stores one of the common program modules and the non-common program modules in different memory blocks of the memory unit of the microcontroller, so that the hardware cost of the memory unit of the microcontroller can be reduced while the application programs are independently installed, thereby achieving the object of the present invention.
The detailed description and examples of the present invention are given above with reference to the accompanying drawings, but the scope of the present invention is not limited thereto, and the equivalent modifications and variations within the scope of the claims of the present invention should be considered as falling within the scope of the present invention.

Claims (8)

1. A method for configuring a program of a microcontroller, the microcontroller comprising a memory unit and being adapted to be installed in and control an electronic device comprising a hardware module, the method for configuring the program of the microcontroller for configuring a plurality of applications related to the hardware module and related to financial transactions in the memory unit, the electronic device being a sales terminal, the hardware module being a card swiping module, the method comprising the steps of:
(a) dividing each application program into a common program module and a non-common program module, wherein the common program modules are the same and are used for controlling the hardware module, the common program module can receive a user input through controlling the hardware module, the user input is a password character string, and the program part of each application program, which is not used for controlling the hardware module, can encrypt the password character string; and
(b) the memory unit stores one of the common program modules and the non-common program modules, and stores the common program modules and the non-common program modules in different memory blocks of the memory unit respectively.
2. The method according to claim 1, wherein each application program comprises a driver unit capable of controlling the hardware module, and wherein in the step (a), the common program module of each application program is divided from the driver unit of the application program.
3. The program configuring method of a microcontroller according to claim 2, wherein the step (a) comprises the substeps of:
(a1) dividing each driver unit into a program part for controlling the hardware module and a program part which is not used for controlling the hardware module; and
(a2) dividing each application program into a common program module and a non-common program module, wherein the common program module of each application program is the program part of the application program for controlling the hardware module, and the non-common program module of each application program comprises the program part of the application program which is not used for controlling the hardware module.
4. The method for configuring a program of a microcontroller according to claim 1, further comprising a step (c): a boot program is stored in the memory unit.
5. The program allocation method of micro-controller according to claim 4, wherein in said step (c), said boot program is stored in a start address of said memory unit.
6. The program allocation method of claim 4, wherein the start program records a start address of each non-common program module in the memory unit, each non-common program module records a start address of the common program module in the memory unit, and the common program module records a start address of each non-common program module in the memory unit.
7. The method as claimed in claim 6, wherein the microcontroller further comprises a processing unit, when the processing unit executes the boot program, the processing unit jumps to the start address to execute a first non-common program module of the non-common program modules according to the start address of the first non-common program module in the memory unit, when the processing unit executes the first non-common program module, jumps to the start address to execute the common program module according to the start address of the common program module in the memory unit, and jumps to the start address to execute the first non-common program module according to the start address of the first non-common program module in the memory unit when the processing unit executes the common program module.
8. The method of claim 1, wherein each application is associated with performing the financial transaction.
CN201710224688.5A 2017-04-07 2017-04-07 Program configuration method of microcontroller Expired - Fee Related CN108694015B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710224688.5A CN108694015B (en) 2017-04-07 2017-04-07 Program configuration method of microcontroller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710224688.5A CN108694015B (en) 2017-04-07 2017-04-07 Program configuration method of microcontroller

Publications (2)

Publication Number Publication Date
CN108694015A CN108694015A (en) 2018-10-23
CN108694015B true CN108694015B (en) 2021-08-13

Family

ID=63842137

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710224688.5A Expired - Fee Related CN108694015B (en) 2017-04-07 2017-04-07 Program configuration method of microcontroller

Country Status (1)

Country Link
CN (1) CN108694015B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3996114B2 (en) * 2003-10-27 2007-10-24 富士通テン株式会社 How to place the program
CN101145263A (en) * 2007-10-26 2008-03-19 南京银络软件有限公司 Financial POS supervisor and its management method
CN101499053A (en) * 2008-01-31 2009-08-05 上海普芯达电子有限公司 Method for implementing configuration of microcontroller and configurable microcontroller
CN106295412A (en) * 2016-08-25 2017-01-04 深圳市波普安创技术有限公司 It is applied to operating system and the operational approach thereof of mobile POS

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3996114B2 (en) * 2003-10-27 2007-10-24 富士通テン株式会社 How to place the program
CN101145263A (en) * 2007-10-26 2008-03-19 南京银络软件有限公司 Financial POS supervisor and its management method
CN101499053A (en) * 2008-01-31 2009-08-05 上海普芯达电子有限公司 Method for implementing configuration of microcontroller and configurable microcontroller
CN106295412A (en) * 2016-08-25 2017-01-04 深圳市波普安创技术有限公司 It is applied to operating system and the operational approach thereof of mobile POS

Also Published As

Publication number Publication date
CN108694015A (en) 2018-10-23

Similar Documents

Publication Publication Date Title
US11640467B2 (en) System and methods for secure firmware validation
CN105404525B (en) Manage the method and device of the basic input output system configuration in computer system
US10089471B2 (en) System and methods for secure firmware validation
US10796318B2 (en) System to identify vulnerable card readers
CN109754515B (en) Queuing system and queuing data processing method
US20180315024A1 (en) Systems and Methods Enabling Secure Transactions from Terminal Window
US20130144737A1 (en) Point-of-Sale (POS) Machine, POS Machine Card-Payment System and Card-Payment Trading Method Thereof
CN112528305B (en) Access control method, device, electronic equipment and storage medium
CN108694015B (en) Program configuration method of microcontroller
US11315104B2 (en) Account identifier digitization abstraction
US20180018307A1 (en) Method of recording operations and method of automatically executing operations
CN110187872A (en) A kind of BIOS development approach, system and electronic equipment and storage medium
TWI630547B (en) Method for deploying programs in a microcontroller
JP2005276221A (en) Bus configuration multiplexer
JP2023523787A (en) Techniques for storing and processing data for transaction attempts by transaction cards
CN112752154A (en) Software upgrading method and device and smart television
KR20130138494A (en) Point of sales system and method for point of sales payment service
TWI757925B (en) System for making two applications run simultaneously by calling input program and method thereof
CN117615376A (en) Intelligent terminal authorization and restoration method and device based on ESAM module
TWM606960U (en) Device through call input program to perform concurrently two applications
EP3534254A1 (en) Ic chip support type terminal, ic chip setting method, and program
CN117632160A (en) Application component deployment method, device, equipment and storage medium
JP5401137B2 (en) Information management apparatus, information management method, and information processing system
CN113835762A (en) Method and system for updating default configuration of hard disk backplane
CN114218968A (en) Non-contact IC card data processing method, non-contact IC card data processing device, computer equipment and medium

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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20210813