Codeblocks & Development Board debugging simple tutorial

Source: Internet
Author: User

Reprinted from: http://blog.sina.com.cn/s/blog_5cf457370100f6q0.html

Remote debugging is very useful and convenient! Codeblocks is also very useful as a C/C ++ integrated development environment (IDE) in Linux.

1. codeblocks settings for PC: Of course, codeblocks must be installed. How can I install it on Google. # Codeblocks open codeblocks to start up and create a new project: file -- New -- project to the following interface. You will be asked to select the type of the new project. Select console application here. Next, select the language type. Here, select C. Next, next>, name the project, and set the project path. For example, next> set the compiler to be used. You have to modify it later. No matter what, you need to modify it later! Finish again! Click the triangle to view the level-1 directory. This is the project directory structure. Continue to expand and find that you have generated a main. C! Haha, user-friendly! Just add a little code! So far. After the project is created, it is configured, compiled, and then debugged remotely. First, set the cross compiler and select project -- Build options. Go to the compiler Selection: Select gun arm GCC complier, and add the-G parameter to the first one so that the compiled program can be debugged by arm GDB. OK. After the compiler is selected, set the compiler settings --- complier and debugger. Select the compiler to set. Here, the gun arm GCC complier selects the toolchain executables label. It should be noted that the following complier C ++ complier linker .... All are the cross-compilation tool chains of the local machine. Click the location of the browser tool. I installed the cross compiler under/usr/local/ARM/3.4.1! After installing arm-Linux-GDB, CP is added to a directory with tools such as arm-Linux-GCC (/usr/local/ARM/3.4.1/bin /), easy to set! It is very important that the directory in the middle must be correctly set. It must be the upper-level directory of the bin directory of the Cross-compilation tool chain, my is the upper level of the/usr/local/ARM/3.4.1/bin/directory, that is,/usr/local/ARM/3.4.1ok! The compiler settings are complete. You can compile it. Build --- build, then we need to set the IP address and port for remote debugging, In order to connect to the gdbserver of the development board! Select project --- propertiles. Then select the debugger tag. Click debug below to fill in the Development Board IP address and port, the port can be arbitrary, but must be consistent with the gdbserver listening port on the Development Board !... Then it is the same as the normal ide ~ There are also the mount and gdbserver of the development board .... There are many websites.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.