A remote debugging method based on TBOX

By unifying the hardware layer interface as RPC interface on TBOX and designing the APP layer hardware interface as RPC client, a remote debugging system is realized, solving the problems of high debugging difficulties and complex operations in the existing technology, and improving development efficiency and debugging effect .

CN114546853BActive Publication Date: 2024-11-12CHONGQING CHANGAN TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202210158061.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-21
Publication Date
2024-11-12
Estimated Expiration
2042-02-21

AI Technical Summary

Technical Problem

In the existing R&D in-vehicle intelligent terminal systems, remote debugging is difficult, complex operation steps, and inconvenient variable observation and stack viewing, resulting in a long development cycle and insignificant effect.

Method used

Using TBOX-based remote debugging method, the hardware abstraction layer is designed as the RPC interface through the unified hardware layer interface, the hardware abstraction layer is designed as the RPC server, and the APP layer hardware interface is set as the RPC interface, and the debugging and development environment is configured for remote debugging. Finally, push the debugged program to the target board for function verification.

Benefits of technology

It reduces debugging difficulty, simplifies operation steps, improves development efficiency, and realizes unified design and final verification of remote debugging APP functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114546853B_ABST
    Figure CN114546853B_ABST
Patent Text Reader

Abstract

The present invention discloses a remote debugging method based on TBOX, comprising the following steps: S1: according to the needs of remote debugging, the interface of the hardware layer is unified, and the interface is defined in the RPC interface, and the hardware abstraction layer is set as the RPC server for connecting with the client; S2: the hardware interface required for the APP layer is unified, and it is set as the RPC interface for connecting with the server; S3: according to the needs of remote debugging, the corresponding debugging development environment is configured, and each APP function program in the TBOX to be debugged is remotely debugged; S4: the APP function program that has been debugged is pushed to the target machine for functional verification, and it is judged whether it is consistent with the function during remote debugging. The present invention realizes the remote debugging of the functions of each APP function program in the whole vehicle TBOX through RPC, and cross-compiles the debugged APP function program into TBOX for operation, thereby achieving the purpose of improving development efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer programs, and in particular to a remote debugging method based on TBOX. Background Art

[0002] At present, in the existing domestic research and development of vehicle-mounted intelligent terminal systems, remote debugging is performed directly on the target board using gdb. This debugging method is a character interface debugging method with high debugging difficulty, complex operation steps, inconvenient variable observation and stack viewing, and the entire debugging process is complicated, time-consuming, and has a long development cycle. The effect is not obvious, and most developers will not use this method to debug embedded programs. Summary of the invention

[0003] In view of the above-mentioned deficiencies in the prior art, the object of the present invention is to provide a remote debugging method based on TBOX to solve the problems in the prior art of high difficulty in debugging applications on TBOX, complex operating steps, and inconvenient variable observation and stack viewing.

[0004] In order to solve the above technical problems, the present invention provides a remote debugging method based on TBOX, comprising the following steps:

[0005] S1: According to the needs of remote debugging, the interface of the hardware layer is unified and defined into the RPC interface, and the hardware abstraction layer is set as the RPC server for connecting with the client;

[0006] S2: Unify the hardware interfaces required by the APP layer and set them as RPC interfaces for connecting to the server.

[0007] S3: According to the needs of remote debugging, configure the corresponding debugging development environment, and remotely debug each APP function program in the TBOX to be debugged;

[0008] S4: Push the debugged APP function program to the target board for function verification to determine whether it is consistent with the function during remote debugging.

[0009] Compared with the prior art, the present invention has the following beneficial effects:

[0010] 1. The method of the present invention uses the RPC remote call debugging protocol to uniformly design the ports required by the server and the client, thereby achieving the purpose of remote debugging the APP function, and cross-compiles the debugged APP function program and puts it into the target machine for final verification.

[0011] 2. The method of the present invention is used for remote debugging of the vehicle TBOX application program. Through RPC (Remote Procedure Call Protocol), each APP function program in the vehicle TBOX is remotely called for function debugging, and then the remotely debugged APP function program is cross-compiled and run in TBOX, thereby reducing the difficulty of debugging, simplifying the operation steps, and improving the development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 This is a diagram of the remote debugging framework.

[0013] Figure 2 Design diagram for the hardware RPC server interface.

[0014] Figure 3 Design diagram for APP RPC client interface.

