end topic

More
4 years 10 months ago - 4 years 9 months ago #229256 by huhuoyun
end topic was created by huhuoyun
Debugging completed.
Last edit: 4 years 9 months ago by huhuoyun.

Please Log in or Create an account to join the conversation.

More
4 years 10 months ago #229272 by rodw
There are many facets to linuxcnc programming.
What is it you want to achieve?
Is your programming for GUI, components, core code?

 

Please Log in or Create an account to join the conversation.

More
4 years 10 months ago #229273 by huhuoyun
components, core code

Please Log in or Create an account to join the conversation.

More
4 years 10 months ago #229276 by rodw
With components, you need to remember that you are in a real time environment   that is essentially a interrupt service routine. That is always hard to do. You probably need a hardware debugger. I tend to add debug pins that I remove later and use halscope to see what is going on. Some people add print statements (rtapi_print I think).

If you look at the core components, they are small discrete units. That is your best friend I think. Design accordingly and break up your needs into different modules.

Spend your time in the deign and review code carefully before running.

Core code I have not done much with it. For what I did, I wrote some custom gcode I used to review the results in halshow.
The following user(s) said Thank You: tuzki

Please Log in or Create an account to join the conversation.

More
4 years 10 months ago #229278 by huhuoyun
When it comes to the complex logic of the program, it is difficult to understand the execution of the program and quickly get started if you cannot use the debugger. Although printing can cope with part of the development, it will destroy the code structure, and a large amount of printing code workload needs to be added before getting started. Big.

Please Log in or Create an account to join the conversation.

More
4 years 10 months ago #229279 by huhuoyun
For the debugging of the RT core library, I thought of a way that is to use the compilation log to find the dependent source code, precompile them and then write a test program to manually call rtapi_app_main in the main function, and then use GDB to track the execution process.

Please Log in or Create an account to join the conversation.

Time to create page: 0.251 seconds
Powered by Kunena Forum