Detailed explanation of SylixOS serial port debugging

 

content

1. SylixOS serial port debugging introduction 1

1.1 Introduction of SylixOS serial port 1

1.2 SylixOS serial port debugging introduction 1

2. SylixOS serial port debugging step 1

3. Summary 4

4. References 4

 

 

 

  1. SylixOS serial port debugging introduction

  2. Introduction to SylixOS Serial Port

    Serial port (serial interface), also known as serial communication interface or serial communication interface (usually referred to as COM interface), is an expansion interface using serial communication. Serial Interface (Serial Interface) refers to the sequential transmission of data bit by bit, which is characterized by a simple communication line, as long as a pair of transmission lines can realize two-way communication (the telephone line can be directly used as a transmission line), thus greatly reducing the cost, Especially suitable for long-distance communication, but the transmission speed is slow.

  3. SylixOS serial port debugging introduction

    In the daily debugging process, we can connect with the device in various ways, such as Ethernet port, serial interface, etc. Some devices do not have an Ethernet interface, we can use the serial port to manually start debugging. Its operation process is basically the same as that of Ethernet debugging. When we do not have a suitable serial port cable, we can connect the serial ports through a DuPont cable, as shown in Figure 1-1.

    Figure 1-1 Serial cable connection diagram

  4. SylixOS serial port debugging steps

    The operation process of manual startup debugging using the serial interface is basically the same as that of Ethernet debugging. There are two main differences.

    (1) Connect the PC to the device through the serial port cable, and use the "/dev/ttyS*" parameter to start the debug command in the device with dual serial port debugging, as shown in Figure 2-1. "/dev/ttyS0" in the figure is The name in SylixOS of the serial port connecting the PC to the device.

    Figure 2-1 Start the debug command for dual serial devices

    Use "debug terminal ./app_demo" to use the current serial port to debug the serial port in a device with single serial port debugging. It should be noted that the serial port should be closed after the debugging is started to prevent the port from being occupied and the RealEvo-IDE will have continuous failure errors. As shown in Figure 2-2.

    Figure 2-2 Start the debug command for a single serial port device

     

    (2) Select the project to be debugged, select the "App_demo" project here, and select the menu "Run→Debug Configurations" to open the debugger interface. Select "SylixOS Remote Application", create a new debugger object, name it "app_demo_manu", click the "Select other..." button, enable "Use configuration specific settings" in the pop-up box, and then select "SylixOS" in the list below Manual Remote App Debugging Launcher",

    Click "OK" to create the debugger, as shown in Figure 2-3.

    Figure 2-3 Manual debugging and configuring GDB

    Click the "Search Project" button to select the target file under the Debug folder. Note: The file under the Debug/strip folder cannot be selected, because the stripped file does not have debug information, as shown in Figure 2-4.

    Figure 2-4 Select the target debug file

    Open the "Debugger→Connection" property page, select "TCP" from the "Type" drop-down box, and select "TCP" in the "Host name or

    Enter the IP address of the target device ("192.168.7.32" in this example) in the "IP address" edit box, and in the "Port number" edit box

    Enter the gdbserver port number, click "Apply" to save the settings after the configuration is complete, click "Debug" to start debugging,

    As shown in Figure 2-5.

    Figure 2-5 Setting Device Address

    After the device is successfully connected, relevant debugging can be performed, as shown in Figure 2-6.

    Figure 2-6 Serial port debugging

     

    1. Summarize

    In SylixOS, we can use a variety of debugging methods for related debugging, and we can debug the program according to the actual situation.

    1. References

    "SylixOS Application Development Manual"

    "RealEvo-IDE User Manual"

     

     

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325943077&siteId=291194637