[0015] Figure 4 Flowchart of the method for configuring the environment for Vs linux.

[0016] Figure 5 This is the RPC Work network diagram. DETAILED DESCRIPTION

[0017] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present invention. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present invention.

[0018] The present invention provides a remote debugging method based on TBOX, comprising the following steps:

[0019] S1: According to the needs of remote debugging, the interface of the hardware layer is unified, and the interface is defined in the RPC interface. At the same time, the hardware abstraction layer is set as the RPC server for connecting to the client. Among them, the hardware layer interface to be used is processed to unify the required interface and support it through the ICE open source middleware. The client is the business logic code developed for the APP application layer. After connecting to the server, it can call the interface function of the hardware abstraction layer. The client and the server use TCP, IP and UDP as transmission protocols for data transmission.

[0020] In the specific implementation, the hardware related layer interface is first generally designed as an RPC related interface, wherein the designed hardware interfaces, such as serial ports, SPI, WIFI, GPS, AUDIO, 4G, etc., are abstracted, abstracted out, initialized, opened, closed, read, and written to these interfaces, so that the interfaces are unified. Then, these interfaces are defined in the RPC interface, and RPC is supported by the ICE open source middleware, and the hardware abstraction layer is designed as the RPC server, waiting to connect to the client. The client is the business logic code developed by the APP application layer, and after connecting to the server, the interface function of the hardware abstraction layer can be called. The method of the present invention adopts ICE open source technology, which is completely ready-made, and its API is thread-safe. TCP, IP and UDP are used as transmission protocols. In this way, neither the client nor the server code needs to understand the underlying transmission mechanism. The location of the server is transparent to the user, and the ICE routine is responsible for locating the object and managing the underlying transmission mechanism, such as opening and closing the connection. The interaction between the client and the server appears to be connectionless. The server can be migrated to a different physical address without invalidating the client's proxy. At the same time, the client has no idea how the object implementation is distributed across multiple server processes. Using SSL strong encryption, the client and server can communicate completely securely. Object-oriented semantics generates logical interface code. It supports synchronous and asynchronous message passing, provides synchronous and asynchronous operation calls and dispatches, and provides a publish-subscribe message passing mechanism. Figure 1 As shown, Figure 1 This is a diagram of the remote debugging framework, the entire remote debugging solution interface diagram, and remote debugging hardware devices from PC Linux. Figure 2 Design a diagram for the hardware RPC service port, encapsulate the hardware device interface into an RPC interface, and implement the RPC server in this layer.

[0021] S2: Unify the hardware interfaces required by the APP layer and set them as RPC interfaces for connecting to the server. The APP layer is the TBOX business logic code, which is used to implement various functions and obtain the required hardware interfaces from RPC. Set the hardware interfaces required by the APP layer as hardware abstract interfaces, and implement operations on hardware devices by calling hardware abstract interfaces.

[0022] In the specific implementation, the APP layer is the TBOX business logic code. First of all, it must be able to realize the functions of each APP. This business logic unit has nothing to do with the hardware. The hardware interface that needs to be called can be obtained from the previous RPC. For the hardware interface that needs to be called by the APP layer, it is designed as an RPC interface. The interface of this part is a hardware abstract interface. Calling this interface can realize the operation of the hardware device. This interface technology is implemented using RPC technology. Figure 3As shown, Figure 3 This is the design diagram of the APP RPC client interface. The APP layer is the business logic application code of the entire vehicle and the main debugging object. This APP layer runs in Linux and encapsulates the RPC client interface to connect to the hardware device server. Figure 5 The RPC Work network is shown. Developers define interfaces through slices. The client and server generate interfaces in their respective languages ​​through corresponding conversion tools. The client and server implement specific logic codes in their respective languages ​​according to the unified interface.

[0023] S3: According to the needs of remote debugging, configure the corresponding debugging development environment, and remotely debug each APP function program in the TBOX to be debugged. First, configure the remote server IP and port, embed the APP function program to be debugged into the PC linux, and debug it through visual studio to view variables and observe the stack. Through the RPC client interface of the APP layer, the performance of the hardware device can be debugged.

