raspberry:raspberry-cross-platform
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| raspberry:raspberry-cross-platform [2024/05/02 15:36] – oscar | raspberry:raspberry-cross-platform [2024/09/15 07:12] (current) – [Cross Platform Development for Raspberry] oscar | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Cross Platform Development for Raspberry ====== | ====== Cross Platform Development for Raspberry ====== | ||
| Cross-development means developing and compiling programs on another platform then it intended to run upon. It is a common approach for Pi, since it’s also how Raspian is built. For quite some time I did compile Pi applications on the Pi itself. Which works quite well, but has one large drawback: performance. Being able to compile these programs on my 8 core 16GB desktop, improved compilation time enorms. And it is quite simple. I have used 2 different approaches to setup a cross build environment: | Cross-development means developing and compiling programs on another platform then it intended to run upon. It is a common approach for Pi, since it’s also how Raspian is built. For quite some time I did compile Pi applications on the Pi itself. Which works quite well, but has one large drawback: performance. Being able to compile these programs on my 8 core 16GB desktop, improved compilation time enorms. And it is quite simple. I have used 2 different approaches to setup a cross build environment: | ||
| - | - Manual setup | + | - Manual setup **<- Used by me** |
| - Debian Crossbuild packages | - Debian Crossbuild packages | ||
| Let's have a look! | Let's have a look! | ||
| Line 35: | Line 35: | ||
| apt-get install gnutls-dev: | apt-get install gnutls-dev: | ||
| apt-get install libmicrohttpd-dev: | apt-get install libmicrohttpd-dev: | ||
| - | apt-get install | + | apt-get install |
| ===== Method 2: Manual Setup ===== | ===== Method 2: Manual Setup ===== | ||
| ==== Set Up Cross Build Tools ==== | ==== Set Up Cross Build Tools ==== | ||
| The first step is to install the development tools on the desktop, or host system. From the command line run the following: | The first step is to install the development tools on the desktop, or host system. From the command line run the following: | ||
| - | < | + | < |
| # apt-get update | # apt-get update | ||
| # apt-get upgrade | # apt-get upgrade | ||
| Line 48: | Line 48: | ||
| # apt-get install g++-aarch64-linux-gnu | # apt-get install g++-aarch64-linux-gnu | ||
| </ | </ | ||
| - | The first line makes sure that the system is up to date. The second instruction installs the general build tools. The third installs the C and C++ compiler and build tools for the Pi’s ARM processor. The ARM architecture designation, | + | The first line makes sure that the system is up to date. The second instruction installs the general build tools. The third installs the C and C++ compiler and build tools for the Pi’s ARM processor. The ARM architecture designation, |
| < | < | ||
| arm-linux-gnueabihf-g++ -v | arm-linux-gnueabihf-g++ -v | ||
| Line 140: | Line 140: | ||
| The debugger provides a large number of commands for manipulating breakpoints, | The debugger provides a large number of commands for manipulating breakpoints, | ||
| - | |||
| - | |||
| - | |||
| - | ====== NEW ====== | ||
| ====== Links ====== | ====== Links ====== | ||
raspberry/raspberry-cross-platform.1714664199.txt.gz · Last modified: by oscar
