Building Multi-Threaded Applications Print


The version of the uClibc included with the CodeSourcery toolchain does not provide support for POSIX threads. To address this limitation, Emcraft has enabled POSIX threads in uClibc and included the updated library built for Thumb in our uClinux distribution.

In order to build a multi-threaded application and link it with the appropriate uClibc binary, do the following.

After activation of the cross-build environment (. ./, run the following command (linux-dp.c being the application in the below example):

arm-uclinuxeabi-gcc -o linux-dp linux-dp.c -I \
${INSTALL_ROOT}/A2F/root/usr/include -mcpu=cortex-m3 -mthumb -L \
${INSTALL_ROOT}/A2F/root/usr/lib -pthread

The uClibc version used by Emcraft is v.