[0024] In the specific implementation, use visual studio according to the vslinux plug-in to configure the remote server IP and port (here is the PC linux environment IP and port), and the APP function program is directly embedded in the PC linux to run. Since it is independent of the hardware, it can be compiled with gcc. Use visual studio to debug the APP function program (IDE environment) to facilitate variable viewing and stack observation. At the same time, through the RPC client interface of the APP layer, the data of the hardware device can be debugged, such as the opening, closing, data reading, and data sending operations of the hardware device. Figure 4 As shown, Figure 4 The method of configuring the vs linux environment is demonstrated. The visual studio on the PC is a windows program. After installing the vslinux plug-in, the linux code can be debugged, thereby achieving the purpose of debugging the APP layer code. The APP layer realizes that the RPC client can connect to the hardware device server, thereby achieving the purpose of debugging the entire TBOX and verifying the functions of the APP layer business.

[0025] S4: Push the debugged APP function program to the target machine for function verification to determine whether the function is consistent with that during remote debugging.

[0026] During the specific implementation, the debugged APP function program is cross-compiled and pushed to the target machine for function verification to see whether the functions are consistent with those during remote debugging, thereby achieving the purpose of remote debugging, improving development efficiency, reducing bugs, etc.

[0027] The method of the present invention uses the RPC remote call debugging protocol to uniformly design the ports required by the server and the client, thereby achieving the purpose of remote debugging of the APP function, and after cross-compiling the debugged APP function program, it is placed in the target machine for final verification. The method of the present invention is used for remote debugging of the whole vehicle TBOX application program. Through RPC (remote procedure call protocol), it realizes the function debugging of each APP function program in the whole vehicle TBOX by remote calling, and then cross-compiles the remotely debugged APP function program into TBOX for operation, thereby achieving the purpose of reducing the difficulty of debugging, simplifying the operation steps, and improving the development efficiency.

[0028] As described above, the reminder system of the present invention is not limited to the configuration described above, and other systems that can implement the embodiments of the present invention may fall within the scope of protection of the present invention.

[0029] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit the technical solution. Those skilled in the art should understand that those modifications or equivalent substitutions of the technical solution of the present invention that do not depart from the purpose and scope of the technical solution should be included in the scope of the claims of the present invention.

Claims

1. A remote debugging method based on TBOX, characterized in that: The steps include: S1: According to the needs of remote debugging, the interface of the hardware layer is unified and defined into the RPC interface, and the hardware abstraction layer is set as the RPC server for connecting with the client; S2: Unify the hardware interfaces required by the APP layer and set them as RPC interfaces for connecting to the RPC server; S3: According to the remote debugging requirements, configure the debugging development environment corresponding to the remote debugging, and perform remote debugging on each APP function program in the TBOX to be debugged; S4: Push the debugged APP function program to the target machine for function verification to determine whether the function is consistent with that during remote debugging.

2. The remote debugging method based on TBOX according to claim 1, characterized in that: In S1, the hardware layer interfaces that need to be used are processed to unify the required interfaces and supported through ICE open source.

3. The remote debugging method based on TBOX according to claim 1, characterized in that: The client and server use TCP, IP and UDP as transmission protocols for data transmission.

4. The remote debugging method based on TBOX according to claim 1, characterized in that: In S1, the business logic code developed by the client for the APP application layer can call the interface function of the hardware abstraction layer after connecting to the server.

5. The remote debugging method based on TBOX according to claim 1, characterized in that: In S2, the APP layer is the TBOX business logic code, which is used to implement various functions and obtain the required hardware interface from RPC.

6. The remote debugging method based on TBOX according to claim 1, characterized in that: In S2, the hardware interface required by the APP layer is set as a hardware abstract interface, and the operation of the hardware device is implemented by calling the hardware abstract interface.

7. The remote debugging method based on TBOX according to claim 1, characterized in that: In S3, configure the remote server IP and port, embed the APP function program to be debugged into the PC Linux, and debug it through visual studio to view variables and observe the stack.

8. The remote debugging method based on TBOX according to claim 1, characterized in that: In S3, the performance of hardware devices can be debugged through the RPC client interface of the APP layer.

Citation Information

Patent Citations

  • Remote debugging method, server and system for mobile equipment

    CN108270819A

  • Remote call method, device and system and storage medium

    CN108965312A

  • Method for realizing remote debugging

    CN110502418A

  • Remote debugging method based on TBOX

    CN114546853A

  • System for exchanging data utilizing remote direct memory access

    US20030145230A1