C/C++ Toolchain

System requirements: This process requires a PC running a 64-bit Linux OS or a virtual machine that runs a 64-bit Linux OS. (Do not install the toolchain on the device itself.)

For mLinux 3, Ubuntu 14.04 is preferred.  For mLinux 4, Ubuntu 14.04 or Ubuntu 16.04 may be used.

NOTE: Before downloading and running the install script, refer to the appropriate toolchain information based on your version number at: http://www.multitech.net/mlinux/sdk/

Since the filenames vary for each .sh file, do not  just change the version number for the url in the curl command.  Replace the entire filename as well.  As in the below example, the address  for  version 3.3.6 is:
http://www.multitech.net/mlinux/sdk/3.3.6/mlinux-eglibc-x86_64-mlinux-factory-image-arm926ejste-toolchain-3.3.6.sh

But for version 4.0.1, the url would be:   http://www.multitech.net/mlinux/sdk/4.0.1/mlinux-glibc-x86_64-mlinux-factory-image-arm926ejste-toolchain-4.0.1.sh

To install the C/C++ toolchain, download and execute the install script:

curl http://www.multitech.net/mlinux/sdk/3.3.6/mlinux-eglibc-x86_64-mlinux-factory-image-arm926ejste-toolchain-3.3.6.sh > mlinux-toolchain-install.sh
chmod +x mlinux-toolchain-install.sh
./mlinux-toolchain-install.sh

Once the toolchain is installed, load the environment for it:

source /path/to/sdk/environment-setup-arm926ejste-mlinux-linux-gnueabi

This sets common environment variables for compiling such as $CC, $LD, etc. To compile a single source file C program, run the following from your app’s source code directory:

 $CC -o myapp myapp.c

Which builds a myapp executable from myapp.c. To execute the app, scp myapp over to the conduit.

Open Source C

You can also build a standard open source C project. For this, the typical process would be:

# load the environment as before.
# run in the source dir for the project.
$ ./configure
$ make

For more details on the toolchain from Yocto, see the following:

Documentation for mLinux 4 (Yocto 2.1):
https://www.yoctoproject.org/docs/2.1/sdk-manual/sdk-manual.html

Documentation for mLinux 3 (Yocto 1.6):
https://www.yoctoproject.org/docs/1.6/dev-manual/dev-manual.html