For Windows 10 Users I would recommend using WSL (Windows Subsystem for Linux).
Setup is fairly simple!
Step 1: Enable and setup WSL
When Windows is updated start a Windows PowerShell in admin mode and execute the following command to enable WSL.
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Restart your computer when prompted.
After WSL is enabled go to Microsoft Store, find Ubuntu 18.04 and install it (you do not have to login, even if asked).
When installed, press Start in the Microsoft Store and enter your username and password for the WSL. WSL is now ready to be used.
Step 2: Install Needed Packages in WSL
sudo apt update
sudo apt install autoconf clang-3.9
sudo apt install distcc
Step 3: Setting up in WSL
Create the folder ~/arm or similar (if you choose something else, then modify the scripts that follow accordingly):
mkdir -p ~/arm
On the host, create the following script in
clang-3.9 -target armv7l-unknown-linux-gnueabihf --sysroot ~/arm $@
Create the following script in
clang++-3.9 -target armv7l-unknown-linux-gnueabihf --sysroot ~/arm $@
Make them executable:
sudo chmod +x /usr/local/bin/clang-3.9-arm
sudo chmod +x /usr/local/bin/clang++-3.9-arm
Setup on WSL host is now done.
Step 4: Setting up on Bela
If you are using Bela Image 0.3.8a or later, simply do the following to prepare for Cross Compilation
As giuliomoro says above, on Bela create a
/root/Bela/CustomMakefileTop.in which contains just this line:
DISTCC := 1
When using on windows you need to edit the IP adresse of the Host in the folowing files:
i.e. change the line
export DISTCC_HOSTS=192.168.7.1 to
export DISTCC_HOSTS=192.168.6.1 or whatever you host IP is as seen from Bela.
If using an older image follow the (Bela) instructions here:
Step 5: Using DistCC
Before you can compile using distcc you need to start the distcc deamon:
distccd --verbose --no-detach --daemon --allow 192.168.6.2 --log-level debug --log-file ~/distccd.log
Now you're ready to compile using distcc using Windows Subsystem for Linux
Step 6: Compile projects as usual in IDE or from command line
Hope that is helpful for someone