To compile the software, you need the following programs and libraries.
On a Debian-based system, it is sufficient to run
apt-get install build-essential python pkg-config libidl-dev libpopt-dev libcv-dev libhighgui-dev libfftw3-dev qt4-dev-tools libusb-dev
Before first compilation, you should execute build/prepare_infrastructure script
.
cd build ./prepare_infrastructure
It downloads repository for h8s
processors and configures sources. Then, it should be sufficient to go to the build/<target>
directory and call
cd host make
To compile the project with debugging flags, put them to config.omk file in build/*
directory. Don't modify config.target, because this will influence all other developers.
cat <<EOF >> config.omk CFLAGS = -O0 -g -Wall -fno-strict-aliasing CXXFLAGS = -O0 -g -Wall -fno-strict-aliasing EOF make clean make
OMK build system allows to configure compilation process so that we can have multiple configurations of software (e.g.: with odometry feedback or without). On the OMK side, the configuration is done by setting make variables, from which headers files can be automatically generated. In sources #ifdef
can be used to compile differently under different configuration.
Running
make default-config
produces list of all possible configuration variables in config.omk-default
(note, that this is also run by prepare_infrastructure
).
To use different value than the default one, put the variable assignment to config.omk
or (preferably) to config.omk.local
.
echo CONFIG_OPEN_LOOP = y >> config.omk.local make
If you want to compile other configuration only temporarily you can you the following:
touch config.omk # make OMK notice a change make CONFIG_OPEN_LOOP=y
or a more permanent way:
touch config.omk export CONFIG_OPEN_LOOP=y make -e # the -e option is important!