Changes between Version 12 and Version 13 of almosOnTsarDoc


Ignore:
Timestamp:
Aug 21, 2012, 12:45:34 AM (13 years ago)
Author:
almaless
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • almosOnTsarDoc

    v12 v13  
    7777== Your first application ==
    7878
     79Lets change the cap and look to how we can compile and run a user application for ALMOS/TSAR target. This task can be resumed in 4 steps:
    7980
     81 1. Write your application
     82 2. Cross-compile it using ALMOS headers and libraries
     83 3. Install it on the hdd-img.bin file system image
     84 4. Go to your ''DISTRIB/test/pfX'' directory and run the TSAR simulator
     85 
     86Some example of applications source code can be found in ''DISTRIB/test/apps''. Lets try the ''hello_world'' one. The ''main'' function of this application asks the system for the number of online cores (''count'') and then it fires ''count'' threads before it synchronizes on their end. Each fired thread executes the ''thread_func'' function which prints a "Hello World" message.
     87
     88To Cross-compile the application using ALMOS headers and static libraries:
     89
     90{{{
     91$ cd DISTRIB/test/apps
     92$ make TARGET=tsar
     93}}}
     94
     95The result is the ''./hello'' program. To install this program into ALMOS file system (''hdd-img.bin''). Just type:
     96
     97{{{
     98$ make install
     99}}}
     100
     101This will copy the ''./hello'' to ''/bin/hello'' inside the ''hdd-img.bin'' file system image.
    80102
    81103== Running without interactive mode ==