CN113448863A - Method and device for testing utilization rate of dynamic stack of software of electronic control unit - Google Patents

Method and device for testing utilization rate of dynamic stack of software of electronic control unit Download PDF

Info

Publication number
CN113448863A
CN113448863A CN202110785635.7A CN202110785635A CN113448863A CN 113448863 A CN113448863 A CN 113448863A CN 202110785635 A CN202110785635 A CN 202110785635A CN 113448863 A CN113448863 A CN 113448863A
Authority
CN
China
Prior art keywords
utilization rate
stack
dynamic stack
dynamic
running
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
CN202110785635.7A
Other languages
Chinese (zh)
Other versions
CN113448863B (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.)
Dupu Suzhou New Energy Technology Co ltd
Original Assignee
Dupu Suzhou New Energy 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 Dupu Suzhou New Energy Technology Co ltd filed Critical Dupu Suzhou New Energy Technology Co ltd
Priority to CN202110785635.7A priority Critical patent/CN113448863B/en
Publication of CN113448863A publication Critical patent/CN113448863A/en
Application granted granted Critical
Publication of CN113448863B publication Critical patent/CN113448863B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The method is applied to the mobile energy storage charging pile, the running states of the electronic control unit software of the mobile energy storage charging pile in various different working scenes are simulated on a test bench, and the using rate state of a dynamic stack of the mobile energy storage charging pile in the whole running process is collected by adopting a programmable online mode adjuster to obtain the using rate data of the dynamic stack; determining the maximum utilization rate of the dynamic stack according to the utilization rate data of the dynamic stack; and judging whether stack overflow occurs in the dynamic operation process of the electronic control unit software according to the maximum utilization rate of the dynamic stack. The method for calculating the maximum utilization rate of the dynamic stack by statistics after collection is adopted, so that the separation of the state sampling and the analysis and statistics process is realized, the problem of statistical error is solved fundamentally, and meanwhile, the test development cost is reduced, and the purpose of a relatively accurate, reliable and low-price test scheme for the utilization rate of the dynamic stack of the electronic control unit software is realized.

Description

