A real-time debugging method based on embedded real-time system
A real-time system and debugging method technology, applied in software testing/debugging, instrumentation, error detection/correction, etc., can solve problems affecting efficiency, difficult to maintain, difficult to analyze, etc., to achieve easy maintenance, easy reason analysis, and high execution efficiency Effect
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0038] combined with figure 1 As shown, a real-time debugging method based on an embedded real-time system, including:
[0039] Step S100: install a GUI program and a GDB debugging program on a PC, install a multi-thread server program and an interrupt service routine ISR on an embedded device, and connect the PC to the embedded device through the TCP / IP protocol;
[0040] Step S200: set a breakpoint to the code line in the original program in the GUI program, analyze the intermediate file produced by the gcc compiler, obtain the instruction address corresponding to the code line where the breakpoint is located, and then send the instruction address to said embedded device;
[0041] Step S300: the multithreaded server program installed on the embedded device receives the instruction address, and replaces the instruction in the instruction address with an interrupt trigger instruction;
[0042] Step S400: run the interrupt service routine ISR;
[0043] Step S500: the interru...
Embodiment 2
[0049] On the basis of Example 1, in conjunction with the attached figure 1 As shown, a real-time debugging method based on an embedded real-time system, the step S200 specifically includes:
[0050] Step S210: set in the GUI program, click with the mouse on the left side of a certain code line of the original program, and then set a breakpoint in this line;
[0051] Step S220: the gcc compiler compiles and links the original program to obtain an executable file containing debugging information, and then uses the nm command to analyze the executable file to obtain the instruction address corresponding to the code line where the breakpoint is located;
[0052] Step S230: the PC sends the instruction address to the embedded device.
[0053] working principle:
[0054] Debug the embedded real-time system with breakpoints by artificially setting breakpoints. After clicking the mouse to set a breakpoint in the original program, when compiling the original program in the compiler,...
Embodiment 3
[0061] On the basis of embodiment 2, in conjunction with the attached figure 1 As shown, the context information in step S500 includes global variables, local variables and function call stacks.
[0062] Context information includes global variables, local variables, and function call stacks. Context information contains as little content as possible, which is enough to meet the needs and reduce the running time of interrupt service routines.
[0063] Further, the context information does not exceed 256 bytes.
[0064] The amount of context information is small, so the running time of the interrupt service program can be ignored relative to the running time of the original program.
[0065] Further, the PC is based on the Linux operating system, and the embedded device is based on the ARM.
[0066] The PC based on the Linux operating system and the embedded device based on ARM form the cross-debugging of the embedded system, and the debugging is carried out online and intera...
PUM
![No PUM](https://static-eureka.patsnap.com/ssr/23.2.0/_nuxt/noPUMSmall.5c5f49c7.png)
Abstract
Description
Claims
Application Information
![application no application](https://static-eureka.patsnap.com/ssr/23.2.0/_nuxt/application.06fe782c.png)
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com