| 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 | |
| 86 | Some 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 | |
| 88 | To Cross-compile the application using ALMOS headers and static libraries: |
| 89 | |
| 90 | {{{ |
| 91 | $ cd DISTRIB/test/apps |
| 92 | $ make TARGET=tsar |
| 93 | }}} |
| 94 | |
| 95 | The 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 | |
| 101 | This will copy the ''./hello'' to ''/bin/hello'' inside the ''hdd-img.bin'' file system image. |