CN112130873A - Embedded development debugging analysis method, system and storage medium - Google Patents

Embedded development debugging analysis method, system and storage medium Download PDF

Info

Publication number
CN112130873A
CN112130873A CN202011079360.7A CN202011079360A CN112130873A CN 112130873 A CN112130873 A CN 112130873A CN 202011079360 A CN202011079360 A CN 202011079360A CN 112130873 A CN112130873 A CN 112130873A
Authority
CN
China
Prior art keywords
burning
characteristic information
chip
debugging
file
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
CN202011079360.7A
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.)
Faurecia Clarion Electronics Foshan Co Ltd
Original Assignee
Faurecia Clarion Electronics Foshan 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 Faurecia Clarion Electronics Foshan Co Ltd filed Critical Faurecia Clarion Electronics Foshan Co Ltd
Priority to CN202011079360.7A priority Critical patent/CN112130873A/en
Publication of CN112130873A publication Critical patent/CN112130873A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/366Software debugging using diagnostics

Landscapes

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

Abstract

The invention relates to the technical field of data processing, in particular to an embedded development debugging analysis method, an embedded development debugging analysis system and a storage medium. The method comprises the following steps: analyzing the characteristic information file of the chip to obtain the characteristic information of the chip; judging the chip type according to the characteristic information, and adding a first burning unit adapted to the chip type in the characteristic information file; creating a burning event file, adding a second burning unit containing burning contents in the burning event file, and calling a burning method in the first burning unit through the second burning unit to complete burning of the burning contents; the system comprises an analysis module, a judgment module and a programming module. The invention realizes the programming and the programming related operation of various chips by identifying the chip types, has good compatibility, is effectively suitable for various programming scenes, has the bus data capture function and the serial port data capture function, can debug and analyze various data, and does not need to repeatedly switch debugging tools in the debugging process.

Description