Method and device for testing utilization rate of dynamic stack of software of electronic control unit
Technical Field
The application relates to the technical field of new energy, in particular to a method and a device for testing the utilization rate of a dynamic stack of electronic control unit software, which are applied to a mobile energy storage charging pile.
Background
Along with the rapid development of new energy vehicles, the construction of portable energy storage stake has solved new energy vehicles and has gone on the road problem of charging, is equivalent to new energy vehicles's filling station. In order to safely and intelligently charge, the mobile Energy storage charging pile needs to be controlled and managed by electric control units such as an EMS (Energy Management System) and a BMS (Battery Management System). However, if the software of the electronic control unit fails during the energy supplement or charging of the new energy automobile, the new energy automobile cannot be charged, and even safety accidents may be caused. The biggest influence is that the utilization rate of the dynamic stack of the software of the electric control unit is overlarge, and the risk of overflowing the dynamic stack is easy to occur in the operation process, so that the movable energy storage charging pile is abnormally reset in work.
At present, the traditional test scheme for the utilization rate of the software dynamic stack of the electronic control unit mainly carries out real-time traversal statistics through a high-end debugger with high running speed or purchases a third-party professional performance test tool for testing. The two schemes have the common disadvantage of high investment cost, wherein the first scheme is not suitable for a chip which cannot provide a high-speed debugging interface, or a chip has a high-speed interface but a hardware circuit board of a product does not lead the interface out independently, and certain errors inevitably exist if other low-speed interfaces are adopted for sampling statistical calculation; while the second scheme is only suitable for medium and large-sized enterprises with perfect and capital-rich technical teams.
Therefore, how to fundamentally solve the problem of statistical error and reduce the test development cost so as to achieve the purpose of implementing a relatively accurate, reliable and low-cost test scheme for the utilization rate of the dynamic stack of the software of the electronic control unit is a technical problem to be solved urgently by technical personnel in the field.
Disclosure of Invention
The application provides a method and a device for testing the utilization rate of a dynamic stack of software of an electric control unit, which are applied to a mobile energy storage charging pile, so that the problem of statistical errors is fundamentally solved, and meanwhile, the test development cost is reduced, thereby achieving the purpose of a scheme for testing the utilization rate of the dynamic stack of the software of the electric control unit, which is relatively accurate, reliable and low in price.
In order to achieve the above object, the present application provides the following technical solutions:
a method for testing the utilization rate of a dynamic stack of software of an electric control unit simulates the running states of the software of the electric control unit of a movable energy storage charging pile in various different working scenes on a test bench frame, and comprises the following steps:
acquiring the utilization rate state of a dynamic stack of the mobile energy storage charging pile in the whole operation process by adopting a programmable online mode adjuster to obtain dynamic stack utilization rate data;
determining the maximum utilization rate of the dynamic stack according to the utilization rate data of the dynamic stack;
and judging whether the dynamic stack of the software of the electronic control unit overflows or not according to the maximum utilization rate of the dynamic stack.
Preferably, the method for acquiring the utilization rate state of the dynamic stack of the mobile energy storage charging pile in the whole operation process by adopting the programmable online mode adjuster obtains the utilization rate data of the dynamic stack, and comprises the following steps:
burning a test program into the electronic control unit software through the programmable online tuner, and running a first preset script in a running window of the programmable online tuner;
carrying out dynamic stack cycle state statistics on a program in a dynamic running process according to the first preset script to obtain the dynamic stack utilization rate data;
storing the dynamic stack utilization rate data to a corresponding first preset path in a binary file format to obtain a binary file;
and when the first preset script runs to a preset state, stopping running the first preset script, running a batch processing script, and entering a statistical mode of the programmable online tuner.
Preferably, determining the maximum usage rate of the dynamic stack according to the usage rate data of the dynamic stack includes:
after the programmable online tuner enters the statistical mode, running a second preset script in the statistical mode window, and performing traversal statistical calculation and analysis processing on the binary file to obtain a statistical result;
and expressing the statistical result by percentage, determining the maximum utilization rate of the dynamic stack, and storing the maximum utilization rate of the dynamic stack to a corresponding second preset path in a preset file format.
The utility model provides a testing arrangement of automatically controlled unit software dynamic stack rate of utilization, the operation state at various different work scenes of the automatically controlled unit software that electric pile is filled in portable energy storage of simulation on testboard frame, the device includes:
the first processing unit is used for acquiring the utilization rate state of a dynamic stack of the mobile energy storage charging pile in the whole operation process by adopting a programmable online mode adjuster to obtain dynamic stack utilization rate data;
the second processing unit is used for determining the maximum utilization rate of the dynamic stack according to the utilization rate data of the dynamic stack;
and the third processing unit is used for judging whether the dynamic stack of the software dynamic stack of the electronic control unit overflows or not according to the maximum utilization rate of the dynamic stack.
Preferably, the first processing unit is configured to:
burning a test program into the electronic control unit software through the programmable online tuner, and running a first preset script in a running window of the programmable online tuner;
carrying out dynamic stack cycle state statistics on a program in a dynamic running process according to the first preset script to obtain the dynamic stack utilization rate data;
storing the dynamic stack utilization rate data to a corresponding first preset path in a binary file format to obtain a binary file;
and when the first preset script runs to a preset state, stopping running the first preset script, running a batch processing script, and entering a statistical mode of the programmable online tuner.
Preferably, the second processing unit is configured to:
after the programmable online tuner enters the statistical mode, running a second preset script in the statistical mode window, and performing traversal statistical calculation and analysis processing on the binary file to obtain a statistical result;
and expressing the statistical result by percentage, determining the maximum utilization rate of the dynamic stack, and storing the maximum utilization rate of the dynamic stack to a corresponding second preset path in a preset file format.
A storage medium, which includes a stored program, wherein when the program runs, a device on which the storage medium is located is controlled to execute the method for testing the usage rate of the dynamic stack of the ecu software.
An electronic device comprising at least one processor, and at least one memory, bus connected with the processor; the processor and the memory complete mutual communication through the bus; the processor is used for calling the program instructions in the memory so as to execute the method for testing the utilization rate of the dynamic stack of the software of the electronic control unit.
The method and the device for testing the utilization rate of the dynamic stack of the electronic control unit software are applied to the mobile energy storage charging pile, the running states of the electronic control unit software of the mobile energy storage charging pile in various different working scenes are simulated on a test bench, and the utilization rate state of the dynamic stack of the mobile energy storage charging pile in the whole running process is collected by adopting a programmable online mode adjuster to obtain the utilization rate data of the dynamic stack; determining the maximum utilization rate of the dynamic stack according to the utilization rate data of the dynamic stack; and judging whether stack overflow occurs in the dynamic operation process of the electronic control unit software according to the maximum utilization rate of the dynamic stack. The method for calculating the maximum utilization rate of the dynamic stack by statistics after collection is adopted, so that the separation of the state sampling and the analysis and statistics process is realized, the problem of statistical error is solved fundamentally, and meanwhile, the test development cost is reduced, and the purpose of a relatively accurate, reliable and low-price test scheme for the utilization rate of the dynamic stack of the electronic control unit software is realized.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a system for testing the utilization rate of a software dynamic stack of an electronic control unit disclosed in an embodiment of the present application;
fig. 2 is a schematic structural diagram of a system for testing the usage rate of a dynamic stack of software of an electronic control unit, taking EMS as an example, according to an embodiment of the present application;
fig. 3 is a flowchart of a method for testing a usage rate of a dynamic stack of software of an electronic control unit according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a dynamic stack utilization status data flow of the ECUs software disclosed in an embodiment of the present application;
fig. 5 is a schematic structural diagram of a device for testing a usage rate of a dynamic stack of software of an electronic control unit according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device disclosed in an embodiment of the present application.
Detailed Description
The applicant finds that, in the prior art, there are two schemes for testing the usage rate of the dynamic stack of the software of the traditional electronic control unit: one is to perform real-time traversal statistics through a high-end debugger with high running speed; the second approach is to perform the test by purchasing a third party professional performance testing tool. The first scheme is not suitable for all electric control unit products, because a main control chip used by some electric control unit products is not provided with a high-speed debugging port for connecting a high-end debugger, and in addition, the high-end debugger is expensive and has time overhead for real-time traversal statistics, so that errors can be easily generated; the main advantages of the second scheme are that the technology is mature, the statistical data accuracy rate is relatively high, but the price is very high and even far exceeds the price of a high-end debugger. In addition, the use of these tools requires a client-side engineer using the product, relatively strong insight and application capabilities, since currently domestic programmers are essentially staying at call level, with little regard to the depth of the data structure, and the foreign performance tools are not well understood, such as the abstract interpretation principles, or at all.
The application provides a method and a device for testing the utilization rate of a dynamic stack of electronic control unit software, which are applied to a mobile energy storage charging pile and are particularly suitable for a testing system shown in figure 1, wherein the testing system comprises: the device comprises a tested product 10, a tuner 20 and an upper computer 30. Use EMS to explain as an example in this application, it is specific, the schematic diagram that EMS software dynamic stack test system was built like FIG. 2 in portable energy storage fills electric pile environment, specific implementation process: continuously acquiring the STACK utilization rate state of the tested product 10 by adopting a debugger 20 in the program running process, and storing the STACK utilization rate state to a hard disk of an upper computer 30 by using a binary file; then, the saved binary files are imported into the debugger 20 to be counted one by one, and the counted result is led into csv files to be saved in the hard disk of the upper computer 30.
The invention of the application aims to: the problem of statistical errors is fundamentally solved, and the test development cost is reduced, so that the aim of a dynamic stack utilization rate test scheme of the electronic control unit software, which is relatively accurate, reliable and low in price, is fulfilled.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 3, a flow chart of a method for testing a usage rate of a dynamic stack of software in an electronic control unit according to an embodiment of the present application is shown. As shown in fig. 3, an embodiment of the present application provides a method for testing a usage rate of a dynamic stack of electrical control unit software, which simulates operating states of the electrical control unit software of a mobile energy storage charging pile in various different working scenarios on a test bench, as shown in fig. 2, specifically, as shown in fig. 3, the method includes:
s301: and acquiring the utilization rate state of the dynamic stack of the mobile energy storage charging pile in the whole operation process by adopting a programmable online mode adjuster to obtain the utilization rate data of the dynamic stack.
It should be noted that the software STACK utilization (software STACK utilization) refers to a ratio of a chip STACK size space occupied by a software code in an operation process to a chip total size space pre-allocated to a chip, and a part of an interval of a chip memory, and is mainly used for storing temporary data, local variables of functions, parameters, and a storage space of a function call track.
In this application embodiment, above-mentioned adopt online mode ware collection able to programme the rate of utilization state that electric pile developments stack in whole operation process was filled in portable energy storage obtains dynamic stack rate of utilization data, includes:
burning a test program into the electronic control unit software through the programmable online tuner, and running a first preset script in a running window of the programmable online tuner;
carrying out dynamic stack cycle state statistics on a program in a dynamic running process according to the first preset script to obtain the dynamic stack utilization rate data;
storing the dynamic stack utilization rate data to a corresponding first preset path in a binary file format to obtain a binary file;
and when the first preset script runs to a preset state, stopping running the first preset script, running a batch processing script, and entering a statistical mode of the programmable online tuner.
Further, it should be noted that, as shown in fig. 2, the acquiring, by using the programmable online tuner, the usage status of the dynamic stack of the mobile energy storage charging pile in the whole operation process to obtain the usage data of the dynamic stack includes: entering a debugger 20 into the tested product 10 through a debugger port of the hardware circuit; an elf file generated by compiling the tested code is burned into a main chip of the tested product by adopting a debugger 20; clicking an operation button of an interface of the upper computer 30 matched with the debugger 20 to operate a program; the debugger script 1 is run in an interface of the upper computer 30 of the debugger 20, and the state of STACK utilization at each different time within a period of time acquired by the debugger 20 is exported to a file path specified by the upper computer 30 in real time, because the STACK space is defined in a byte mode, and bytes at different positions of the STACK space occupied by programs at each different time are saved as a binary file, the current byte occupation state can be very clear.
S302: and determining the maximum utilization rate of the dynamic stack according to the utilization rate data of the dynamic stack.
In this embodiment of the present application, the determining the maximum usage rate of the dynamic stack according to the usage rate data of the dynamic stack includes:
after the programmable online tuner enters the statistical mode, running a second preset script in the statistical mode window, and performing traversal statistical calculation and analysis processing on the binary file to obtain a statistical result;
and expressing the statistical result by percentage, determining the maximum utilization rate of the dynamic stack, and storing the maximum utilization rate of the dynamic stack to a corresponding second preset path in a preset file format.
Further, it should be noted that, as shown in fig. 2, the determining the maximum usage rate of the dynamic stack according to the usage rate data of the dynamic stack includes: setting debugger 20 to offline mode; running a debugger script 2 in an upper computer 30 interface of the debugger 20, traversing each binary file which is collected and stored to a computer specified path in the step S301 one by one according to bytes, identifying the number of bytes which are not 0x00, and counting; when a complete binary file is traversed, dividing the total number of bytes which is counted to be not 0x00 by the total number of bytes in the stack space to obtain the stack utilization rate at one moment; and after a complete binary file is traversed and counted completely, counting and counting the next binary file, and finally exporting the counting result to a csv-format file under the path specified by the upper computer 30 after all binary files are traversed and counted completely.
S303: and judging whether the dynamic stack of the software of the electronic control unit overflows or not according to the maximum utilization rate of the dynamic stack.
In the embodiment of the present application, the EMS in fig. 2 is specifically used for explanation, specifically, a software dynamic stack utilization rate state data flow is shown in fig. 4, and a detailed description of a specific test scheme is as follows:
according to the schematic diagram of the test system and the construction steps in FIG. 2, after the physical device is connected, the KL30 and KL15 switches are turned on; after a Lodobach debugger is adopted to burn a test program into EMS for running, a script 'stack _ coverage 1. cmm' is run in a Trace32 window of the debugger to carry out circulation state statistics on the program in the dynamic running process, and data is stored into a path corresponding to a formulated test computer in a binary file (.bin) mode; performing more than three rounds of simulated energy supplement and stopping running the 'stack _ covergae1. cm' script after the charging process is finished, running the batch processing script 'T32 _ Simlulator. bat' to enter a 'Simlulator' mode of a debugger, and automatically opening a 'Simlulator' mode window of a Trace32 program after the running is successful; and (3) running a script "stack _ covergae2. cmm" in a "Simtemplate" mode window of the Trace32 program to analyze, process and count the collected multiple binary files and store the statistical result in a percentage format in a csv file format to a disk specified path of the upper computer.
The process can be summarized as follows:
step 1: after the test device is built, a system is powered on to run a 'stack _ covergae1. cm' script;
step 2: after the energy supplementing and charging process is simulated for more than three times, the operation of a 'STACK _ coverage 1. cm' script on a debugger is stopped, and data are transmitted to the Latt Bach debugger from a STACK area of a tested electrical control unit (EMS) and then are stored under a corresponding preset path of a computer hard disk;
and step 3: importing the 'config _ sim.t 32' file into a preset test computer disk path to run a 'T32 _ Simlulator.bat' script to enter a debugger offline mode;
and 4, step 4: and running a 'stack _ covergae2. cm' script, importing each binary file collected and stored by the 'stack _ covergae1. cm' script into a debugger for traversing statistical calculation, and importing a calculation result into another preset upper computer disk path in a csv file format.
It should be further noted that, as described in the above test steps, the embodiment of the present application includes 2 debugger control scripts, 1 batch script, and 1 debugger mode state change configuration file. The 'STACK _ covergae1. cm' file is a first debugger control script and is mainly responsible for acquiring states of tested electrical control unit software STACK in a dynamic running process in a normal online mode of a debugger and saving the state information in a binary file format into a corresponding file path of a hard disk of a testing computer, and the work of the 'STACK _ covergae2. cm', the batch processing script ('T32 _ Simtemplate. bat'), and the work of a debugger mode state change configuration file ('config _ sim.t 32') are completely independent, because the operation of the 'STACK _ covergae1. cm' file does not depend on the operation of the following working products. The work of 3 products such as "stack _ cover 2. cmm", "T32 _ Simfluor. bat" and "config _ sim.t 32" has a pre-consequence relationship, and meanwhile, the statistical input source of "stack _ cover 2. cmm" is established after the normal operation of "stack _ cover 1. cmm" is finished. When the "STACK _ coverage 2. cmm" runs on the debugger, the STACK _ coverage 1.cmm "needs to be collected and stored on the hard disk of the testing computer in an offline mode to perform traversal analysis calculation by using the binary file import of the state, and the condition that the" config _ sim.t32 "file can be found under the corresponding path of the testing computer and the configuration information of the file is correct is required to be established on the basis that the" T32_ sim.
Furthermore, after the "STACK _ coverage 1. cm" script is run in the front to form a binary file under the "D: \ save" path, the script can be compiled to traverse the binary file without a debugger or by adopting other high-level languages to count the STACK utilization rate.
It should be noted that, for a technician, the technical staff needs to know the workflow of the mobile energy storage charging pile by applying the test scheme in the prior art, and how each ECU in the mobile energy storage charging pile works cooperatively; familiarity with HIL test equipment and debugger scripts is also required.
For the application, the most important thing for applying the test scheme of the present application is that technical personnel need to be familiar with the debugger script, and if the grammar of the debugger script is not familiar enough, the debugger script is difficult to be compiled to sample and analyze and count the STACK state of the program in the dynamic running process; in addition, because a test system needs to be built by adopting HIL test equipment to simulate the mobile energy storage charging pile to neutralize the charged electric automobile, other electronic control units need to be connected to the HIL by being familiar with the I/O interface definition of the HIL equipment to form a complete test system.
The embodiment of the application provides a method for testing the utilization rate of a dynamic stack of electronic control unit software, which is applied to a mobile energy storage charging pile, the method simulates the running states of the electronic control unit software of the mobile energy storage charging pile in various different working scenes on a test bench, and the utilization rate state of the dynamic stack of the mobile energy storage charging pile in the whole running process is collected by adopting a programmable online mode adjuster to obtain the utilization rate data of the dynamic stack; determining the maximum utilization rate of the dynamic stack according to the utilization rate data of the dynamic stack; and judging whether stack overflow occurs in the dynamic operation process of the electronic control unit software according to the maximum utilization rate of the dynamic stack. The method for calculating the maximum utilization rate of the dynamic stack by statistics after collection is adopted, so that the separation of the state sampling and the analysis and statistics process is realized, the problem of statistical error is solved fundamentally, and meanwhile, the test development cost is reduced, and the purpose of a relatively accurate, reliable and low-price test scheme for the utilization rate of the dynamic stack of the electronic control unit software is realized.
Referring to fig. 5, based on the method for testing the utilization rate of the dynamic stack of the software of the electronic control unit disclosed in the above embodiment, this embodiment correspondingly discloses a device for testing the utilization rate of the dynamic stack of the software of the electronic control unit, which simulates the operating states of the software of the electronic control unit of the mobile energy storage charging pile in various different working scenes on a test bench, and the device includes:
the first processing unit 501 is configured to acquire the usage rate state of the dynamic stack of the mobile energy storage charging pile in the whole operation process by using a programmable online tuner, so as to obtain usage rate data of the dynamic stack;
a second processing unit 502, configured to determine a maximum usage rate of a dynamic stack according to the dynamic stack usage rate data;
the third processing unit 503 is configured to determine whether a dynamic stack overflow occurs in the dynamic stack of the electronic control unit software according to the maximum utilization rate of the dynamic stack.
Further, the first processing unit 501 is configured to:
burning a test program into the electronic control unit software through the programmable online tuner, and running a first preset script in a running window of the programmable online tuner;
carrying out dynamic stack cycle state statistics on a program in a dynamic running process according to the first preset script to obtain the dynamic stack utilization rate data;
storing the dynamic stack utilization rate data to a corresponding first preset path in a binary file format to obtain a binary file;
and when the first preset script runs to a preset state, stopping running the first preset script, running a batch processing script, and entering a statistical mode of the programmable online tuner.
Further, the second processing unit 502 is configured to:
after the programmable online tuner enters the statistical mode, running a second preset script in the statistical mode window, and performing traversal statistical calculation and analysis processing on the binary file to obtain a statistical result;
and expressing the statistical result by percentage, determining the maximum utilization rate of the dynamic stack, and storing the maximum utilization rate of the dynamic stack to a corresponding second preset path in a preset file format.
The device for testing the utilization rate of the software dynamic stack of the electronic control unit comprises a processor and a memory, wherein the first control unit, the second control unit, the third control unit and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, the problem of statistical error is solved fundamentally by adjusting kernel parameters, and meanwhile, the test development cost is reduced, so that the purpose of a relatively accurate, reliable and low-price test scheme for the utilization rate of the dynamic stack of the electronic control unit software is achieved.
The embodiment of the application provides a storage medium, wherein a program is stored on the storage medium, and when the program is executed by a processor, the method for testing the utilization rate of a dynamic stack of software of an electronic control unit is realized.
The embodiment of the application provides a processor, wherein the processor is used for running a program, and the method for testing the utilization rate of a dynamic stack of software of an electronic control unit is executed when the program runs.
An electronic device 60 includes, as shown in fig. 6, at least one processor 601, at least one memory 602 connected to the processor, and a bus 603; the processor 601 and the memory 602 complete communication with each other through the bus 603; the processor 601 is used for calling the program instructions in the memory 602 to execute the above-mentioned test method for the usage rate of the electrical control unit software dynamic stack.
The electronic device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device:
acquiring the utilization rate state of a dynamic stack of the mobile energy storage charging pile in the whole operation process by adopting a programmable online mode adjuster to obtain dynamic stack utilization rate data;
determining the maximum utilization rate of the dynamic stack according to the utilization rate data of the dynamic stack;
and judging whether the dynamic stack of the software of the electronic control unit overflows or not according to the maximum utilization rate of the dynamic stack.
Further, adopt the online mode ware of transferring of able to programme to gather the rate of utilization state that the portable energy storage was filled electric pile developments stack in whole operation process obtains dynamic stack rate of utilization data, includes:
burning a test program into the electronic control unit software through the programmable online tuner, and running a first preset script in a running window of the programmable online tuner;
carrying out dynamic stack cycle state statistics on a program in a dynamic running process according to the first preset script to obtain the dynamic stack utilization rate data;
storing the dynamic stack utilization rate data to a corresponding first preset path in a binary file format to obtain a binary file;
and when the first preset script runs to a preset state, stopping running the first preset script, running a batch processing script, and entering a statistical mode of the programmable online tuner.
Further, the determining a maximum usage rate of a dynamic stack according to the usage rate data of the dynamic stack includes:
after the programmable online tuner enters the statistical mode, running a second preset script in the statistical mode window, and performing traversal statistical calculation and analysis processing on the binary file to obtain a statistical result;
and expressing the statistical result by percentage, determining the maximum utilization rate of the dynamic stack, and storing the maximum utilization rate of the dynamic stack to a corresponding second preset path in a preset file format.
The present application is described in terms of flowcharts and/or block diagrams of methods, apparatus (systems), computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a device includes one or more processors (CPUs), memory, and a bus. The device may also include input/output interfaces, network interfaces, and the like.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip. The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (8)

