Building User Space Applications Print


Here is how you can build a user-space application for uClinux.

On the host, develop source files for whatever application you would like to run on the uClinux target. For instance:

-bash-3.2$ vi test.c
#include <stdio.h>

int main(int argc, char *argv[])
printf("Hello %s\n", argv[1]);
return 1;

Build the application for the uClinux target:

-bash-3.2$ arm-uclinuxeabi-gcc -o test test.c -mcpu=cortex-m3 -mthumb

Run the application binary on the target. One easy way to do that is to have an NFS share mounted on the target, which immediately provides access to the host development directory:

/ # mount -o nolock,rsize=1024 /mnt
/ # /mnt/test uclinux
Hello uclinux
/ #