Simple_OS applications

If you have questions or comments, please contact Ola Dahl - dahl.ola@gmail.com, ola.dahl@liu.se

Table of Contents

1 Simple_OS applications

The following application directories are available:

  • barber/console - a Sleeping barber program with text output
  • barber/gui - a Sleeping barber program with GUI communication
  • hello_console - a hello world program with text output
  • hello_gui - a hello world program with GUI communication

2 Build on a Linux host

There are Linux host makefiles available in the application directories:

  • Makefile_32 - for Linux 32-bit hosts
  • Makefile_64 - for Linux 64-bit hosts

In some application directories, the application is prepared for execution also on an ARM target (Beagleboard, running Simple_OS). Then there is a makefile for this purpose:

  • Makefile_arm_bb - for ARM target on Beagleboard

3 Build on a Windows host

The directory

win\vs_cpp_2010_express\simple_os_prog

contains a Visual Studio Express project file, which can be used when applications shall be built and executed using Windows

4 Linux host - create new applicaton

If you want to create a new application and you use a Linux host, a shell script is available, and can be used, e.g. like

source start_new_app_32.sh my_app

for creating a directory my_app, with src and obj directories created, and with symbolic links to Makefile_32 and rules.mk automatically created.

Then, store your source files in the src subdirectory of your new directory (my_app in this case), and using

make -f Makefile_32 

your application can be built for Linux host.

If you want to build for Linux 64-bit then create a symbolic link to the Makefile_64 file, in the same way as the link to Makefile_32 was created (see the file start_new_app_32.sh for information about this).

If you want to build for ARM you need a cross compiler. Simple_OS is prepared for use with CodeSourcerys ARM compiler on a Linux host.

The actual ARM compiler used when doing the port to ARM was this one: https://sourcery.mentor.com/sgpp/lite/arm/portal/release1802

Provided you have this compiler (or another one, however then you need to verify yourself that it can be used to build Simple_OS and Simple_OS applications), a build for ARM can be done by creating a symbolic link to Makefile_arm_bb, and then using

make -f Makefile_arm_bb

for compilation and linking. This results in a file prog_arm_bb.srec, which then can be downloaded to a Beagleboard using e.g. gtkterm.

5 Windows host - create new application

If you want to create a new application and you use a Windows host, please create a new subdirectory where your sourcefiles are stored. Then, use the already available Visual Studio project (the simple_os_prog.sln file), and include your source files into this project (and if needed, remove source files belonging to any one of the applications mentioned above from the project)

NOTE: when removing old source files and adding new files to a project, it is advised to do a complete rebuild the first time the new source files are compiled. This is achived using the command

Ctrl-Alt-F7

Author: <olad@OLAD-PC>

Date: 2011-10-04 14:40:18

HTML generated by org-mode 6.33x in emacs 23