1. A method for testing the utilization rate of a dynamic stack of electronic control unit software is characterized in that the running states of the electronic control unit software of a movable energy storage charging pile in various different working scenes are simulated on a test bench frame, and the method comprises the following steps:
acquiring the utilization rate state of a dynamic stack of the mobile energy storage charging pile in the whole operation process by adopting a programmable online mode adjuster to obtain dynamic stack utilization rate data;
determining the maximum utilization rate of the dynamic stack according to the utilization rate data of the dynamic stack;
and judging whether the dynamic stack of the software of the electronic control unit overflows or not according to the maximum utilization rate of the dynamic stack.
2. The method of claim 1, wherein the acquiring, by using a programmable online tuner, the usage status of the dynamic stack of the mobile energy storage charging pile in the whole operation process to obtain dynamic stack usage data comprises:
burning a test program into the electronic control unit software through the programmable online tuner, and running a first preset script in a running window of the programmable online tuner;
carrying out dynamic stack cycle state statistics on a program in a dynamic running process according to the first preset script to obtain the dynamic stack utilization rate data;
storing the dynamic stack utilization rate data to a corresponding first preset path in a binary file format to obtain a binary file;
and when the first preset script runs to a preset state, stopping running the first preset script, running a batch processing script, and entering a statistical mode of the programmable online tuner.
3. The method of claim 2, wherein determining a dynamic stack maximum usage based on the dynamic stack usage data comprises:
after the programmable online tuner enters the statistical mode, running a second preset script in the statistical mode window, and performing traversal statistical calculation and analysis processing on the binary file to obtain a statistical result;
and expressing the statistical result by percentage, determining the maximum utilization rate of the dynamic stack, and storing the maximum utilization rate of the dynamic stack to a corresponding second preset path in a preset file format.
4. The utility model provides a testing arrangement of automatically controlled unit software developments stack rate of utilization which characterized in that, the operation state at various different work scenes of the automatically controlled unit software that electric pile is filled in portable energy storage of simulation on testboard frame, the device includes:
the first processing unit is used for acquiring the utilization rate state of a dynamic stack of the mobile energy storage charging pile in the whole operation process by adopting a programmable online mode adjuster to obtain dynamic stack utilization rate data;
the second processing unit is used for determining the maximum utilization rate of the dynamic stack according to the utilization rate data of the dynamic stack;
and the third processing unit is used for judging whether the dynamic stack of the software dynamic stack of the electronic control unit overflows or not according to the maximum utilization rate of the dynamic stack.
5. The apparatus of claim 4, wherein the first processing unit is configured to:
burning a test program into the electronic control unit software through the programmable online tuner, and running a first preset script in a running window of the programmable online tuner;
carrying out dynamic stack cycle state statistics on a program in a dynamic running process according to the first preset script to obtain the dynamic stack utilization rate data;
storing the dynamic stack utilization rate data to a corresponding first preset path in a binary file format to obtain a binary file;
and when the first preset script runs to a preset state, stopping running the first preset script, running a batch processing script, and entering a statistical mode of the programmable online tuner.
6. The apparatus of claim 5, wherein the second processing unit is configured to:
after the programmable online tuner enters the statistical mode, running a second preset script in the statistical mode window, and performing traversal statistical calculation and analysis processing on the binary file to obtain a statistical result;
and expressing the statistical result by percentage, determining the maximum utilization rate of the dynamic stack, and storing the maximum utilization rate of the dynamic stack to a corresponding second preset path in a preset file format.
7. A storage medium, characterized in that the storage medium comprises a stored program, wherein when the program runs, a device on which the storage medium is located is controlled to execute the method for testing the usage rate of the ecu software dynamic stack according to any one of claims 1 to 3.
8. An electronic device comprising at least one processor, and at least one memory, bus connected to the processor; the processor and the memory complete mutual communication through the bus; the processor is used for calling the program instructions in the memory to execute the method for testing the dynamic stack utilization rate of the ECU software according to any one of claims 1 to 3.
CN202110785635.7A 2021-07-12 2021-07-12 Method and device for testing utilization rate of dynamic stack of electronic control unit software Active CN113448863B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110785635.7A CN113448863B (en) 2021-07-12 2021-07-12 Method and device for testing utilization rate of dynamic stack of electronic control unit software

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110785635.7A CN113448863B (en) 2021-07-12 2021-07-12 Method and device for testing utilization rate of dynamic stack of electronic control unit software