Embedded development debugging analysis method, system and storage medium
Technical Field
The invention relates to the technical field of data processing, in particular to an embedded development debugging analysis method, an embedded development debugging analysis system and a storage medium.
Background
With the development of vehicle-mounted multimedia equipment, the vehicle-mounted multimedia equipment is more and more intelligent, and a plurality of vehicle-mounted electronic equipment need to use the MCU for processing, and the debugging of the system usually involves the burning link of the MCU no matter in the front-loading development stage or the rear-loading development stage of the automobile. However, the programming device in the prior art is complex in design and poor in compatibility, and generally, one programming device can only program one series of MCUs or even one type of MCUs; in addition, the existing burning equipment has single function, and when a system is debugged, other equipment is often needed to finish debugging, such as bus data capture and serial port data printing.
Disclosure of Invention
The invention aims to solve the technical problem of how to enable the data debugging equipment to be suitable for burning of various chips and have the function of completing other data debugging analysis.
In order to achieve the purpose, the invention provides an embedded development debugging analysis method, a system and a storage medium.
In a first aspect, an embedded development debugging analysis method is provided, which includes the following steps:
generating a corresponding characteristic information file according to the characteristic information of the chip;
judging the chip type according to the characteristic information, and adding a first burning unit adapted to the chip type in the characteristic information file, wherein the first burning unit comprises a burning method;
creating a burning event file, adding a second burning unit containing burning contents in the burning event file, and calling the burning method in the first burning unit through the second burning unit.
Optionally, the characteristic information includes an execution code address of the chip and PC pointer information.
Optionally, the method further comprises the following steps:
scanning a configuration file under a chip storage directory to acquire characteristic information recorded by the configuration file;
and adding a corresponding first burning unit in the characteristic information file according to the type of the characteristic information.
Optionally, the method further comprises the following steps:
detecting an externally connected serial port and initializing the serial port;
and opening the serial port, capturing serial port data to the receiving area, or sending the data of the sending area to the serial port.
Optionally, the method further comprises the following steps:
connecting a bus interface through interface firmware;
and setting an interface firmware protocol to enable the interface firmware to be matched with the baud rate of the bus interface, and acquiring bus data from the interface firmware.
In a second aspect, an embedded development and debugging analysis system is provided, the system comprising:
the analysis module is used for analyzing the characteristic information file of the chip so as to obtain the characteristic information of the chip;
the judging module is used for judging the type of the chip according to the characteristic information and adding a first burning unit containing a burning method in the characteristic information file to enable the first burning unit to correspond to the type of the chip;
and the burning module is used for creating a second burning unit containing burning contents in the burning event file and calling the burning method in the first burning unit through the second burning unit so as to complete the burning of the burning contents.
Optionally, the parsing module is further configured to scan a configuration file in a chip storage directory, obtain feature information recorded in the configuration file, and add a first burning unit corresponding to the feature information file according to the type of the feature information.
Optionally, the system further comprises a serial port data capturing module, which is used for detecting the externally connected serial port, initializing the serial port, opening the serial port, capturing serial port data to the receiving area, or sending the data of the sending area to the serial port.
Optionally, the system further includes a bus data capture module, configured to connect to the bus interface through the interface firmware, and set an interface firmware protocol, so that the interface firmware is adapted to the baud rate of the bus interface, and the bus data is obtained from the interface firmware.
In a third aspect, a storage medium is provided, where executable instructions are stored in the storage medium, and the executable instructions are used to execute the embedded development and debugging analysis method according to the first aspect.
The invention has the beneficial effects that: through discernment chip type, realize that the programming of multiple type of chip reaches the relevant operation of programming, it is compatible good, effectively be applicable to multiple scenario of programming, possess bus data simultaneously and snatch the function and serial ports data snatchs the function, can carry out the debugging and the analysis of multiple data, need not to switch over the debug tool repeatedly in the debugging process.
Drawings
FIG. 1 is a flow diagram illustrating a method for embedded development debugging analysis in accordance with an exemplary embodiment.
Fig. 2 is a flowchart illustrating an embedded development debugging analysis method according to another exemplary embodiment.
Fig. 3 is a flowchart illustrating an embedded development debugging analysis method according to another example embodiment.
FIG. 4 is a block diagram illustrating an embedded development debugging analysis system in accordance with an exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 4 is a block diagram of an embedded development, debugging and analysis system according to an exemplary embodiment, which is suitable for actions of programming an electronic control unit, capturing serial data, capturing bus data, and the like included in automobile debugging, and as shown in fig. 4, the embedded development, debugging and analysis system includes:
the analysis module 41 is configured to generate a corresponding feature information file according to the feature information of the chip;
a judging module 42, configured to judge a chip type according to the feature information, and add a first burning unit including a burning method in the feature information file, so that the first burning unit corresponds to the chip type;
and a burning module 43, configured to create a second burning unit containing burning contents in the burning event file, and call the burning method in the first burning unit through the second burning unit to complete burning of the burning contents.
Optionally, the parsing module 41 is further configured to scan a configuration file in a chip storage directory, obtain feature information recorded in the configuration file, and add a corresponding first burning unit in the feature information file according to a type of the feature information.
Optionally, the system further includes a serial data capture module 44, configured to detect an externally connected serial port and initialize the serial port, open the serial port, capture serial data to the receiving area, or send data of the sending area to the serial port.
Optionally, the system further includes a bus data capture module 45, which is configured to connect to the bus interface through the interface firmware, set an interface firmware protocol, adapt the interface firmware to the baud rate of the bus interface, and obtain the bus data from the interface firmware.
In order to further explain the usage principle of the embedded development and debugging analysis system, various usage methods of the embedded development and debugging analysis system are further explained below.
Fig. 1 is a flowchart of an embedded development, debugging and analysis method according to an exemplary embodiment, which is suitable for programming a chip of an electronic control unit during vehicle data debugging, and as shown in fig. 1, the method includes the following steps:
and S11, generating a corresponding characteristic information file according to the characteristic information of the chip.
And S12, judging the chip type according to the characteristic information, and adding a first burning unit matched with the chip type in the characteristic information file, wherein the first burning unit comprises a burning method.
And S13, creating a burning event file, adding a second burning unit containing burning contents in the burning event file, and calling the burning method in the first burning unit through the second burning unit.
In this embodiment, an application program is written based on python to implement an embedded development, debugging and analysis method, thereby implementing program programming on various chips (MCUs).
Before step S11 is executed, an elftools module is referred to and an analysis module is created, where the analysis module is actually defined as a class packagapo and a class packagaplnfo, so as to store corresponding characteristic information and use the characteristic information as a basis for judging a chip type, where the class packagapo corresponds to execution code address information of a chip, and the class packagaplnfo corresponds to PC pointer information.
Preferably, step S11 further includes: scanning a configuration file under a chip storage directory to acquire characteristic information recorded by the configuration file; step S12 further includes: and adding a corresponding first burning unit in the characteristic information file according to the type of the characteristic information. Specifically, the configuration files in the chip storage directory each record characteristic information, and the file format of the configuration files is flm format.
In step S11, a plurality of configuration files in the storage directory are in flm format, and when class package flash flag and class elf file class P are run, all configuration files are found, and the plurality of configuration files are processed to obtain the feature information recorded therein, so that the feature information is distinguished by type, and feature information files (py files) are respectively generated correspondingly; if necessary, another py format file containing the characteristic information is stored as a spare file.
When step S12 is executed, the type of the chip to be burned currently is determined based on the characteristic information contained in the characteristic information file generated in step S11, and a first burning unit is added to the characteristic information file in py format. The first burning unit is a preset and stored class for adapting to various types of chips, the first burning unit comprises burning methods, the burning methods comprise erasing, erasing and reading, and after the first burning unit is added in the characteristic information file, the next calling is waited.
Illustratively, Cypress FM4 series chips are taken as an example. After judging the chip type according to the feature information, adding a first burning unit into the feature information file, wherein the first burning unit is defined as class FM4, the class FM4 comprises burning methods of defselect _ erase (self, addr, size), defchip _ write (self, addr, data) and defchip _ read (self, addr, size, buf), and the feature information file waits to be called after adding the class FM 4. Similarly, the chip to be burned can also be an STM series chip. When any one of the above burning methods is called, the characteristic information in the class PackFlashAlgo and the class PackFlashInfo is modified or read.
Among them, the methods of defselect _ erase (self, addr, size), defchip _ write (self, addr, data), and defchip _ read (self, addr, size, buf) are explained as follows:
defsect_erase(self,addr,size)
Interface Name sect_erase
Realized/Provided by CYPRESS_FM4.py
Used by Class FM4
Parameter in Addr size
Parameter out None
Cyclic or Event Event
Description Erase Sectors
defchip_write(self,addr,data)
Interface Name chip_write
Realized/Provided by CYPRESS_FM4.py
Used by Class FM4
Parameter in addr data
Parameter out None
Cyclic or Event Event
Description Program and verify
defchip_read(self,addr,size,buff)
Interface Name chip_read
Realized/Provided by CYPRESS_FM4.py
Used by Class FM4
Parameter in addr size
Parameter out Buff
Cyclic or Event Event
Description Read mcu memory
when step S13 is executed, creating a burning event file through a program interface of the external device, where the created burning event file is a UI file, the second burning unit is a corresponding UI class, the burning event file is saved as a python file (py) after being added with the second burning unit, so that the burning event file is called more quickly, and the second burning unit contains burning contents written by a debugger; before starting burning, connecting with a chip data interface through a USB, calling a USB library module of python, and identifying an ST LINK channel or a CMSIS-DAP channel of the USB device as a burning transmission channel; and calling the reading and erasing method in the burning method in the first burning unit through the second burning unit so as to finish one-time burning of the burning content.
And as for the function of the burning method, adopting tool software for comparing file contents, and carrying out function verification in a file comparison mode. When the erasing function is verified, an erasing method is called to erase the chip data, and whether the erased file content is in an FF state after normal erasing is checked after the erasing is finished; when the reading function is verified, programming a section of program to the chip, reading the stored file and checking whether the program is consistent with the original programming program; when the erasing function is verified, a program is programmed into the chip, the software version of the programmed saved file is checked, and whether the programmed chip has abnormal functions or not is tested.
Fig. 2 is a flowchart of an embedded development and debugging analysis method according to an exemplary embodiment, which is suitable for processing serial port data during vehicle data debugging, and as shown in fig. 2, the method includes the following steps:
and S21, detecting the serial port connected externally and initializing the serial port.
And S22, opening the serial port, and capturing serial port data to a receiving area, or sending the data of the sending area to the serial port.
When steps S21 and S22 are executed, a serial module of python is quoted, and an interface of an external link is detected and initialized to be configured with the serial port to be debugged; when data is captured, a section of request code is sent to the serial port after configuration is finished, serial port data is waited to be returned by the serial port, and the serial port data is displayed in a receiving area; when the data is sent, the data is written in the sending area, and the data is sent to the serial port through the communication relation established between the data and the serial port.
Fig. 3 is a flowchart illustrating an embedded development and debugging analysis method according to an exemplary embodiment, which is suitable for capturing bus data during vehicle data debugging, and as shown in fig. 3, the method includes the following steps:
s31, connecting a bus interface through an interface firmware;
and S32, setting an interface firmware protocol to enable the interface firmware to be matched with the baud rate of the bus interface, and acquiring bus data from the interface firmware.
Illustratively, a CMSIS-DAP box is used as interface firmware and connected between a system and a bus interface, when bus data is captured, sys, xlsxwriter and serial modules are quoted, the baud rates of the bus and the CMSIS-DAP box are respectively set to be consistent, a request code is sent to the bus interface at one end, and bus data returned by the bus is waited for display and storage.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the method embodiments described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. An embedded development debugging analysis method is characterized by comprising the following steps:
generating a corresponding characteristic information file according to the characteristic information of the chip;
judging the chip type according to the characteristic information, and adding a first burning unit adapted to the chip type in the characteristic information file, wherein the first burning unit comprises a burning method;
creating a burning event file, adding a second burning unit containing burning contents in the burning event file, and calling the burning method in the first burning unit through the second burning unit.
2. The embedded development debugging analysis method of claim 1, wherein the characteristic information comprises an execution code address of a chip and PC pointer information.
3. The embedded development debugging analysis method according to claim 1 or 2, further comprising the steps of:
scanning a configuration file under a chip storage directory to acquire characteristic information recorded by the configuration file;
and adding a corresponding first burning unit in the characteristic information file according to the type of the characteristic information.
4. The embedded development debugging analysis method according to claim 1, further comprising the steps of:
detecting an externally connected serial port and initializing the serial port;
and opening the serial port, capturing serial port data to the receiving area, or sending the data of the sending area to the serial port.
5. The embedded development debugging analysis method according to claim 1, further comprising the steps of:
connecting a bus interface through interface firmware;
and setting an interface firmware protocol to enable the interface firmware to be matched with the baud rate of the bus interface, and acquiring bus data from the interface firmware.
6. An embedded development and debugging analysis system, comprising:
the analysis module is used for generating a corresponding characteristic information file according to the characteristic information of the chip;
the judging module is used for judging the type of the chip according to the characteristic information and adding a first burning unit containing a burning method in the characteristic information file to enable the first burning unit to correspond to the type of the chip;
and the burning module is used for creating a second burning unit containing burning contents in the burning event file and calling the burning method in the first burning unit through the second burning unit.
7. The embedded development, debugging and analysis system of claim 6, wherein the parsing module is further configured to scan a configuration file in a chip storage directory, obtain feature information recorded therein, and add a corresponding first burning unit to the feature information file according to a type of the feature information.
8. The embedded development, debugging and analysis system according to claim 6, further comprising a serial data capture module for detecting an externally connected serial port and initializing the serial port, and opening the serial port, capturing serial data to a receiving area, or sending data of a sending area to the serial port.
9. The embedded development, debugging and analysis system according to claim 6, further comprising a bus data capture module for connecting to the bus interface via the interface firmware and setting an interface firmware protocol to adapt the interface firmware to the baud rate of the bus interface and to obtain the bus data from the interface firmware.
10. A storage medium having stored therein executable instructions for performing the embedded development debugging analysis method of any of claims 1-5.
CN202011079360.7A 2020-10-10 2020-10-10 Embedded development debugging analysis method, system and storage medium Pending CN112130873A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011079360.7A CN112130873A (en) 2020-10-10 2020-10-10 Embedded development debugging analysis method, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011079360.7A CN112130873A (en) 2020-10-10 2020-10-10 Embedded development debugging analysis method, system and storage medium

