Embedded software development and debugging system, method and conversion link device
Through embedded software development and debugging systems, the bus converter and FPGA board are used to realize the high-speed bridge of embedded processor chips, which solves the problems of IDE functions limited and the low communication rate of emulators in the existing technology, and improves embedded software development Debugging efficiency and real-time.
Patent Information
- Application Number
- CN202411255019.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-09-09
AI Technical Summary
The existing embedded software program debugging methods are inefficient in development due to the limitation of IDE functions and low communication rate of the emulator, and the multi-task program debugging with an operating system cannot be carried out.
Provide an embedded software development and debugging system, including a bus converter, Windows software development platform and an embedded target debugging platform. The Windows software development platform takes over the embedded target debugging platform through the MPI bus and conversion components, and realizes the use of FPGA board. High-speed bus conversion, replacing embedded processor chips to complete program development, operation and debugging.
It greatly improves the efficiency of embedded software development and debugging, realizes the development, operation and debugging of embedded software in Visual Studio, simplifies the development process, and improves the real-time nature of status monitoring.
Smart Images

Figure CN118760616B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of embedded development technology, and in particular to an embedded software development and debugging system, method and conversion link device. Background Art
[0002] At present, the development and debugging of embedded software programs requires the help of emulators such as Dstream, JLINK, ULINK, etc. One end of the emulator is connected to the PC, and the other end is connected to the debugging interface of the embedded platform board (such as JTAG or SWD). The IDE environment corresponding to the embedded processor is installed in the PC. During debugging, the PC loads the compiled program into the processor of the embedded platform through the emulator, and debugs and controls the program and monitors its status by setting breakpoints and stepping control. Figure 1 shown.
[0003] The existing embedded software program debugging method is that the program runs on the processor of the embedded platform. On the one hand, due to the limited functions of IDE, it is not user-friendly, and the IDE must be compatible with the embedded processor, so it is not very versatile; on the other hand, due to the low communication rate of the emulator, the operation efficiency is low and the real-time performance of the status monitoring is not high enough. Therefore, to improve the efficiency, it is necessary to start from both the IDE environment and the emulator hardware.
[0004] For example, classic embedded system development IDEs include KEIL, DS5, etc., but these IDEs are quite difficult to use, and they only play a compiling role. They cannot be combined with embedded operating systems and cannot debug multi-task programs with operating systems, resulting in very low efficiency in embedded program development. Summary of the invention
[0005] Based on this, it is necessary to provide an embedded software development and debugging system, method and conversion link device to address the above technical problems.
[0006] An embedded software development and debugging system, the system comprising: a bus converter, a Windows software development platform and an embedded target debugging platform; an embedded application for running and debugging the embedded target debugging platform in the Windows software development platform; the embedded target debugging platform comprises an MPI bus and a conversion component;
[0007] The bus converter is used to convert the operation instructions of the embedded application program into the MPI bus operation of the embedded target debugging platform, and transmit the operation instructions to the embedded target debugging platform.
[0008] The conversion component in the embedded target debugging platform is used to realize the takeover of the embedded target debugging platform by the Windows software development platform through the MPI bus, thereby completing the debugging control and status monitoring of the embedded target debugging platform through the operation instructions.
[0009] In one of the embodiments, the bus converter includes: a PCIE bus module, an XDMA bridge, an AXI bus and a hardware conversion bridge;
[0010] The PCIE bus module is connected to the Thunderbolt 3 to PCIE module of the Windows software development platform; the hardware conversion bridge is used to convert the AXI bus into the MPI bus of the embedded target debugging platform.
[0011] In one of the embodiments, the XDMA bridge converts the PCIE bus into an AXI bus, and the hardware conversion bridge is implemented through FPGA logic to convert the AXI read-write control into the MPI read-write control.
[0012] In one embodiment, when performing a read / write operation, the BVALID signal and the RVALID signal in the AXI bus are used to handshake the ready signal of the MPI to complete the read / write operation from the AXI bus to the MPI bus.
[0013] In one embodiment, the conversion component of the embedded target debugging platform implements the takeover of the system bus control of the processor of the embedded target debugging platform by the Windows software development platform through bus arbitration logic, thereby directly operating all devices of the embedded target debugging platform.
[0014] In one embodiment, the Windows software development platform includes an application software library, and a device file is created in the Windows software development platform; the application software library sends commands by sending commands to the device file handle of the device file, and obtains command execution results by reading the device file handle; the commands include: IO read and IO write.
[0015] In one of the embodiments, the application software library waits for an interrupt event in the device file handle. When an interrupt event occurs, the application software library sends an interrupt number command to the device file handle and reads the device file handle to obtain the interrupt number.
[0016] In one embodiment, the bus conversion component inside the target debugging platform realizes the takeover of the control of the embedded CPU system bus by the external embedded bus through the bus arbitration logic, thereby achieving the purpose of the Windows software development platform directly operating all devices of the target debugging platform.
[0017] In one embodiment, the bus converter mounts the embedded target debugging platform as a peripheral through a bus link and maps it to the bus of the Windows software development platform.
[0018] A conversion link device for embedded software development and debugging, wherein the conversion link device is implemented by the above-mentioned bus converter converting the operation instructions in the Windows software development platform to the embedded target debugging platform.
[0019] An embedded software development and debugging method is applied in the above embedded software development and debugging system to realize development and debugging of an embedded target debugging platform in a Windows software development platform.
[0020] The above embedded software development and debugging system, method and conversion link device, such as Figure 2 As shown, the VisualStudio integrated development environment in the Windows software platform is used for embedded software development in software; the FPGA board is used to implement the bus converter in hardware to establish a high-speed bridge between the Windows software development platform and the embedded processor chip in the embedded target debugging platform, so as to extend the internal bus of the Windows software development platform to the embedded target debugging platform bus, and replace the embedded processor chip to complete program development, operation and debugging. In addition, in terms of software, only a Windows software development platform needs to be designed to develop, run and debug programs with VisualStudio on the Windows software development platform. After the development is completed, the source code can be compiled and deployed using the special IDE provided by the processor chip manufacturer, thereby greatly improving the efficiency of embedded software development and debugging. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 It is an embedded debugging diagram in a traditional technology;
[0022] Figure 2 An embedded debugging diagram in one embodiment;
[0023] Figure 3 A framework diagram of an embedded software development and debugging system in one embodiment;
[0024] Figure 4 A Windows software platform structure diagram of an embedded software development and debugging system in one embodiment;
[0025] Figure 5 A schematic diagram of an embedded target debugging platform architecture in one embodiment;
[0026] Figure 6A schematic diagram of an implementation of an embedded target debugging platform conversion component in one embodiment;
[0027] Figure 7 It is a schematic diagram of a Windows software development platform taking over an embedded platform in one embodiment. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0029] In one embodiment, an embedded software development and debugging system is provided, comprising: a bus converter, a Windows software development platform, and an embedded target debugging platform; an embedded application running and debugging the embedded target debugging platform in the Windows software development platform; the embedded target debugging platform comprises an MPI bus and a conversion component; the bus converter is used to convert the operation instructions of the embedded application into the MPI bus operation of the embedded target debugging platform, and transmit the MPI bus operation to the embedded target debugging platform; the conversion component in the embedded target debugging platform is used to realize the takeover of the embedded target debugging platform by the Windows software development platform through the MPI bus, thereby completing the debugging control and status monitoring of the embedded target debugging platform through the operation instructions.
[0030] The above embedded software development and debugging system uses the VisualStudio integrated development environment in the Windows software platform to develop embedded software in terms of software; uses an FPGA board to implement a bus converter in terms of hardware, and establishes a high-speed bridge between the Windows software development platform and the embedded processor chip in the embedded target debugging platform, thereby extending the internal bus of the Windows software development platform to the embedded target debugging platform bus, replacing the embedded processor chip to complete program development, operation and debugging. In addition, in terms of software, only a Windows software development platform needs to be designed to develop, run and debug programs on the Windows software development platform using VisualStudio, and the source code after development can be compiled and deployed using the special IDE provided by the processor chip manufacturer, thereby greatly improving the efficiency of embedded software development and debugging.
[0031] In one embodiment, if Figure 3The bus converter includes: a PCIE bus module, an XDMA bridge, an AXI bus and a hardware conversion bridge, and the Windows software development platform is connected to the PCIE bus module through the Thunderbolt 3 to PCIE module. Taking the Windows software development platform as a Windows laptop as an example, the laptop generally does not contain a PCIE interface that can be directly expanded. In order to adapt to the laptop, the bus conversion uses Thunderbolt 3 as the first link of PC line conversion, because the Thunderbolt 3 interface is different from the general USB or network interface, and has high speed and low latency characteristics, which is very suitable for functions such as simulating bus operations. Then use the mature Thunderbolt 3 to PCIE module to introduce the internal bus of the laptop into the Thunderbolt 3 to PCIE module PCIE bus. Then insert an FPGA board on the PCIE bus to complete the operation of PCIE bus to MPI bus.
[0032] In one embodiment, the XDMA bridge converts the PCIE bus to the AXI bus, and then the hardware conversion bridge is implemented with FPGA logic to convert the AXI bus to the MPI bus. In this embodiment, the PCIE bus is a relatively complex bus and is not convenient for direct conversion. A mature XDMA bridge can be used first to convert the PCIE to the AXI bus, and the AXI bus is a simple, easy-to-use and expandable standard bus. In this embodiment, the hardware conversion bridge implemented by FPGA logic converts the AXI read-write control to the MPI read-write control.
[0033] In one embodiment, when performing a read / write operation, the BVALID signal and the RVALID signal in the AXI bus are used to handshake the ready signal of the MPI bus to complete the read / write operation from the AXI bus to the MPI bus. In this embodiment, the AXI bus speed is very fast, so the ready signal of the MPI bus needs to be used to complete the bus rate adaptation.
[0034] In one embodiment, if Figure 4 As shown in the figure, the Windows software development platform includes an XDMA bridge driver and an application software library. The Windows device driver is responsible for driving the XDMA bridge device of PCIE to AXI in the bus converter; the application software library is responsible for proxying the IO operations and interrupt responses in the driver to the application. The device driver will implement a device file, and the application software library will open this device file. General IO operations such as IO read and IO write are completed by sending specific commands to the device file handle, and the return result is completed by reading the handle.
[0035] In another embodiment, the application software library waits for an interrupt event in the device file handle. When an interrupt event occurs, the application software library sends an interrupt number command to the device file handle, and reads the device file handle to obtain the interrupt number.
[0036] In one embodiment, if Figure 5 As shown, the conversion component of the embedded target debugging platform realizes the takeover of the system bus control right of the processor of the embedded target debugging platform by the Windows software development platform through the bus arbitration logic, thereby directly operating all devices of the embedded target debugging platform.
[0037] Specifically, Figure 6 As shown, the conversion component includes a bus conversion bridge and a bus arbiter. The bus conversion bridge realizes the conversion from the embedded bus to the on-chip bus. The on-chip bus forms include but are not limited to standard buses such as AHB and AMBA. The bus arbiter realizes on-chip bus arbitration to ensure that at any time, only one host can access the on-chip bus matrix between the internal CPU bus and the external embedded bus after the bus conversion bridge.
[0038] In summary, IO operations and interrupt responses are all completed by proxy. This allows you to develop and debug embedded software in Visual Studio.
[0039] In one embodiment, if Figure 7 As shown, the bus converter mounts the embedded target debugging platform as a peripheral through the bus link and maps it to the bus of the Windows software development platform.
[0040] In one of the embodiments, a conversion link device for embedded software development and debugging is provided, and the conversion link device is implemented by the PCIE bus module, XDMA bridge, AXI bus, hardware conversion bridge and MPI bus connected in sequence in the above embodiments.
[0041] In one of the embodiments, an embedded software development and debugging method is provided, which is applied in the embedded software development and debugging system of the above embodiment to implement development and debugging of the embedded platform in the Windows software development platform.
[0042] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods.
[0043] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0044] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. An embedded software development and debugging system, characterized in that: The system comprises: a bus converter, a Windows software development platform and an embedded target debugging platform; an embedded application for running and debugging the embedded target debugging platform in the Windows software development platform; the embedded target debugging platform comprises an MPI bus and a conversion component; The bus converter is used to convert the operation instructions of the embedded application program into the MPI bus operation of the embedded target debugging platform, and transmit the operation instructions to the embedded target debugging platform. The conversion component in the embedded target debugging platform is used to realize the takeover of the embedded target debugging platform by the Windows software development platform through the MPI bus, thereby completing the debugging control and status monitoring of the embedded target debugging platform through the operation instructions; The bus converter comprises: a PCIE bus module, an XDMA bridge, an AXI bus and a hardware conversion bridge; The PCIE bus module is connected to the Thunderbolt 3 to PCIE module of the Windows software development platform; the hardware conversion bridge is used to convert the AXI bus into the MPI bus of the embedded target debugging platform.
2. The system according to claim 1, characterized in that The XDMA bridge converts the PCIE bus into an AXI bus, and the hardware conversion bridge is implemented through FPGA logic to convert the AXI read-write control into the MPI read-write control.
3. The system according to claim 2, characterized in that When performing a read or write operation, the BVALID signal and the RVALID signal in the AXI bus are used to handshake the ready signal of the MPI to complete the read or write operation from the AXI bus to the MPI bus.
4. The system according to claim 1, characterized in that The conversion component of the embedded target debugging platform realizes the takeover of the system bus control right of the processor of the embedded target debugging platform by the Windows software development platform through the bus arbitration logic, thereby directly operating all devices of the embedded target debugging platform.
5. The system according to any one of claims 1 to 4, characterized in that: The Windows software development platform includes an application software library, and a device file is created in the Windows software development platform; The application software library sends commands by sending commands to the device file handle of the device file, and obtains command execution results by reading the device file handle; the commands include: IO read and IO write.
6. The system according to claim 5, characterized in that The application software library waits for an interrupt event in the device file handle. When an interrupt event occurs, the application software library sends an interrupt number command to the device file handle, and reads the device file handle to obtain the interrupt number.
7. The system according to any one of claims 1 to 4, characterized in that: The bus converter mounts the embedded target debugging platform in a peripheral manner through a bus link and maps it to the bus of the Windows software development platform.
8. A conversion link device for embedded software development and debugging, characterized in that: The conversion link is implemented by the bus converter in any one of claims 1 to 7 converting the operation instructions in the Windows software development platform to the embedded target debugging platform.
9. An embedded software development and debugging method, characterized in that: The method is applied in the embedded software development and debugging system according to any one of claims 1 to 7 to implement development and debugging on an embedded target debugging platform in a Windows software development platform.
Citation Information
Patent Citations
Debugging processing method, debugging processing system and single board
CN102006200A
Debugging system and debugging method
CN105550118A
Embedded processor debugging system
CN107515831A
Debugging methods and devices
CN108509333A
Computer debugging method, device, equipment and system
CN113722168A
