Development Environment

Source Code, Compilers, and System Generator

Intall the System Generator

The SDVOS system generator is called sdvgen. The source code is located at the tools/sdvgen directory. After installing the compiler, flex, and bison, you can configure, compile, and install the application with the following commands:

bash$ cd tools/sdvgen
bash$ ./autogen.sh
bash$ ./configure --prefix=/usr/local
bash$ make
bash$ make install

If everything goes well, you should have the system generator installed to the location you specified. After making sure the installation location is in your shell PATH, you can type sdvgen -h and see the help message:

Usage: sdvgen [Options] CONFIG_FILE
Options:
	-i  	Config file include path
				Multiple paths separated by ":"
	-s  	Path to SDVOS source
	-r 			Generating resource statistics
	-t 			Test/Verify
	-d 			Dump all objects
	-b 			Backup old configuration files
	-m 			Build system image
	-h 			Print this help message
	-v 			Version

You can also read the manual by typing man sdvgen


If you don't want to use autoconf, you can also try to manually build the system generator. There is an existing Makefile in the src directory. To compile manually, do the following:

bash$ cd tools/sdvgen/src
bash$ make -f Makefile.manual

Again, before doing this, please make sure you have GCC, Flex, and Bison installed on your host machine.


SDVGEN User Manual

sdvgen parses an OSEK OIL file and generates all the configuration files needed by SDVOS for a target platform. Currently, these configuration files include: config.mk, config/config.c, config/config.h, and apps/config.mk.

If you are not familiar with the OSEK OIL file format, feel free to take a look at the specification here.


OPTIONS

-i <include_path>

Specifies OIL file include path. OIL files can be split into different files and included with C style include directive. can be multiple paths separated by ':'

-s <sdvos_base>

Specifies the SDVOS source root directory.

-r

Generates resource statistics after parsing OIL file.

-t

generates configration files to STDOUT for test/verify.

-d

Dumps all the system objects after parsing OIL file. This can be used to check the integrity of objects and discover potential parser bugs.

-b

Backs up all configuration files before creating new ones. Old files will be copied to hidden files of the same names in the same directory.

-m

Builds the system image after generating all the configuration files.

-h

Displays help message and exits.

-v

Outputs version information and exits.


Examples

sdvgen -r config.oil

Read the OIL file config.oil and display a system resource statistics report

sdvgen -d config.oil

Read the OIL file config.oil and display all the system objects.

sdvgen -s /path/to/sdvos/src -t config.oil

Read the OIL file config.oil and display all the configuration files on STDOUT for test and verification.

sdvgen -i /include/path1:/include/path2 -s /path/to/sdvos/src config.oil

Set OIL file include path to /include/path1 and /include/path2, read the OIL file config.oil and generate all the configuration files for the SDVOS kernel source tree located at /path/to/sdvos/src

sdvgen -s /path/to/sdvos/src -b config.oil

Read the OIL file config.oil , back up all the old configration files and generate all the new configuration files for the SDVOS kernel source tree located at /path/to/sdvos/src

sdvgen -s /path/to/sdvos/src -b -r -d config.oil

Same as above, but also generate resource statistics report and display all the system objects to STDOUT.

sdvgen -s /path/to/sdvos/src -b -r -d -m config.oil

Same as above, but also generate a system image using the new configuration files and kernel source located at /path/to/sdvos/src. This is essentially changing directory to /path/to/sdvos/src and issue a make. The system image can be found in the kernel source directory.