Version 1 (modified by 18 years ago) (diff) | ,
---|
Config files
DSX configuration is done through dedicated configuration files. The following files are evaluated in order:
$DSX_DIR/etc/dsx.conf
Default config, system wide.
~/.dsx.conf
In your home dir, default config, user wide
./dsx.conf
Setup for current directory / project.
Syntax
Config files have an "ini-like" syntax, much like windows ini files.
# Comment ; Another commentaire [section] key1 = value1 key2 = value2 key3 = multi-line value, subsequent lines to concatenate must begin with a whitespace character. [another-section] key = val
Parser has a great feature: it may extend contents of a variable within another with %(variable-name)s syntax:
[calc] oper = 2x3 result = 6 long = the expression %(oper)s equals %(result)s short = %(oper)s = %(result)s
DSX' interpretation
Section [defaults] describes sections to look at for project parts:
[defaults] soclib = soclib-exemple systemc = systemc-exemple [systemc-exemple] dir = /users/exemple/systemc-2.1.0 os = linux [soclib-exemple] dir = /users/exemple/soclib
This makes it easier to switch between different concurent configurations
Sections to fill
DSX config defines paths for your actual system configuration
- Compilation options and paths for SystemC, SystemCASS or any other SystemC implementation
- Path to SoCLIB
- Paths and prefixes to cross compilation software suite
SystemC, SystemCASS
Mandatory configuration items for SystemC implementation are:
nickname
Type of implementation, possible values are: systemc, systemcass.
cflags
Additionnal compile-time arguments, typically include paths, -W options, ...
libdir
Additionnal link-time arguments, typically library paths
libs
Libraries
cxx
C++ compiler, default is g++.
Example:
[systemcass-labo] ; Globally substitued variables dir=/users/outil/systemc/systemcass/systemcass/latest os=i686-Linux.SLA4x ; Generic declaration nickname=systemcass cflags=-I%(dir)s/include -O3 -rdynamic libdir=%(dir)s/lib-%(os)s libs=-lsystemc -ldl -rdynamic cxx=g++
Cross compilers
Options:
cc-prefix
Prefix for tools' names
cc-cflags
Additionnal compile time flags
Example:
[mipsel] cc-prefix=mipsel-unknown-elf- cc-cflags=-O2 -Wall [ppc] cc-prefix=/usr/local/cctools/ppc/bin/ppc-unknown-elf- cc-cflags=-O2 -Wall