Publications (1)

Publication Number Publication Date
CN112130873A true CN112130873A (en) 2020-12-25

Family

ID=73844116

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011079360.7A Pending CN112130873A (en) 2020-10-10 2020-10-10 Embedded development debugging analysis method, system and storage medium

Country Status (1)

Country Link
CN (1) CN112130873A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113138777A (en) * 2021-04-09 2021-07-20 长芯盛(武汉)科技有限公司 Low-cost universal multi-path programming device and programming method suitable for various programming protocols
CN114691227A (en) * 2022-04-25 2022-07-01 紫光计算机科技有限公司 Multi-mode starting method and device of BIOS (basic input output System), electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101359317A (en) * 2007-08-01 2009-02-04 英业达股份有限公司 Parallel programming system and method
US20160306548A1 (en) * 2015-01-12 2016-10-20 Yutou Technology (Hangzhou) Co., Ltd. A method for increasing burning speed of a system firmware
CN109298867A (en) * 2018-08-01 2019-02-01 京信通信系统(中国)有限公司 The offline method for burn-recording of chip, device, system and computer readable storage medium
CN110928556A (en) * 2018-09-19 2020-03-27 株洲中车时代电气股份有限公司 Automatic program burning method and device for railway vehicle, and testing method and system
CN111078235A (en) * 2019-12-13 2020-04-28 西安研祥兴业电子科技有限公司 Digital power supply chip burning method and device
CN111506318A (en) * 2019-01-31 2020-08-07 广州慧睿思通信息科技有限公司 Circuit board chip burning method, device, terminal and computer readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101359317A (en) * 2007-08-01 2009-02-04 英业达股份有限公司 Parallel programming system and method
US20160306548A1 (en) * 2015-01-12 2016-10-20 Yutou Technology (Hangzhou) Co., Ltd. A method for increasing burning speed of a system firmware
CN109298867A (en) * 2018-08-01 2019-02-01 京信通信系统(中国)有限公司 The offline method for burn-recording of chip, device, system and computer readable storage medium
CN110928556A (en) * 2018-09-19 2020-03-27 株洲中车时代电气股份有限公司 Automatic program burning method and device for railway vehicle, and testing method and system
CN111506318A (en) * 2019-01-31 2020-08-07 广州慧睿思通信息科技有限公司 Circuit board chip burning method, device, terminal and computer readable storage medium
CN111078235A (en) * 2019-12-13 2020-04-28 西安研祥兴业电子科技有限公司 Digital power supply chip burning method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113138777A (en) * 2021-04-09 2021-07-20 长芯盛(武汉)科技有限公司 Low-cost universal multi-path programming device and programming method suitable for various programming protocols
CN113138777B (en) * 2021-04-09 2022-02-01 长芯盛(武汉)科技有限公司 Low-cost universal multi-path programming device and programming method suitable for various programming protocols
CN114691227A (en) * 2022-04-25 2022-07-01 紫光计算机科技有限公司 Multi-mode starting method and device of BIOS (basic input output System), electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN101604272B (en) Apparatus and method for memory card testing
CN112130873A (en) Embedded development debugging analysis method, system and storage medium
CN111756575A (en) Performance analysis method and device of storage server and electronic equipment
WO2019227641A1 (en) Application testing method, apparatus, terminal device and medium
CN116302743A (en) USB interface testing method, system, computer equipment and storage medium
CN111459744A (en) Firmware burning method and firmware debugging method of video processing chip
CN112068530A (en) ECU (electronic control Unit) automatic testing method, system, storage medium and device
CN114610341A (en) Production line flashing method and device, electronic equipment, chip and storage medium
CN111552475B (en) Method, method and system for compiling work load test file for aging test of semiconductor memory
CN112445490A (en) File sequence processing method and device, terminal equipment and storage medium
CN109633415B (en) Abnormal chip identification method and equipment
CN110659197B (en) Application test case generation method and device and software test system
CN107678770B (en) Interface chip upgrading method and device, storage medium and processor
CN102305906B (en) Chip testing method and device
CN105446856A (en) Electronic device interface detection method and apparatus
CN100498732C (en) Universal serial bus device test system and its method
CN111610965A (en) Standard SDK (software development kit) making method and device of access control platform
CN112373419B (en) Automatic test system and method for vehicle-mounted multimedia offline configuration function
CN112182586B (en) MCU read-write protection test method, device and system
CN112445670B (en) eMMC test method and device
CN113934619A (en) Sound source testing method, system and storage medium based on Robot Framework testing Framework
JP4339269B2 (en) Mobile phone bus monitor system and method
CN117370214B (en) Program debugging method and device of controller and storage medium
JP2003114834A (en) Usb device evaluation system
CN112433734B (en) Method and device for burning firmware of solid state disk

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