With compiled programs like C and C++, this can be a more ideal procedure when compared to Python which is interpreted on the fly (thus no speed increase by doing compilation beforehand). Many people are familiar with C and C++ as the basis for the programming when using the Arduino development environment.
The diagram below shows how this would be accomplished.
The open source gcc compiler can generate code for many different computers. What we are looking for in this series is a Windows executable compiler which generates Raspberry Pi executables. There are many more combinations. Raspberry Pi cross compilers most often use Linux as the PC-side operating system and you can find Mac hosts as well.
Unfortunately, getting the cross compiler is not as simple as going to the Raspberry Pi website or GitHub repository (at present). The code for building the gcc toolchain (the programs that make up the cross compiler) is available but you need a native compiler (in this case Windows) and an environment that will take the source code and make the tools you want. Since gcc is a compiler that is Unix/Linux centric, you can set up an environment that helps Windows work more like *nix, the most common two being MinGW and Cygwin. This complicates the upfront work to set things up, something that we'd like to avoid at present.
The tutorial in following posts will demonstrate an effective cross compile process by using tools developed by SysProgs and Adafruit.
- This introduction
- PC Setup
- Pi Setup
- Library Setup
- Use
No comments:
Post a Comment