Publications (2)

Publication Number Publication Date
CN113448863A true CN113448863A (en) 2021-09-28
CN113448863B CN113448863B (en) 2024-02-09

Family

ID=77815994

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110785635.7A Active CN113448863B (en) 2021-07-12 2021-07-12 Method and device for testing utilization rate of dynamic stack of electronic control unit software

Country Status (1)

Country Link
CN (1) CN113448863B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080066459A (en) * 2007-01-12 2008-07-16 삼성전자주식회사 Apparatus and method for dynamic detection of kernel stack overflow on operating system
CN101645033A (en) * 2009-05-15 2010-02-10 上海闻泰电子科技有限公司 Debugging method in abnormality of mobile phone software
CN102346235A (en) * 2011-07-11 2012-02-08 北京北大众志微系统科技有限责任公司 Automatic test system and method for hardware device function
CN102734896A (en) * 2012-07-06 2012-10-17 青岛海尔空调电子有限公司 Method and device for monitoring operation environments of multi-split air-conditioning system
CN112667460A (en) * 2020-12-07 2021-04-16 沈阳飞机设计研究所扬州协同创新研究院有限公司 Method for monitoring avionics system application task stack space

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080066459A (en) * 2007-01-12 2008-07-16 삼성전자주식회사 Apparatus and method for dynamic detection of kernel stack overflow on operating system
CN101645033A (en) * 2009-05-15 2010-02-10 上海闻泰电子科技有限公司 Debugging method in abnormality of mobile phone software
CN102346235A (en) * 2011-07-11 2012-02-08 北京北大众志微系统科技有限责任公司 Automatic test system and method for hardware device function
CN102734896A (en) * 2012-07-06 2012-10-17 青岛海尔空调电子有限公司 Method and device for monitoring operation environments of multi-split air-conditioning system
CN112667460A (en) * 2020-12-07 2021-04-16 沈阳飞机设计研究所扬州协同创新研究院有限公司 Method for monitoring avionics system application task stack space

