Optimized high speed nRF24L01+ driver class documentation v1.4.10
TMRh20 2020 - Optimized fork of the nRF24L01+ driver
Loading...
Searching...
No Matches
Linux cross-compilation

Table of Contents

Warning
These instructions are no longer recommended because they involve disabling security measures for the target system. Please try the instructions using CMake.

RF24 library supports cross-compilation. Advantages of cross-compilation:

  • development tools don't have to be installed on target machine
  • resources of target machine don't have to be sufficient for compilation
  • compilation time can be reduced for large projects

Following prerequisites need to be assured:

  • ssh password-less access to target machine Here is a hint
  • sudo of a remote user without password Here is a hint
  • cross-compilation toolchain for your target machine; for RPi
    git clone https://github.com/raspberrypi/tools rpi_tools
    and cross-compilation tools must be in PATH, for example
    export PATH=$PATH:/your/dir/rpi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin

Cross compilation steps

  1. clone RF24 to a machine for cross-compilation
    git clone https://github.com/nRF24/RF24
    cd RF24
  2. configure for cross compilation
    ./configure --remote=pi@target_linux_host
    eventually
    ./configure --remote=pi@target_linux_host --driver=<driver>
  3. build
    make
  4. (optional) install library to cross-compilation machine into cross-environment - important for compilation of examples
    sudo make install
  5. upload library to target machine
    make upload
  6. (optional) compile examples
    cd examples_linux
    make
  7. (optional) upload examples to target machine
    make upload