Raspberry Pi Cross-compilation Environment build (Win 7)

Source: Internet
Author: User

Although the Raspberry Pi has gcc, you can compile the C + + program, but if the project is large, compiling with the Raspberry Pi will waste a lot of time, we can compile the program on the PC, then pass the executable file to the Raspberry Pi, execute the program, make full use of the resources on the PC and speed up the development progress.

  • First need to build a cross-compiling environment on the PC, here I chose Cygwin as a cross-compilation environment, on the official website can be downloaded.

  • installation program Cygwin
  • Download Arm-tool Chain

: Https://github.com/IanLinsdell/Raspberrypi

After the download is done, unzip one of the HARDFP to be pressurized, extract to Cygwin under the working directory formed below:

Cygwin/opt/cross/x-tools/arm-unknown-linux-gnueabi

At this point, the PC-side cross-compilation environment is built.

  • To test whether the cross-compilation environment is installed correctly

Writing programs (with floating-point arithmetic)

Cross-compiling at the Cygwin terminal

  • Passing executable programs to our Raspberry Pi

Here I'm using a Samba shared folder to complete the communication between the Raspberry Pi and the PC

Copy the file to a shared directory and open the Samba service on the Raspberry Pi for file download:

Program runs successfully, proving that the program is based on ARM's

So later we in the development of large-scale embedded programs, you can consider the use of cross-compilation, and then through the SFTP, samba and other ways to transfer executable files on the embedded device, the whole process is relatively convenient and efficient.

Raspberry Pi Cross-compilation Environment build (Win 7)

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.