Also Published As

Publication number Publication date
CN113448863B (en) 2024-02-09

Similar Documents

Publication Publication Date Title
CN202533519U (en) Fully automatic closed loop test system of protective relaying device
CN103568863B (en) The Real-Time Monitoring diagnostic system of cell management system of electric automobile and diagnostic method
WO2015106605A1 (en) Method for testing station level of intelligent substation
CN104281520B (en) Tracking and method, the apparatus and system of debugging
CN102938800B (en) A kind of radio communication quality Auto-Test System and method
CN111579982B (en) Relay protection automatic test system and test method thereof
CN203149081U (en) Testing device used for photovoltaic assembly
CN106405286B (en) The automatic test approach and system of quality monitoring device of electrical energy
CN104468277A (en) Consistency testing method and device for transformer substation network and communication protocol
CN108072858B (en) Electric energy meter quality management method and system and terminal equipment
CN109885481A (en) A kind of the recording and playback test method and device of the game NGUI based on Unity technology
CN110632461A (en) Test method, test terminal and test system for synchrophasor data concentrator
CN114238071A (en) DCS software automatic verification system and method based on digital simulation technology
CN115396352A (en) CMS server-side protocol testing method, system, equipment and storage medium
CN111316227A (en) Method and equipment for debugging application program
CN103308808A (en) System and method for testing secondary device of intelligent substation automatically
CN110611312A (en) On-line simulation system and method for panoramic data of substation bay level
CN113448863A (en) Method and device for testing utilization rate of dynamic stack of software of electronic control unit
CN102958089B (en) Simulation method and simulation device
CN116415385A (en) Fan joint debugging simulation method and device, server and computer storage medium
CN111965587B (en) Automatic test method and automatic test platform for stability of electric energy meter
CN108873735B (en) Power distribution main station system component simulation test device and method
CN113283076A (en) Method and device for researching electricity utilization abnormity and computer readable storage medium
CN105785104A (en) Mobile terminal test current determining method and mobile terminal test current determining device
CN105450818B (en) mobile terminal power consumption current measuring method and device

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