|
ApplicationDeveloperGettingStart
IntroductionThis page describes how to compile your applications and run them on tmlinux. For more details on application development, please refer ApplicationDevelopmentNote. DetailsPreparation:
First of all, you should install TCS Linux edition on your Linux machines. Please goto http://www.tcshelp.com to get it. Of course, you should have the license for it. In the following section, let's suppose the installation directory of your TCS is /opt/NXP/TCS510/
For PNX1500 Simulator: export PATH=$PATH:/opt/NXP/TCS510/bin/ export PATH=$PATH:/home/guohr/worktest/sysroots/pnx1500_ttisim_uclibc/x86-linux2/ For PNX1500 standalone board (e.g: MBE1500 board): export PATH=$PATH:/opt/NXP/TCS510/bin/ export PATH=$PATH:/home/guohr/worktest/sysroots/pnx1500_nohost_uclibc/x86-linux2/ For PNX1005 Simulator: export PATH=$PATH:/opt/NXP/TCS510/bin/ export PATH=$PATH:/home/guohr/worktest/sysroots/pnx1005_ttisim_uclibc/x86-linux2/ For PNX1005 standalone board: export PATH=$PATH:/opt/NXP/TCS510/bin/ export PATH=$PATH:/home/guohr/worktest/sysroots/pnx1005_nohost_uclibc/x86-linux2/
To validate the environment, at shell, use the following command, the result will like this:guohr@ghr-notebook-02:~/worktest> tmcc -V tmcc: V7.1.0 of TCS V5.1(0042rc6_Linux) tmcc warning : no work For PNX1500: guohr@ghr-notebook-02:~/worktest>trimedia-gss-linux-tcs-pnx1500el_fp64-uclibc-gcc -V tmcc: V7.1.0 of TCS V5.1(0042rc6_Linux) tmcc warning : no work For PNX1005: guohr@ghr-notebook-02:~/worktest>trimedia-gss-linux-tcs-pnx1005el_fp64-uclibc-gcc -V tmcc: V7.1.0 of TCS V5.1(0042rc6_Linux) tmcc warning : no work
Please set TCS with your TCS installation path (In the above example, it is /opt/NXP/TCS510). Build your application:
Because of lacking real output devices on simulator, this linux kernel directs stdout/stderr to /dev/null, which means that these output functions (such as printf(), puts()) will output nothing. Because of lacking real input devices, this linux kernel will wait forever when application calls input functions (such as gets(), getchar())
As I said before, tmlinux's printf() just output information to /dev/null. To see application running, I use TCS's printf() instead of tmlinux's printf(). So, in the following code,
For building pnx1500 applications: trimedia-gss-linux-tcs-pnx1500el_fp64-uclibc-gcc hello.c -o hello.out For building pnx1005 applications: trimedia-gss-linux-tcs-pnx1005el_fp64-uclibc-gcc hello.c -o hello.out There are some test cases for tmlinux application in svn. Please use the following command to check them out and just type make to compile them./*suppose you are in /home/guohr/worktest directory*/ svn checkout http://tmlinux.googlecode.com/svn/trunk/app-test/ cd app-test make If successful, you will get some .out binary applications in app-test directory. Please see TmlinuxAppExample for examples.
Run your applicationsNow you can put your binary applications into the target root file system and run it. For trimedia simulator, tmlinux only supports initramfs file system, please refer RunAppInitramfs to get to know how to run it. For trimedia standalone hardware board (e.g: MBE1500), tmlinux supports lots of file systems, e.g: ext2 (based on harddisk), NFS. But you need to configure linux kernel properly before running application. |
► Sign in to add a comment