2314 views|3 replies

187

Posts

0

Resources
The OP
 

Feiling Technical Post-Only 4 steps to make Qt remote debugging easier [Copy link]

I believe that all of you engineers have this experience - when debugging your own Qt program, especially when adjusting the interface display and overall layout, you need to frequently make images and burn them into the core board to test whether the Qt program is complete. This operation is time-consuming and laborious.

So, is there a faster way? Today, I will use the OKT3-C development board to show you how to quickly perform Qt remote debugging. Without further ado, let's get straight to the point.

1Modify project configuration

Step 1:

Open the Qt software in the OKT3-C development board development environment

Click in the following order: [Tools → Options → Build and Run → Debuggers → Add], select aarch64-linux-gnu-gdb under the gdb debugging plug-in path, and name the gdb path:

/home/forlinx/work/lichee/brandy/armv8_toolchain/gcc-linaro-aarch64-linux-gnu-4.9-2014.09_linux/bin/aarch64-linux-gnu-gdb

(Note: This path is the path in my own environment. The path in your actual environment may be different)

Step 2:

Click [Tools → Options → Build and Run]

Click Kit again to add a new configuration. You can name it as you like. Select [Generic Linux Device] as the device type and select the Debuggers you just created as the debugger.

Step 3:

Click [Tools → Options]

Select [Device] in the leftmost option, enter the [Device] interface, click Add, add the GenericLinux Device (default for GenericLinux) device, enter the network IP of the development board and the username and password for SSH login, then click Test to test, and the configuration is completed after verifying the connection.

At this point, some friends may ask, "How to configure the SSH of the OKT3-C development board?" Let me briefly introduce it to you:

1. Set your account and password:

adduser+account

passwd+password

2. Modify the configuration file:

/etc/ssh/sshd_config

Change #PermitRootLoginprohibit-password to PermitRootLogin yes, save and exit

3. Restart SSHD:

Enter the command /etc/init.d/S50sshdrestart to restart the SSHD service

4. Set the IP address to be modified:

Enter the command: ifconfig eth0 +IP

Step 4:

Specify the target file path

The storage path selected at this point in the project must be declared in the .pro file.

2. Achievements Display

After completing the above steps, let's take a look at the final result. We simply build an interface for testing.

Screen Display:

Simulate R&D personnel to add and delete:

Screen Display:

As you can see, the changes we made in the Qt project have been successfully displayed on the screen. There is no need for tedious compilation and burning in the middle. You can see the real-time changes with one-click operation, which greatly reduces the workload of developers and improves work efficiency.

3. Experience Sharing

In the process of Qt remote debugging, the editor will share with you some of the pitfalls he has encountered, hoping that all engineers can avoid detours.

1. "Connection Error" Issue

Sometimes, the error "Timeout waiting for server response" may appear as shown in the figure above, but don't panic. Go to [Step 3] that you have operated before and check to ensure that the text of this step is successful.

2. "Deployment Failure" Issue

The reason for the problem shown in the above picture is that a program has been running on the OKT3-C development board. If you run a new program at this time, the deployment will fail. At this time, you only need to kill the process on the development board to run the Qt program correctly.

4 Conclusion

To sum up, by configuring the Qt application in the virtual machine, the virtual machine network IP, and using gdb debugging and ssh service, you can write the Qt program in the virtual machine, and then click the green triangle run button to install and run the corresponding Qt program in the development board.

The above is the process of quickly performing Qt remote debugging and the causes of some problems compiled by the editor. I hope it can be helpful to everyone. If you want to know more product information and technical dry goods, please visit the Feiling Embedded official website .

This post is from ARM Technology

Latest reply

To sum up, by configuring the Qt application in the virtual machine, the virtual machine network IP, and using gdb debugging and ssh service, you can write the Qt program in the virtual machine, and then click the green triangle run button to install and run the corresponding Qt program in the development board. The above is the process of quickly performing Qt remote debugging and the causes of some problems compiled by the editor. I hope it can be helpful to everyone. If you want to know more product information and technical dry goods, please visit the Feiling Embedded official website . Really useful, thanks for sharing!   Details Published on 2022-10-9 23:39
 

4771

Posts

12

Resources
2
 

This is a good remote solution, but some users just don't plug in the line.

This post is from ARM Technology
 
 
 

7456

Posts

2

Resources
3
 

Make a check-in and record it. This skill needs to be collected from time to time.

This post is from ARM Technology
 
Personal signature

默认摸鱼,再摸鱼。2022、9、28

 
 

6841

Posts

11

Resources
4
 

To sum up, by configuring the Qt application in the virtual machine, the virtual machine network IP, and using gdb debugging and ssh service, you can write the Qt program in the virtual machine, and then click the green triangle run button to install and run the corresponding Qt program in the development board.

The above is the process of quickly performing Qt remote debugging and the causes of some problems compiled by the editor. I hope it can be helpful to everyone. If you want to know more product information and technical dry goods, please visit the Feiling Embedded official website .

Really useful, thanks for sharing!

This post is from ARM Technology
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list